Skip to content

Commit cfa1f80

Browse files
committed
Fix test after rebase
1 parent 57ff589 commit cfa1f80

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

src/test/ui/const-generics/cannot-infer-type-for-const-param.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ struct Foo<const NUM_BYTES: usize>(pub [u8; NUM_BYTES]);
88

99
fn main() {
1010
let _ = Foo::<3>([1, 2, 3]); //~ ERROR type annotations needed
11+
//~^ ERROR mismatched types
1112
}

src/test/ui/const-generics/cannot-infer-type-for-const-param.stderr

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,16 @@ error[E0282]: type annotations needed
1010
LL | let _ = Foo::<3>([1, 2, 3]);
1111
| ^ cannot infer type for `{integer}`
1212

13-
error: aborting due to previous error
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
1423

15-
For more information about this error, try `rustc --explain E0282`.
24+
Some errors have detailed explanations: E0282, E0308.
25+
For more information about an error, try `rustc --explain E0282`.

0 commit comments

Comments
 (0)