@@ -30,26 +30,62 @@ LL | impl<T, const A: u8 = 2> X<T> {}
3030 | ^
3131help: you might be missing a type parameter
3232 |
33- LL | impl<T, const A, N: u8 = 2> X<N> {}
34- | ^^^
33+ LL | impl<T, const A: u8 = 2, N> X<N> {}
34+ | ^^^
35+
36+ error[E0412]: cannot find type `T` in this scope
37+ --> $DIR/missing-type-parameter2.rs:14:20
38+ |
39+ LL | struct X<const N: u8>();
40+ | ------------------------ similarly named struct `X` defined here
41+ ...
42+ LL | fn foo(_: T) where T: Send {}
43+ | ^
44+ |
45+ help: a struct with a similar name exists
46+ |
47+ LL | fn foo(_: T) where X: Send {}
48+ | ^
49+ help: you might be missing a type parameter
50+ |
51+ LL | fn foo<T>(_: T) where T: Send {}
52+ | ^^^
53+
54+ error[E0412]: cannot find type `T` in this scope
55+ --> $DIR/missing-type-parameter2.rs:14:11
56+ |
57+ LL | struct X<const N: u8>();
58+ | ------------------------ similarly named struct `X` defined here
59+ ...
60+ LL | fn foo(_: T) where T: Send {}
61+ | ^
62+ |
63+ help: a struct with a similar name exists
64+ |
65+ LL | fn foo(_: X) where T: Send {}
66+ | ^
67+ help: you might be missing a type parameter
68+ |
69+ LL | fn foo<T>(_: T) where T: Send {}
70+ | ^^^
3571
3672error[E0412]: cannot find type `A` in this scope
37- --> $DIR/missing-type-parameter2.rs:14 :24
73+ --> $DIR/missing-type-parameter2.rs:18 :24
3874 |
3975LL | struct X<const N: u8>();
4076 | ------------------------ similarly named struct `X` defined here
4177...
42- LL | fn bar<const N: u8>(a : A) {}
78+ LL | fn bar<const N: u8>(_ : A) {}
4379 | ^
4480 |
4581help: a struct with a similar name exists
4682 |
47- LL | fn bar<const N: u8>(a : X) {}
83+ LL | fn bar<const N: u8>(_ : X) {}
4884 | ^
4985help: you might be missing a type parameter
5086 |
51- LL | fn bar<const N, A : u8>(a : A) {}
52- | ^^^
87+ LL | fn bar<const N: u8, A>(_ : A) {}
88+ | ^^^
5389
5490error[E0747]: unresolved item provided when a constant was expected
5591 --> $DIR/missing-type-parameter2.rs:6:8
@@ -79,7 +115,7 @@ help: if this generic argument was intended as a const parameter, surround it wi
79115LL | impl<T, const A: u8 = 2> X<{ N }> {}
80116 | ^ ^
81117
82- error: aborting due to 6 previous errors
118+ error: aborting due to 8 previous errors
83119
84120Some errors have detailed explanations: E0412, E0747.
85121For more information about an error, try `rustc --explain E0412`.
0 commit comments