Fix test after rebase
This commit is contained in:
parent
57ff5899d2
commit
cfa1f80cd9
2 changed files with 13 additions and 2 deletions
|
@ -8,4 +8,5 @@ struct Foo<const NUM_BYTES: usize>(pub [u8; NUM_BYTES]);
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let _ = Foo::<3>([1, 2, 3]); //~ ERROR type annotations needed
|
let _ = Foo::<3>([1, 2, 3]); //~ ERROR type annotations needed
|
||||||
|
//~^ ERROR mismatched types
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,16 @@ error[E0282]: type annotations needed
|
||||||
LL | let _ = Foo::<3>([1, 2, 3]);
|
LL | let _ = Foo::<3>([1, 2, 3]);
|
||||||
| ^ cannot infer type for `{integer}`
|
| ^ cannot infer type for `{integer}`
|
||||||
|
|
||||||
error: aborting due to previous error
|
error[E0308]: mismatched types
|
||||||
|
--> $DIR/cannot-infer-type-for-const-param.rs:10:22
|
||||||
|
|
|
||||||
|
LL | let _ = Foo::<3>([1, 2, 3]);
|
||||||
|
| ^^^^^^^^^ 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 }) }`
|
||||||
|
|
|
||||||
|
= note: expected type `[u8; _]`
|
||||||
|
found type `[u8; 3]`
|
||||||
|
|
||||||
For more information about this error, try `rustc --explain E0282`.
|
error: aborting due to 2 previous errors
|
||||||
|
|
||||||
|
Some errors have detailed explanations: E0282, E0308.
|
||||||
|
For more information about an error, try `rustc --explain E0282`.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue