11error: unexpected `const` parameter declaration
2- --> $DIR/const-param-decl-on-type-instead-of-impl.rs:2:18
2+ --> $DIR/const-param-decl-on-type-instead-of-impl.rs:2:12
33 |
44LL | impl NInts<const N: usize> {}
5- | ^ expected a `const` expression, not a parameter declaration
5+ | ^^^^^^^^^^^^^ ^ expected a `const` expression, not a parameter declaration
66 |
77help: `const` parameters must be declared for the `impl`
88 |
99LL | impl<const N: usize> NInts<N> {}
1010 | ++++++++++++++++ ~
1111
12+ error: unexpected `const` parameter declaration
13+ --> $DIR/const-param-decl-on-type-instead-of-impl.rs:8:17
14+ |
15+ LL | fn banana(a: <T<const N: usize>>::BAR) {}
16+ | ^^^^^^^^^^^^^^ expected a `const` expression, not a parameter declaration
17+
18+ error: unexpected `const` parameter declaration
19+ --> $DIR/const-param-decl-on-type-instead-of-impl.rs:12:26
20+ |
21+ LL | path::path::Struct::<const N: usize>()
22+ | ^^^^^^^^^^^^^^ expected a `const` expression, not a parameter declaration
23+
24+ error[E0433]: failed to resolve: use of undeclared crate or module `path`
25+ --> $DIR/const-param-decl-on-type-instead-of-impl.rs:12:5
26+ |
27+ LL | path::path::Struct::<const N: usize>()
28+ | ^^^^ use of undeclared crate or module `path`
29+
30+ error[E0412]: cannot find type `T` in this scope
31+ --> $DIR/const-param-decl-on-type-instead-of-impl.rs:8:15
32+ |
33+ LL | fn banana(a: <T<const N: usize>>::BAR) {}
34+ | ^ not found in this scope
35+
1236error[E0308]: mismatched types
1337 --> $DIR/const-param-decl-on-type-instead-of-impl.rs:5:17
1438 |
@@ -17,6 +41,7 @@ LL | let _: () = 42;
1741 | |
1842 | expected due to this
1943
20- error: aborting due to 2 previous errors
44+ error: aborting due to 6 previous errors
2145
22- For more information about this error, try `rustc --explain E0308`.
46+ Some errors have detailed explanations: E0308, E0412, E0433.
47+ For more information about an error, try `rustc --explain E0308`.
0 commit comments