diff options
| author | Alexey Semenyuk <alexsemenyuk88@gmail.com> | 2024-12-17 14:16:48 +0500 |
|---|---|---|
| committer | Alexey Semenyuk <alexsemenyuk88@gmail.com> | 2024-12-17 14:16:48 +0500 |
| commit | a5d5edc581be1ba1c598f9313e309263bc7360b3 (patch) | |
| tree | 3d238fda801e4fecf0053b10afc98c4eac0efdde /tests | |
| parent | c2d23ad0df5b3603ea0a1d2f4892fb84faaf8a3f (diff) | |
| download | rust-a5d5edc581be1ba1c598f9313e309263bc7360b3.tar.gz rust-a5d5edc581be1ba1c598f9313e309263bc7360b3.zip | |
Do not trigger trailing_empty_array in tests
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ui/trailing_empty_array.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/ui/trailing_empty_array.rs b/tests/ui/trailing_empty_array.rs index 3d06c262168..560438b882c 100644 --- a/tests/ui/trailing_empty_array.rs +++ b/tests/ui/trailing_empty_array.rs @@ -192,3 +192,17 @@ type C = ConstParamNoDefault<0>; type D = ConstParamNonZeroDefault<0>; fn main() {} + +#[cfg(test)] +mod tests { + pub struct Friend { + age: u8, + } + + #[test] + fn oldest_empty_is_none() { + struct Michael { + friends: [Friend; 0], + } + } +} |
