-// 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.
-
-
-#![feature(tool_lints)]
-
+// 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]),
VariantOk(i32, u32),
ContainingLargeEnum(LargeEnum),
}
+
enum LargeEnum3 {
ContainingMoreThanOneField(i32, [i32; 8000], [i32; 9500]),
VoidVariant,
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!();
+}