mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-15 01:17:16 +00:00
eb3970285b
In order to switch `clippy::uninlined_format_args` from pedantic to style, all existing tests must not raise a warning. I did not want to change the actual tests, so this is a relatively minor change that: * add `#![allow(clippy::uninlined_format_args)]` where needed * normalizes all allow/deny/warn attributes * all allow attributes are grouped together * sorted alphabetically * the `clippy::*` attributes are listed separate from the other ones. * deny and warn attributes are listed before the allowed ones changelog: none
130 lines
5.1 KiB
Text
130 lines
5.1 KiB
Text
error: redundant pattern matching, consider using `is_ipv4()`
|
|
--> $DIR/redundant_pattern_matching_ipaddr.rs:17:12
|
|
|
|
|
LL | if let V4(_) = &ipaddr {}
|
|
| -------^^^^^---------- help: try this: `if ipaddr.is_ipv4()`
|
|
|
|
|
= note: `-D clippy::redundant-pattern-matching` implied by `-D warnings`
|
|
|
|
error: redundant pattern matching, consider using `is_ipv4()`
|
|
--> $DIR/redundant_pattern_matching_ipaddr.rs:19:12
|
|
|
|
|
LL | if let V4(_) = V4(Ipv4Addr::LOCALHOST) {}
|
|
| -------^^^^^-------------------------- help: try this: `if V4(Ipv4Addr::LOCALHOST).is_ipv4()`
|
|
|
|
error: redundant pattern matching, consider using `is_ipv6()`
|
|
--> $DIR/redundant_pattern_matching_ipaddr.rs:21:12
|
|
|
|
|
LL | if let V6(_) = V6(Ipv6Addr::LOCALHOST) {}
|
|
| -------^^^^^-------------------------- help: try this: `if V6(Ipv6Addr::LOCALHOST).is_ipv6()`
|
|
|
|
error: redundant pattern matching, consider using `is_ipv4()`
|
|
--> $DIR/redundant_pattern_matching_ipaddr.rs:23:15
|
|
|
|
|
LL | while let V4(_) = V4(Ipv4Addr::LOCALHOST) {}
|
|
| ----------^^^^^-------------------------- help: try this: `while V4(Ipv4Addr::LOCALHOST).is_ipv4()`
|
|
|
|
error: redundant pattern matching, consider using `is_ipv6()`
|
|
--> $DIR/redundant_pattern_matching_ipaddr.rs:25:15
|
|
|
|
|
LL | while let V6(_) = V6(Ipv6Addr::LOCALHOST) {}
|
|
| ----------^^^^^-------------------------- help: try this: `while V6(Ipv6Addr::LOCALHOST).is_ipv6()`
|
|
|
|
error: redundant pattern matching, consider using `is_ipv4()`
|
|
--> $DIR/redundant_pattern_matching_ipaddr.rs:35:5
|
|
|
|
|
LL | / match V4(Ipv4Addr::LOCALHOST) {
|
|
LL | | V4(_) => true,
|
|
LL | | V6(_) => false,
|
|
LL | | };
|
|
| |_____^ help: try this: `V4(Ipv4Addr::LOCALHOST).is_ipv4()`
|
|
|
|
error: redundant pattern matching, consider using `is_ipv6()`
|
|
--> $DIR/redundant_pattern_matching_ipaddr.rs:40:5
|
|
|
|
|
LL | / match V4(Ipv4Addr::LOCALHOST) {
|
|
LL | | V4(_) => false,
|
|
LL | | V6(_) => true,
|
|
LL | | };
|
|
| |_____^ help: try this: `V4(Ipv4Addr::LOCALHOST).is_ipv6()`
|
|
|
|
error: redundant pattern matching, consider using `is_ipv6()`
|
|
--> $DIR/redundant_pattern_matching_ipaddr.rs:45:5
|
|
|
|
|
LL | / match V6(Ipv6Addr::LOCALHOST) {
|
|
LL | | V4(_) => false,
|
|
LL | | V6(_) => true,
|
|
LL | | };
|
|
| |_____^ help: try this: `V6(Ipv6Addr::LOCALHOST).is_ipv6()`
|
|
|
|
error: redundant pattern matching, consider using `is_ipv4()`
|
|
--> $DIR/redundant_pattern_matching_ipaddr.rs:50:5
|
|
|
|
|
LL | / match V6(Ipv6Addr::LOCALHOST) {
|
|
LL | | V4(_) => true,
|
|
LL | | V6(_) => false,
|
|
LL | | };
|
|
| |_____^ help: try this: `V6(Ipv6Addr::LOCALHOST).is_ipv4()`
|
|
|
|
error: redundant pattern matching, consider using `is_ipv4()`
|
|
--> $DIR/redundant_pattern_matching_ipaddr.rs:55:20
|
|
|
|
|
LL | let _ = if let V4(_) = V4(Ipv4Addr::LOCALHOST) {
|
|
| -------^^^^^-------------------------- help: try this: `if V4(Ipv4Addr::LOCALHOST).is_ipv4()`
|
|
|
|
error: redundant pattern matching, consider using `is_ipv4()`
|
|
--> $DIR/redundant_pattern_matching_ipaddr.rs:63:20
|
|
|
|
|
LL | let _ = if let V4(_) = gen_ipaddr() {
|
|
| -------^^^^^--------------- help: try this: `if gen_ipaddr().is_ipv4()`
|
|
|
|
error: redundant pattern matching, consider using `is_ipv6()`
|
|
--> $DIR/redundant_pattern_matching_ipaddr.rs:65:19
|
|
|
|
|
LL | } else if let V6(_) = gen_ipaddr() {
|
|
| -------^^^^^--------------- help: try this: `if gen_ipaddr().is_ipv6()`
|
|
|
|
error: redundant pattern matching, consider using `is_ipv4()`
|
|
--> $DIR/redundant_pattern_matching_ipaddr.rs:77:12
|
|
|
|
|
LL | if let V4(_) = V4(Ipv4Addr::LOCALHOST) {}
|
|
| -------^^^^^-------------------------- help: try this: `if V4(Ipv4Addr::LOCALHOST).is_ipv4()`
|
|
|
|
error: redundant pattern matching, consider using `is_ipv6()`
|
|
--> $DIR/redundant_pattern_matching_ipaddr.rs:79:12
|
|
|
|
|
LL | if let V6(_) = V6(Ipv6Addr::LOCALHOST) {}
|
|
| -------^^^^^-------------------------- help: try this: `if V6(Ipv6Addr::LOCALHOST).is_ipv6()`
|
|
|
|
error: redundant pattern matching, consider using `is_ipv4()`
|
|
--> $DIR/redundant_pattern_matching_ipaddr.rs:81:15
|
|
|
|
|
LL | while let V4(_) = V4(Ipv4Addr::LOCALHOST) {}
|
|
| ----------^^^^^-------------------------- help: try this: `while V4(Ipv4Addr::LOCALHOST).is_ipv4()`
|
|
|
|
error: redundant pattern matching, consider using `is_ipv6()`
|
|
--> $DIR/redundant_pattern_matching_ipaddr.rs:83:15
|
|
|
|
|
LL | while let V6(_) = V6(Ipv6Addr::LOCALHOST) {}
|
|
| ----------^^^^^-------------------------- help: try this: `while V6(Ipv6Addr::LOCALHOST).is_ipv6()`
|
|
|
|
error: redundant pattern matching, consider using `is_ipv4()`
|
|
--> $DIR/redundant_pattern_matching_ipaddr.rs:85:5
|
|
|
|
|
LL | / match V4(Ipv4Addr::LOCALHOST) {
|
|
LL | | V4(_) => true,
|
|
LL | | V6(_) => false,
|
|
LL | | };
|
|
| |_____^ help: try this: `V4(Ipv4Addr::LOCALHOST).is_ipv4()`
|
|
|
|
error: redundant pattern matching, consider using `is_ipv6()`
|
|
--> $DIR/redundant_pattern_matching_ipaddr.rs:90:5
|
|
|
|
|
LL | / match V6(Ipv6Addr::LOCALHOST) {
|
|
LL | | V4(_) => false,
|
|
LL | | V6(_) => true,
|
|
LL | | };
|
|
| |_____^ help: try this: `V6(Ipv6Addr::LOCALHOST).is_ipv6()`
|
|
|
|
error: aborting due to 18 previous errors
|
|
|