1 error[E0412]: cannot find type `N` in this scope
2 --> $DIR/diagnostics.rs:7:16
4 LL | struct A<const N: u8>;
5 | ---------------------- similarly named struct `A` defined here
7 LL | impl Foo for A<N> {}
10 help: a struct with a similar name exists
12 LL | impl Foo for A<A> {}
14 help: you might be missing a type parameter
16 LL | impl<N> Foo for A<N> {}
19 error[E0412]: cannot find type `T` in this scope
20 --> $DIR/diagnostics.rs:16:32
22 LL | struct A<const N: u8>;
23 | ---------------------- similarly named struct `A` defined here
25 LL | impl<const N: u8> Foo for C<N, T> {}
28 help: a struct with a similar name exists
30 LL | impl<const N: u8> Foo for C<N, A> {}
32 help: you might be missing a type parameter
34 LL | impl<const N: u8, T> Foo for C<N, T> {}
37 error[E0747]: unresolved item provided when a constant was expected
38 --> $DIR/diagnostics.rs:7:16
40 LL | impl Foo for A<N> {}
43 help: if this generic argument was intended as a const parameter, surround it with braces
45 LL | impl Foo for A<{ N }> {}
48 error[E0747]: type provided when a constant was expected
49 --> $DIR/diagnostics.rs:12:19
51 LL | impl<N> Foo for B<N> {}
54 help: consider changing this type parameter to be a `const` generic
56 LL | impl<const N: u8> Foo for B<N> {}
59 error[E0747]: unresolved item provided when a constant was expected
60 --> $DIR/diagnostics.rs:16:32
62 LL | impl<const N: u8> Foo for C<N, T> {}
65 help: if this generic argument was intended as a const parameter, surround it with braces
67 LL | impl<const N: u8> Foo for C<N, { T }> {}
70 error: aborting due to 5 previous errors
72 Some errors have detailed explanations: E0412, E0747.
73 For more information about an error, try `rustc --explain E0412`.