summaryrefslogtreecommitdiffstats
path: root/src/test/ui/type-alias-impl-trait/generic_nondefining_use.stderr
blob: e7565525ad3387396ac5c7f9d2efd85ae366943f (plain)
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
error: non-defining opaque type use in defining scope
  --> $DIR/generic_nondefining_use.rs:17:5
   |
LL |     5u32
   |     ^^^^
   |
note: used non-generic type `u32` for generic parameter
  --> $DIR/generic_nondefining_use.rs:7:12
   |
LL | type OneTy<T> = impl Debug;
   |            ^

error: non-defining opaque type use in defining scope
  --> $DIR/generic_nondefining_use.rs:22:5
   |
LL | type OneLifetime<'a> = impl Debug;
   |                  -- cannot use static lifetime; use a bound lifetime instead or remove the lifetime parameter from the opaque type
...
LL |     6u32
   |     ^^^^

error: non-defining opaque type use in defining scope
  --> $DIR/generic_nondefining_use.rs:27:5
   |
LL |     7u32
   |     ^^^^
   |
note: used non-generic constant `123` for generic parameter
  --> $DIR/generic_nondefining_use.rs:11:15
   |
LL | type OneConst<const X: usize> = impl Debug;
   |               ^^^^^^^^^^^^^^

error: aborting due to 3 previous errors