Do not trigger trailing_empty_array in tests (#13844)
Close #13837 changelog: [`trailing_empty_array`]: do not trigger on tests
This commit is contained in:
commit
786f090bb9
2 changed files with 19 additions and 2 deletions
|
|
@ -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],
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue