diff options
| author | Philipp Krones <hello@philkrones.com> | 2025-01-09 18:00:37 +0100 |
|---|---|---|
| committer | Philipp Krones <hello@philkrones.com> | 2025-01-09 18:00:37 +0100 |
| commit | b5bf09e57afa50a2ecc9bfc07bad4ef64d9df447 (patch) | |
| tree | cf262aea51c147a0348a7112966198ea63fc0303 /tests/ui/trailing_empty_array.rs | |
| parent | 11f38ade90a2e1f9cee925260ffbe8bc0e3ad761 (diff) | |
| parent | 894e87cd5160a2198940a35dc105ce6e46d9763e (diff) | |
| download | rust-b5bf09e57afa50a2ecc9bfc07bad4ef64d9df447.tar.gz rust-b5bf09e57afa50a2ecc9bfc07bad4ef64d9df447.zip | |
Merge remote-tracking branch 'upstream/master' into rustup
Diffstat (limited to 'tests/ui/trailing_empty_array.rs')
| -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 309a5920dfd..ea3b8ff01af 100644 --- a/tests/ui/trailing_empty_array.rs +++ b/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], + } + } +} |
