diff options
| author | Ralf Jung <post@ralfj.de> | 2025-01-08 08:52:24 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-08 08:52:24 +0000 |
| commit | 8edcd9374a26cffa9474ce92d79c64892caef146 (patch) | |
| tree | 36b4829675d832d323283fc37457f6509f8a519c /src/tools/clippy/tests/ui/trailing_empty_array.rs | |
| parent | 16a26f9b4658c3481d231241a6c6130edc9a6de7 (diff) | |
| parent | 2d180714e14b34e36bf883bdf706ebaf5fa96754 (diff) | |
| download | rust-8edcd9374a26cffa9474ce92d79c64892caef146.tar.gz rust-8edcd9374a26cffa9474ce92d79c64892caef146.zip | |
Merge pull request #4127 from rust-lang/rustup-2025-01-08
Automatic Rustup
Diffstat (limited to 'src/tools/clippy/tests/ui/trailing_empty_array.rs')
| -rw-r--r-- | src/tools/clippy/tests/ui/trailing_empty_array.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/tools/clippy/tests/ui/trailing_empty_array.rs b/src/tools/clippy/tests/ui/trailing_empty_array.rs index 309a5920dfd..ea3b8ff01af 100644 --- a/src/tools/clippy/tests/ui/trailing_empty_array.rs +++ b/src/tools/clippy/tests/ui/trailing_empty_array.rs @@ -193,3 +193,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], + } + } +} |
