]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/large_enum_variant.rs
Auto merge of #8374 - Alexendoo:bless-revisions, r=camsteffen
[rust.git] / tests / ui / large_enum_variant.rs
index 29a73e68d43d192a2e7ceaa32d2836c0d574216e..b45cc849eaec42b5796e35d196f55aee7d312e46 100644 (file)
@@ -1,16 +1,12 @@
-// Copyright 2014-2018 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution.
-//
-// 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.
+// aux-build:macro_rules.rs
 
 #![allow(dead_code)]
 #![allow(unused_variables)]
 #![warn(clippy::large_enum_variant)]
 
+#[macro_use]
+extern crate macro_rules;
+
 enum LargeEnum {
     A(i32),
     B([i32; 8000]),
@@ -39,6 +35,7 @@ enum LargeEnum2 {
     VariantOk(i32, u32),
     ContainingLargeEnum(LargeEnum),
 }
+
 enum LargeEnum3 {
     ContainingMoreThanOneField(i32, [i32; 8000], [i32; 9500]),
     VoidVariant,
@@ -60,4 +57,23 @@ enum LargeEnumOk {
     LargeB([i32; 8001]),
 }
 
-fn main() {}
+enum LargeEnum6 {
+    A,
+    B([u8; 255]),
+    C([u8; 200]),
+}
+
+enum LargeEnum7 {
+    A,
+    B([u8; 1255]),
+    C([u8; 200]),
+}
+
+enum LargeEnum8 {
+    VariantOk(i32, u32),
+    ContainingMoreThanOneField([i32; 8000], [i32; 2], [i32; 9500], [i32; 30]),
+}
+
+fn main() {
+    large_enum_variant!();
+}