1 error[E0412]: cannot find type `N` in this scope
2 --> $DIR/missing-type-parameter2.rs:3:8
4 LL | struct X<const N: u8>();
5 | ------------------------ similarly named struct `X` defined here
10 help: a struct with a similar name exists
14 help: you might be missing a type parameter
19 error[E0412]: cannot find type `N` in this scope
20 --> $DIR/missing-type-parameter2.rs:6:28
22 LL | impl<T, const A: u8 = 2> X<N> {}
25 | similarly named type parameter `T` defined here
27 help: a type parameter with a similar name exists
29 LL | impl<T, const A: u8 = 2> X<T> {}
31 help: you might be missing a type parameter
33 LL | impl<T, const A: u8 = 2, N> X<N> {}
36 error[E0412]: cannot find type `T` in this scope
37 --> $DIR/missing-type-parameter2.rs:11:20
39 LL | struct X<const N: u8>();
40 | ------------------------ similarly named struct `X` defined here
42 LL | fn foo(_: T) where T: Send {}
45 help: a struct with a similar name exists
47 LL | fn foo(_: T) where X: Send {}
49 help: you might be missing a type parameter
51 LL | fn foo<T>(_: T) where T: Send {}
54 error[E0412]: cannot find type `T` in this scope
55 --> $DIR/missing-type-parameter2.rs:11:11
57 LL | struct X<const N: u8>();
58 | ------------------------ similarly named struct `X` defined here
60 LL | fn foo(_: T) where T: Send {}
63 help: a struct with a similar name exists
65 LL | fn foo(_: X) where T: Send {}
67 help: you might be missing a type parameter
69 LL | fn foo<T>(_: T) where T: Send {}
72 error[E0412]: cannot find type `A` in this scope
73 --> $DIR/missing-type-parameter2.rs:15:24
75 LL | struct X<const N: u8>();
76 | ------------------------ similarly named struct `X` defined here
78 LL | fn bar<const N: u8>(_: A) {}
81 help: a struct with a similar name exists
83 LL | fn bar<const N: u8>(_: X) {}
85 help: you might be missing a type parameter
87 LL | fn bar<const N: u8, A>(_: A) {}
90 error[E0747]: unresolved item provided when a constant was expected
91 --> $DIR/missing-type-parameter2.rs:3:8
96 help: if this generic argument was intended as a const parameter, surround it with braces
101 error: defaults for const parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions
102 --> $DIR/missing-type-parameter2.rs:6:9
104 LL | impl<T, const A: u8 = 2> X<N> {}
107 error[E0747]: unresolved item provided when a constant was expected
108 --> $DIR/missing-type-parameter2.rs:6:28
110 LL | impl<T, const A: u8 = 2> X<N> {}
113 help: if this generic argument was intended as a const parameter, surround it with braces
115 LL | impl<T, const A: u8 = 2> X<{ N }> {}
118 error: aborting due to 8 previous errors
120 Some errors have detailed explanations: E0412, E0747.
121 For more information about an error, try `rustc --explain E0412`.