Skip to content

Commit 8ae1114

Browse files
authored
Rollup merge of rust-lang#133785 - HypheX:add-ui-test, r=compiler-errors
Add const evaluation error UI test. This closes rust-lang#78834
2 parents 6827909 + 3b2ff90 commit 8ae1114

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed
+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
//Error output test for #78834: Type is too big for the target architecture
2+
struct B<
3+
A: Sized = [(); {
4+
let x = [0u8; !0usize];
5+
//~^ ERROR evaluation of constant value failed
6+
1
7+
}],
8+
> {
9+
a: A,
10+
}
11+
12+
fn main() {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
error[E0080]: evaluation of constant value failed
2+
--> $DIR/const-eval-fail-too-big.rs:4:28
3+
|
4+
LL | let x = [0u8; !0usize];
5+
| ^^^^^^^^^^^^^^ values of the type `[u8; usize::MAX]` are too big for the target architecture
6+
7+
error: aborting due to 1 previous error
8+
9+
For more information about this error, try `rustc --explain E0080`.

0 commit comments

Comments
 (0)