File: bad-tait-no-substs.stderr

package info (click to toggle)
rustc 1.85.0%2Bdfsg2-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 893,176 kB
  • sloc: xml: 158,127; python: 35,830; javascript: 19,497; cpp: 19,002; sh: 17,245; ansic: 13,127; asm: 4,376; makefile: 1,051; lisp: 29; perl: 29; ruby: 19; sql: 11
file content (78 lines) | stat: -rw-r--r-- 2,407 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
error[E0106]: missing lifetime specifier
  --> $DIR/bad-tait-no-substs.rs:8:11
   |
LL |     Tuple(Alias),
   |           ^^^^^ expected named lifetime parameter
   |
help: consider introducing a named lifetime parameter
   |
LL ~ pub enum UninhabitedVariants<'a> {
LL ~     Tuple(Alias<'a>),
   |

error[E0107]: missing generics for type alias `Alias`
  --> $DIR/bad-tait-no-substs.rs:8:11
   |
LL |     Tuple(Alias),
   |           ^^^^^ expected 1 generic argument
   |
note: type alias defined here, with 1 generic parameter: `U`
  --> $DIR/bad-tait-no-substs.rs:5:6
   |
LL | type Alias<'a, U> = impl Trait<U>;
   |      ^^^^^     -
help: add missing generic argument
   |
LL |     Tuple(Alias<U>),
   |                +++

error[E0792]: non-defining opaque type use in defining scope
  --> $DIR/bad-tait-no-substs.rs:8:11
   |
LL |     Tuple(Alias),
   |           ^^^^^ argument `'_` is not a generic parameter
   |
note: for this opaque type
  --> $DIR/bad-tait-no-substs.rs:5:21
   |
LL | type Alias<'a, U> = impl Trait<U>;
   |                     ^^^^^^^^^^^^^

error: item does not constrain `Alias::{opaque#0}`, but has it in its signature
  --> $DIR/bad-tait-no-substs.rs:14:4
   |
LL | fn uwu(x: UninhabitedVariants) {
   |    ^^^
   |
   = note: consider moving the opaque type's declaration and defining uses into a separate module
note: this opaque type is in the signature
  --> $DIR/bad-tait-no-substs.rs:5:21
   |
LL | type Alias<'a, U> = impl Trait<U>;
   |                     ^^^^^^^^^^^^^

error[E0004]: non-exhaustive patterns: `UninhabitedVariants::Tuple(_)` not covered
  --> $DIR/bad-tait-no-substs.rs:16:11
   |
LL |     match x {}
   |           ^ pattern `UninhabitedVariants::Tuple(_)` not covered
   |
note: `UninhabitedVariants` defined here
  --> $DIR/bad-tait-no-substs.rs:7:10
   |
LL | pub enum UninhabitedVariants {
   |          ^^^^^^^^^^^^^^^^^^^
LL |     Tuple(Alias),
   |     ----- not covered
   = note: the matched value is of type `UninhabitedVariants`
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
   |
LL ~     match x {
LL +         UninhabitedVariants::Tuple(_) => todo!(),
LL +     }
   |

error: aborting due to 5 previous errors

Some errors have detailed explanations: E0004, E0106, E0107, E0792.
For more information about an error, try `rustc --explain E0004`.