| error: struct pattern is not needed for a unit variant |
| --> tests/ui/unneeded_struct_pattern.rs:14:13 |
| | |
| LL | None {} => 0, |
| | ^^^ help: remove the struct pattern |
| | |
| = note: `-D clippy::unneeded-struct-pattern` implied by `-D warnings` |
| = help: to override `-D warnings` add `#[allow(clippy::unneeded_struct_pattern)]` |
| |
| error: struct pattern is not needed for a unit variant |
| --> tests/ui/unneeded_struct_pattern.rs:20:13 |
| | |
| LL | None { .. } => 0, |
| | ^^^^^^^ help: remove the struct pattern |
| |
| error: struct pattern is not needed for a unit variant |
| --> tests/ui/unneeded_struct_pattern.rs:31:18 |
| | |
| LL | Some(None {}) => 0, |
| | ^^^ help: remove the struct pattern |
| |
| error: struct pattern is not needed for a unit variant |
| --> tests/ui/unneeded_struct_pattern.rs:33:13 |
| | |
| LL | None {} => 0, |
| | ^^^ help: remove the struct pattern |
| |
| error: struct pattern is not needed for a unit variant |
| --> tests/ui/unneeded_struct_pattern.rs:37:16 |
| | |
| LL | if let None {} = Some(0) {} |
| | ^^^ help: remove the struct pattern |
| |
| error: struct pattern is not needed for a unit variant |
| --> tests/ui/unneeded_struct_pattern.rs:39:16 |
| | |
| LL | if let None { .. } = Some(0) {} |
| | ^^^^^^^ help: remove the struct pattern |
| |
| error: struct pattern is not needed for a unit variant |
| --> tests/ui/unneeded_struct_pattern.rs:41:21 |
| | |
| LL | if let Some(None {}) = Some(Some(0)) {} |
| | ^^^ help: remove the struct pattern |
| |
| error: struct pattern is not needed for a unit variant |
| --> tests/ui/unneeded_struct_pattern.rs:43:13 |
| | |
| LL | let None {} = Some(0) else { panic!() }; |
| | ^^^ help: remove the struct pattern |
| |
| error: struct pattern is not needed for a unit variant |
| --> tests/ui/unneeded_struct_pattern.rs:45:13 |
| | |
| LL | let None { .. } = Some(0) else { panic!() }; |
| | ^^^^^^^ help: remove the struct pattern |
| |
| error: struct pattern is not needed for a unit variant |
| --> tests/ui/unneeded_struct_pattern.rs:47:18 |
| | |
| LL | let Some(None {}) = Some(Some(0)) else { panic!() }; |
| | ^^^ help: remove the struct pattern |
| |
| error: struct pattern is not needed for a unit variant |
| --> tests/ui/unneeded_struct_pattern.rs:64:27 |
| | |
| LL | Custom::NoBrackets {} => 0, |
| | ^^^ help: remove the struct pattern |
| |
| error: struct pattern is not needed for a unit variant |
| --> tests/ui/unneeded_struct_pattern.rs:65:40 |
| | |
| LL | Custom::NoBracketsNonExhaustive {} => 0, |
| | ^^^ help: remove the struct pattern |
| |
| error: struct pattern is not needed for a unit variant |
| --> tests/ui/unneeded_struct_pattern.rs:72:27 |
| | |
| LL | Custom::NoBrackets { .. } => 0, |
| | ^^^^^^^ help: remove the struct pattern |
| |
| error: struct pattern is not needed for a unit variant |
| --> tests/ui/unneeded_struct_pattern.rs:73:40 |
| | |
| LL | Custom::NoBracketsNonExhaustive { .. } => 0, |
| | ^^^^^^^ help: remove the struct pattern |
| |
| error: struct pattern is not needed for a unit variant |
| --> tests/ui/unneeded_struct_pattern.rs:78:27 |
| | |
| LL | Custom::NoBrackets {} if true => 0, |
| | ^^^ help: remove the struct pattern |
| |
| error: struct pattern is not needed for a unit variant |
| --> tests/ui/unneeded_struct_pattern.rs:83:27 |
| | |
| LL | Custom::NoBrackets {} | Custom::NoBracketsNonExhaustive {} => 0, |
| | ^^^ help: remove the struct pattern |
| |
| error: struct pattern is not needed for a unit variant |
| --> tests/ui/unneeded_struct_pattern.rs:83:64 |
| | |
| LL | Custom::NoBrackets {} | Custom::NoBracketsNonExhaustive {} => 0, |
| | ^^^ help: remove the struct pattern |
| |
| error: struct pattern is not needed for a unit variant |
| --> tests/ui/unneeded_struct_pattern.rs:98:30 |
| | |
| LL | if let Custom::NoBrackets {} = Custom::Init { |
| | ^^^ help: remove the struct pattern |
| |
| error: struct pattern is not needed for a unit variant |
| --> tests/ui/unneeded_struct_pattern.rs:102:30 |
| | |
| LL | if let Custom::NoBrackets { .. } = Custom::Init { |
| | ^^^^^^^ help: remove the struct pattern |
| |
| error: struct pattern is not needed for a unit variant |
| --> tests/ui/unneeded_struct_pattern.rs:106:30 |
| | |
| LL | if let Custom::NoBrackets {} | Custom::NoBracketsNonExhaustive {} = Custom::Init { |
| | ^^^ help: remove the struct pattern |
| |
| error: struct pattern is not needed for a unit variant |
| --> tests/ui/unneeded_struct_pattern.rs:106:67 |
| | |
| LL | if let Custom::NoBrackets {} | Custom::NoBracketsNonExhaustive {} = Custom::Init { |
| | ^^^ help: remove the struct pattern |
| |
| error: struct pattern is not needed for a unit variant |
| --> tests/ui/unneeded_struct_pattern.rs:111:43 |
| | |
| LL | if let Custom::NoBracketsNonExhaustive {} = Custom::Init { |
| | ^^^ help: remove the struct pattern |
| |
| error: struct pattern is not needed for a unit variant |
| --> tests/ui/unneeded_struct_pattern.rs:115:43 |
| | |
| LL | if let Custom::NoBracketsNonExhaustive { .. } = Custom::Init { |
| | ^^^^^^^ help: remove the struct pattern |
| |
| error: struct pattern is not needed for a unit variant |
| --> tests/ui/unneeded_struct_pattern.rs:131:27 |
| | |
| LL | let Custom::NoBrackets {} = Custom::Init else { panic!() }; |
| | ^^^ help: remove the struct pattern |
| |
| error: struct pattern is not needed for a unit variant |
| --> tests/ui/unneeded_struct_pattern.rs:133:27 |
| | |
| LL | let Custom::NoBrackets { .. } = Custom::Init else { |
| | ^^^^^^^ help: remove the struct pattern |
| |
| error: struct pattern is not needed for a unit variant |
| --> tests/ui/unneeded_struct_pattern.rs:137:40 |
| | |
| LL | let Custom::NoBracketsNonExhaustive {} = Custom::Init else { |
| | ^^^ help: remove the struct pattern |
| |
| error: struct pattern is not needed for a unit variant |
| --> tests/ui/unneeded_struct_pattern.rs:141:40 |
| | |
| LL | let Custom::NoBracketsNonExhaustive { .. } = Custom::Init else { |
| | ^^^^^^^ help: remove the struct pattern |
| |
| error: struct pattern is not needed for a unit variant |
| --> tests/ui/unneeded_struct_pattern.rs:150:44 |
| | |
| LL | fn pat_in_fn_param_1(Refutable::Variant {}: Refutable) {} |
| | ^^^ help: remove the struct pattern |
| |
| error: struct pattern is not needed for a unit variant |
| --> tests/ui/unneeded_struct_pattern.rs:151:44 |
| | |
| LL | fn pat_in_fn_param_2(Refutable::Variant { .. }: Refutable) {} |
| | ^^^^^^^ help: remove the struct pattern |
| |
| error: struct pattern is not needed for a unit variant |
| --> tests/ui/unneeded_struct_pattern.rs:153:27 |
| | |
| LL | for Refutable::Variant {} in [] {} |
| | ^^^ help: remove the struct pattern |
| |
| error: struct pattern is not needed for a unit variant |
| --> tests/ui/unneeded_struct_pattern.rs:154:27 |
| | |
| LL | for Refutable::Variant { .. } in [] {} |
| | ^^^^^^^ help: remove the struct pattern |
| |
| error: struct pattern is not needed for a unit variant |
| --> tests/ui/unneeded_struct_pattern.rs:168:23 |
| | |
| LL | ExhaustiveUnit { .. } => 0, |
| | ^^^^^^^ help: remove the struct pattern |
| |
| error: struct pattern is not needed for a unit variant |
| --> tests/ui/unneeded_struct_pattern.rs:174:23 |
| | |
| LL | ExhaustiveUnit {} => 0, |
| | ^^^ help: remove the struct pattern |
| |
| error: aborting due to 33 previous errors |
| |