diff options
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], + } + } +} |
