Rollup merge of #69881 - Centril:fix-69485, r=oli-obk

VariantSizeDifferences: bail on SizeOverflow

Fixes #69485.

r? @oli-obk
This commit is contained in:
Mazdak Farrokhzad 2020-03-17 03:05:14 +01:00 committed by GitHub
commit 1b0c73baff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 4 deletions

View file

@ -0,0 +1,10 @@
// build-fail
// only-x86_64
fn main() {
Bug::V([0; !0]); //~ ERROR is too big for the current
}
enum Bug {
V([u8; !0]),
}

View file

@ -0,0 +1,8 @@
error: the type `[u8; 18446744073709551615]` is too big for the current architecture
--> $DIR/issue-69485-var-size-diffs-too-large.rs:5:12
|
LL | Bug::V([0; !0]);
| ^^^^^^^
error: aborting due to previous error