|
1 | | -error: the type of the associated constant `K` must not depend on generic parameters |
2 | | - --> $DIR/assoc-const-eq-param-in-ty.rs:22:29 |
| 1 | +error[E0770]: the type of const parameters must not depend on other generic parameters |
| 2 | + --> $DIR/assoc-const-eq-param-in-ty.rs:15:15 |
3 | 3 | | |
4 | | -LL | fn take0<'r, A: 'r + ConstParamTy_, const Q: usize>( |
5 | | - | -- the lifetime parameter `'r` is defined here |
6 | | -... |
7 | | -LL | _: impl Trait<'r, A, Q, K = const { loop {} }> |
8 | | - | ^ its type must not depend on the lifetime parameter `'r` |
9 | | - | |
10 | | - = note: `K` has type `&'r [A; Q]` |
11 | | - |
12 | | -error: the type of the associated constant `K` must not depend on generic parameters |
13 | | - --> $DIR/assoc-const-eq-param-in-ty.rs:22:29 |
14 | | - | |
15 | | -LL | fn take0<'r, A: 'r + ConstParamTy_, const Q: usize>( |
16 | | - | - the type parameter `A` is defined here |
17 | | -... |
18 | | -LL | _: impl Trait<'r, A, Q, K = const { loop {} }> |
19 | | - | ^ its type must not depend on the type parameter `A` |
20 | | - | |
21 | | - = note: `K` has type `&'r [A; Q]` |
22 | | - |
23 | | -error: the type of the associated constant `K` must not depend on generic parameters |
24 | | - --> $DIR/assoc-const-eq-param-in-ty.rs:22:29 |
25 | | - | |
26 | | -LL | fn take0<'r, A: 'r + ConstParamTy_, const Q: usize>( |
27 | | - | - the const parameter `Q` is defined here |
28 | | -... |
29 | | -LL | _: impl Trait<'r, A, Q, K = const { loop {} }> |
30 | | - | ^ its type must not depend on the const parameter `Q` |
31 | | - | |
32 | | - = note: `K` has type `&'r [A; Q]` |
33 | | - |
34 | | -error: the type of the associated constant `SELF` must not depend on `impl Trait` |
35 | | - --> $DIR/assoc-const-eq-param-in-ty.rs:39:26 |
36 | | - | |
37 | | -LL | fn take1(_: impl Project<SELF = const {}>) {} |
38 | | - | -------------^^^^------------ |
39 | | - | | | |
40 | | - | | its type must not depend on `impl Trait` |
41 | | - | the `impl Trait` is specified here |
42 | | - |
43 | | -error: the type of the associated constant `SELF` must not depend on generic parameters |
44 | | - --> $DIR/assoc-const-eq-param-in-ty.rs:44:21 |
45 | | - | |
46 | | -LL | fn take2<P: Project<SELF = const {}>>(_: P) {} |
47 | | - | - ^^^^ its type must not depend on the type parameter `P` |
48 | | - | | |
49 | | - | the type parameter `P` is defined here |
50 | | - | |
51 | | - = note: `SELF` has type `P` |
| 4 | +LL | const K: &'a [T; N]; |
| 5 | + | ^^ the type must not depend on the parameter `'a` |
52 | 6 |
|
53 | | -error: the type of the associated constant `K` must not depend on generic parameters |
54 | | - --> $DIR/assoc-const-eq-param-in-ty.rs:53:52 |
| 7 | +error[E0770]: the type of const parameters must not depend on other generic parameters |
| 8 | + --> $DIR/assoc-const-eq-param-in-ty.rs:15:19 |
55 | 9 | | |
56 | | -LL | trait Iface<'r>: ConstParamTy_ { |
57 | | - | -- the lifetime parameter `'r` is defined here |
58 | | -... |
59 | | -LL | type Assoc<const Q: usize>: Trait<'r, Self, Q, K = const { loop {} }> |
60 | | - | ^ its type must not depend on the lifetime parameter `'r` |
61 | | - | |
62 | | - = note: `K` has type `&'r [Self; Q]` |
63 | | - |
64 | | -error: the type of the associated constant `K` must not depend on `Self` |
65 | | - --> $DIR/assoc-const-eq-param-in-ty.rs:53:52 |
66 | | - | |
67 | | -LL | type Assoc<const Q: usize>: Trait<'r, Self, Q, K = const { loop {} }> |
68 | | - | ^ its type must not depend on `Self` |
69 | | - | |
70 | | - = note: `K` has type `&'r [Self; Q]` |
71 | | - |
72 | | -error: the type of the associated constant `K` must not depend on generic parameters |
73 | | - --> $DIR/assoc-const-eq-param-in-ty.rs:53:52 |
74 | | - | |
75 | | -LL | type Assoc<const Q: usize>: Trait<'r, Self, Q, K = const { loop {} }> |
76 | | - | - ^ its type must not depend on the const parameter `Q` |
77 | | - | | |
78 | | - | the const parameter `Q` is defined here |
79 | | - | |
80 | | - = note: `K` has type `&'r [Self; Q]` |
81 | | - |
82 | | -error: the type of the associated constant `K` must not depend on generic parameters |
83 | | - --> $DIR/assoc-const-eq-param-in-ty.rs:53:52 |
84 | | - | |
85 | | -LL | trait Iface<'r>: ConstParamTy_ { |
86 | | - | -- the lifetime parameter `'r` is defined here |
87 | | -... |
88 | | -LL | type Assoc<const Q: usize>: Trait<'r, Self, Q, K = const { loop {} }> |
89 | | - | ^ its type must not depend on the lifetime parameter `'r` |
90 | | - | |
91 | | - = note: `K` has type `&'r [Self; Q]` |
92 | | - = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` |
| 10 | +LL | const K: &'a [T; N]; |
| 11 | + | ^ the type must not depend on the parameter `T` |
93 | 12 |
|
94 | | -error: the type of the associated constant `K` must not depend on `Self` |
95 | | - --> $DIR/assoc-const-eq-param-in-ty.rs:53:52 |
96 | | - | |
97 | | -LL | type Assoc<const Q: usize>: Trait<'r, Self, Q, K = const { loop {} }> |
98 | | - | ^ its type must not depend on `Self` |
| 13 | +error[E0770]: the type of const parameters must not depend on other generic parameters |
| 14 | + --> $DIR/assoc-const-eq-param-in-ty.rs:15:22 |
99 | 15 | | |
100 | | - = note: `K` has type `&'r [Self; Q]` |
101 | | - = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` |
| 16 | +LL | const K: &'a [T; N]; |
| 17 | + | ^ the type must not depend on the parameter `N` |
102 | 18 |
|
103 | | -error: the type of the associated constant `K` must not depend on generic parameters |
104 | | - --> $DIR/assoc-const-eq-param-in-ty.rs:53:52 |
105 | | - | |
106 | | -LL | type Assoc<const Q: usize>: Trait<'r, Self, Q, K = const { loop {} }> |
107 | | - | - ^ its type must not depend on the const parameter `Q` |
108 | | - | | |
109 | | - | the const parameter `Q` is defined here |
| 19 | +error[E0770]: the type of const parameters must not depend on other generic parameters |
| 20 | + --> $DIR/assoc-const-eq-param-in-ty.rs:27:17 |
110 | 21 | | |
111 | | - = note: `K` has type `&'r [Self; Q]` |
112 | | - = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` |
| 22 | +LL | const SELF: Self; |
| 23 | + | ^^^^ the type must not depend on the parameter `Self` |
113 | 24 |
|
114 | | -error: aborting due to 11 previous errors |
| 25 | +error: aborting due to 4 previous errors |
115 | 26 |
|
| 27 | +For more information about this error, try `rustc --explain E0770`. |
0 commit comments