mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-01 03:03:40 +00:00
7fddac0404
added documentation minor style fix change as to ::from add ignore to doc include threshold in lint message/make suggestion more apparent/use Scalar api instead of matching style fix shange snippet_opt to snippet
31 lines
515 B
Rust
31 lines
515 B
Rust
#![warn(clippy::large_stack_arrays)]
|
|
#![allow(clippy::large_enum_variant)]
|
|
|
|
#[derive(Clone, Copy)]
|
|
struct S {
|
|
pub data: [u64; 32],
|
|
}
|
|
|
|
#[derive(Clone, Copy)]
|
|
enum E {
|
|
S(S),
|
|
T(u32),
|
|
}
|
|
|
|
fn main() {
|
|
let bad = (
|
|
[0u32; 20_000_000],
|
|
[S { data: [0; 32] }; 5000],
|
|
[Some(""); 20_000_000],
|
|
[E::T(0); 5000],
|
|
);
|
|
|
|
let good = (
|
|
[0u32; 1000],
|
|
[S { data: [0; 32] }; 1000],
|
|
[Some(""); 1000],
|
|
[E::T(0); 1000],
|
|
[(); 20_000_000],
|
|
);
|
|
}
|