1
1
error: 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
3
3
|
4
4
LL | impl NInts<const N: usize> {}
5
- | ^ expected a `const` expression, not a parameter declaration
5
+ | ^^^^^^^^^^^^^ ^ expected a `const` expression, not a parameter declaration
6
6
|
7
7
help: `const` parameters must be declared for the `impl`
8
8
|
9
9
LL | impl<const N: usize> NInts<N> {}
10
10
| ++++++++++++++++ ~
11
11
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
+
12
36
error[E0308]: mismatched types
13
37
--> $DIR/const-param-decl-on-type-instead-of-impl.rs:5:17
14
38
|
@@ -17,6 +41,7 @@ LL | let _: () = 42;
17
41
| |
18
42
| expected due to this
19
43
20
- error: aborting due to 2 previous errors
44
+ error: aborting due to 6 previous errors
21
45
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