]> git.lizzy.rs Git - rust.git/blob - src/test/ui/parser/const-param-decl-on-type-instead-of-impl.stderr
Rollup merge of #91699 - jsha:webkit-appearance-search-input, r=GuillaumeGomez
[rust.git] / src / test / ui / parser / const-param-decl-on-type-instead-of-impl.stderr
1 error: unexpected `const` parameter declaration
2   --> $DIR/const-param-decl-on-type-instead-of-impl.rs:2:12
3    |
4 LL | impl NInts<const N: usize> {}
5    |            ^^^^^^^^^^^^^^ expected a `const` expression, not a parameter declaration
6    |
7 help: `const` parameters must be declared for the `impl`
8    |
9 LL | impl<const N: usize> NInts<N> {}
10    |     ++++++++++++++++       ~
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
36 error[E0308]: mismatched types
37   --> $DIR/const-param-decl-on-type-instead-of-impl.rs:5:17
38    |
39 LL |     let _: () = 42;
40    |            --   ^^ expected `()`, found integer
41    |            |
42    |            expected due to this
43
44 error: aborting due to 6 previous errors
45
46 Some errors have detailed explanations: E0308, E0412, E0433.
47 For more information about an error, try `rustc --explain E0308`.