1
1
error[E0412]: cannot find type `N` in this scope
2
- --> $DIR/missing-type-parameter2.rs:6 :8
2
+ --> $DIR/missing-type-parameter2.rs:3 :8
3
3
|
4
4
LL | struct X<const N: u8>();
5
5
| ------------------------ similarly named struct `X` defined here
@@ -17,7 +17,7 @@ LL | impl<N> X<N> {}
17
17
| +++
18
18
19
19
error[E0412]: cannot find type `N` in this scope
20
- --> $DIR/missing-type-parameter2.rs:9 :28
20
+ --> $DIR/missing-type-parameter2.rs:6 :28
21
21
|
22
22
LL | impl<T, const A: u8 = 2> X<N> {}
23
23
| - ^
@@ -34,7 +34,7 @@ LL | impl<T, const A: u8 = 2, N> X<N> {}
34
34
| +++
35
35
36
36
error[E0412]: cannot find type `T` in this scope
37
- --> $DIR/missing-type-parameter2.rs:14 :20
37
+ --> $DIR/missing-type-parameter2.rs:11 :20
38
38
|
39
39
LL | struct X<const N: u8>();
40
40
| ------------------------ similarly named struct `X` defined here
@@ -52,7 +52,7 @@ LL | fn foo<T>(_: T) where T: Send {}
52
52
| +++
53
53
54
54
error[E0412]: cannot find type `T` in this scope
55
- --> $DIR/missing-type-parameter2.rs:14 :11
55
+ --> $DIR/missing-type-parameter2.rs:11 :11
56
56
|
57
57
LL | struct X<const N: u8>();
58
58
| ------------------------ similarly named struct `X` defined here
@@ -70,7 +70,7 @@ LL | fn foo<T>(_: T) where T: Send {}
70
70
| +++
71
71
72
72
error[E0412]: cannot find type `A` in this scope
73
- --> $DIR/missing-type-parameter2.rs:18 :24
73
+ --> $DIR/missing-type-parameter2.rs:15 :24
74
74
|
75
75
LL | struct X<const N: u8>();
76
76
| ------------------------ similarly named struct `X` defined here
@@ -88,7 +88,7 @@ LL | fn bar<const N: u8, A>(_: A) {}
88
88
| +++
89
89
90
90
error[E0747]: unresolved item provided when a constant was expected
91
- --> $DIR/missing-type-parameter2.rs:6 :8
91
+ --> $DIR/missing-type-parameter2.rs:3 :8
92
92
|
93
93
LL | impl X<N> {}
94
94
| ^
@@ -99,13 +99,13 @@ LL | impl X<{ N }> {}
99
99
| + +
100
100
101
101
error: defaults for const parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions
102
- --> $DIR/missing-type-parameter2.rs:9 :15
102
+ --> $DIR/missing-type-parameter2.rs:6 :15
103
103
|
104
104
LL | impl<T, const A: u8 = 2> X<N> {}
105
105
| ^
106
106
107
107
error[E0747]: unresolved item provided when a constant was expected
108
- --> $DIR/missing-type-parameter2.rs:9 :28
108
+ --> $DIR/missing-type-parameter2.rs:6 :28
109
109
|
110
110
LL | impl<T, const A: u8 = 2> X<N> {}
111
111
| ^
0 commit comments