diff options
| author | bors <bors@rust-lang.org> | 2016-07-12 01:06:34 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-07-12 01:06:34 -0700 |
| commit | 5c69a4f619fb4f71f2497f7ee4a25a34a374da4d (patch) | |
| tree | 8f963605d1c5da5cb3ec933e2e09c36f8b2aea49 /src/test | |
| parent | 2539c15b49530e882a3e8803b3f53a7914d367be (diff) | |
| parent | fd2b65ee701d424f0f2dbdbb89b5eba5fb9bace4 (diff) | |
| download | rust-5c69a4f619fb4f71f2497f7ee4a25a34a374da4d.tar.gz rust-5c69a4f619fb4f71f2497f7ee4a25a34a374da4d.zip | |
Auto merge of #34755 - jonas-schievink:minor-differences, r=eddyb
Move variant_size_differences out of trans Also enhances the error message a bit, fixes #30505 on the way, and adds a test (which was missing). Closes #34018
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/compile-fail/variant-size-differences.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/test/compile-fail/variant-size-differences.rs b/src/test/compile-fail/variant-size-differences.rs new file mode 100644 index 00000000000..f2cffeefe90 --- /dev/null +++ b/src/test/compile-fail/variant-size-differences.rs @@ -0,0 +1,18 @@ +// Copyright 2016 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +#![deny(variant_size_differences)] + +enum _En { + V0(u8), + VBig([u8; 1024]), //~ ERROR variant is more than three times larger +} + +fn main() {} |
