]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/cannot-infer-type-for-const-param.stderr
1b5d9b173de14729ae85643ca9b9dbcfab221cea
[rust.git] / src / test / ui / const-generics / cannot-infer-type-for-const-param.stderr
1 warning: the feature `const_generics` is incomplete and may cause the compiler to crash
2   --> $DIR/cannot-infer-type-for-const-param.rs:1:12
3    |
4 LL | #![feature(const_generics)]
5    |            ^^^^^^^^^^^^^^
6
7 error[E0282]: type annotations needed
8   --> $DIR/cannot-infer-type-for-const-param.rs:10:19
9    |
10 LL |     let _ = Foo::<3>([1, 2, 3]);
11    |                   ^ cannot infer type for `{integer}`
12
13 error[E0308]: mismatched types
14   --> $DIR/cannot-infer-type-for-const-param.rs:10:22
15    |
16 LL |     let _ = Foo::<3>([1, 2, 3]);
17    |                      ^^^^^^^^^ expected `Const { ty: usize, val: Unevaluated(DefId(0:18 ~ cannot_infer_type_for_const_param[317d]::main[0]::{{constant}}[0]), []) }`, found `Const { ty: usize, val: Scalar(Bits { size: 8, bits: 3 }) }`
18    |
19    = note: expected type `[u8; _]`
20               found type `[u8; 3]`
21
22 error: aborting due to 2 previous errors
23
24 Some errors have detailed explanations: E0282, E0308.
25 For more information about an error, try `rustc --explain E0282`.