summaryrefslogtreecommitdiffstats
path: root/tests/ui/type-alias-impl-trait/generic_nondefining_use.stderr
blob: e3b7b1a76b09d09d220657418bf0b577a60781be (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
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
error[E0792]: non-defining opaque type use in defining scope
  --> $DIR/generic_nondefining_use.rs:15:21
   |
LL | fn concrete_ty() -> OneTy<u32> {
   |                     ^^^^^^^^^^ argument `u32` is not a generic parameter
   |
note: for this opaque type
  --> $DIR/generic_nondefining_use.rs:7:17
   |
LL | type OneTy<T> = impl Debug;
   |                 ^^^^^^^^^^

error[E0792]: expected generic type parameter, found `u32`
  --> $DIR/generic_nondefining_use.rs:17:5
   |
LL | type OneTy<T> = impl Debug;
   |            - this generic parameter must be used with a generic type parameter
...
LL |     5u32
   |     ^^^^

error[E0792]: non-defining opaque type use in defining scope
  --> $DIR/generic_nondefining_use.rs:21:27
   |
LL | fn concrete_lifetime() -> OneLifetime<'static> {
   |                           ^^^^^^^^^^^^^^^^^^^^ argument `'static` is not a generic parameter
   |
note: for this opaque type
  --> $DIR/generic_nondefining_use.rs:9:24
   |
LL | type OneLifetime<'a> = impl Debug;
   |                        ^^^^^^^^^^

error[E0792]: expected generic lifetime parameter, found `'static`
  --> $DIR/generic_nondefining_use.rs:23: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[E0792]: non-defining opaque type use in defining scope
  --> $DIR/generic_nondefining_use.rs:27:24
   |
LL | fn concrete_const() -> OneConst<{ 123 }> {
   |                        ^^^^^^^^^^^^^^^^^ argument `123` is not a generic parameter
   |
note: for this opaque type
  --> $DIR/generic_nondefining_use.rs:11:33
   |
LL | type OneConst<const X: usize> = impl Debug;
   |                                 ^^^^^^^^^^

error[E0792]: expected generic constant parameter, found `123`
  --> $DIR/generic_nondefining_use.rs:29:5
   |
LL | type OneConst<const X: usize> = impl Debug;
   |               -------------- this generic parameter must be used with a generic constant parameter
...
LL |     7u32
   |     ^^^^

error: aborting due to 6 previous errors

For more information about this error, try `rustc --explain E0792`.