]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/redundant_pattern_matching_ipaddr.stderr
Auto merge of #102536 - scottmcm:lookup_line-tweak, r=jackh726
[rust.git] / src / tools / clippy / tests / ui / redundant_pattern_matching_ipaddr.stderr
1 error: redundant pattern matching, consider using `is_ipv4()`
2   --> $DIR/redundant_pattern_matching_ipaddr.rs:17:12
3    |
4 LL |     if let V4(_) = &ipaddr {}
5    |     -------^^^^^---------- help: try this: `if ipaddr.is_ipv4()`
6    |
7    = note: `-D clippy::redundant-pattern-matching` implied by `-D warnings`
8
9 error: redundant pattern matching, consider using `is_ipv4()`
10   --> $DIR/redundant_pattern_matching_ipaddr.rs:19:12
11    |
12 LL |     if let V4(_) = V4(Ipv4Addr::LOCALHOST) {}
13    |     -------^^^^^-------------------------- help: try this: `if V4(Ipv4Addr::LOCALHOST).is_ipv4()`
14
15 error: redundant pattern matching, consider using `is_ipv6()`
16   --> $DIR/redundant_pattern_matching_ipaddr.rs:21:12
17    |
18 LL |     if let V6(_) = V6(Ipv6Addr::LOCALHOST) {}
19    |     -------^^^^^-------------------------- help: try this: `if V6(Ipv6Addr::LOCALHOST).is_ipv6()`
20
21 error: redundant pattern matching, consider using `is_ipv4()`
22   --> $DIR/redundant_pattern_matching_ipaddr.rs:23:15
23    |
24 LL |     while let V4(_) = V4(Ipv4Addr::LOCALHOST) {}
25    |     ----------^^^^^-------------------------- help: try this: `while V4(Ipv4Addr::LOCALHOST).is_ipv4()`
26
27 error: redundant pattern matching, consider using `is_ipv6()`
28   --> $DIR/redundant_pattern_matching_ipaddr.rs:25:15
29    |
30 LL |     while let V6(_) = V6(Ipv6Addr::LOCALHOST) {}
31    |     ----------^^^^^-------------------------- help: try this: `while V6(Ipv6Addr::LOCALHOST).is_ipv6()`
32
33 error: redundant pattern matching, consider using `is_ipv4()`
34   --> $DIR/redundant_pattern_matching_ipaddr.rs:35:5
35    |
36 LL | /     match V4(Ipv4Addr::LOCALHOST) {
37 LL | |         V4(_) => true,
38 LL | |         V6(_) => false,
39 LL | |     };
40    | |_____^ help: try this: `V4(Ipv4Addr::LOCALHOST).is_ipv4()`
41
42 error: redundant pattern matching, consider using `is_ipv6()`
43   --> $DIR/redundant_pattern_matching_ipaddr.rs:40:5
44    |
45 LL | /     match V4(Ipv4Addr::LOCALHOST) {
46 LL | |         V4(_) => false,
47 LL | |         V6(_) => true,
48 LL | |     };
49    | |_____^ help: try this: `V4(Ipv4Addr::LOCALHOST).is_ipv6()`
50
51 error: redundant pattern matching, consider using `is_ipv6()`
52   --> $DIR/redundant_pattern_matching_ipaddr.rs:45:5
53    |
54 LL | /     match V6(Ipv6Addr::LOCALHOST) {
55 LL | |         V4(_) => false,
56 LL | |         V6(_) => true,
57 LL | |     };
58    | |_____^ help: try this: `V6(Ipv6Addr::LOCALHOST).is_ipv6()`
59
60 error: redundant pattern matching, consider using `is_ipv4()`
61   --> $DIR/redundant_pattern_matching_ipaddr.rs:50:5
62    |
63 LL | /     match V6(Ipv6Addr::LOCALHOST) {
64 LL | |         V4(_) => true,
65 LL | |         V6(_) => false,
66 LL | |     };
67    | |_____^ help: try this: `V6(Ipv6Addr::LOCALHOST).is_ipv4()`
68
69 error: redundant pattern matching, consider using `is_ipv4()`
70   --> $DIR/redundant_pattern_matching_ipaddr.rs:55:20
71    |
72 LL |     let _ = if let V4(_) = V4(Ipv4Addr::LOCALHOST) {
73    |             -------^^^^^-------------------------- help: try this: `if V4(Ipv4Addr::LOCALHOST).is_ipv4()`
74
75 error: redundant pattern matching, consider using `is_ipv4()`
76   --> $DIR/redundant_pattern_matching_ipaddr.rs:63:20
77    |
78 LL |     let _ = if let V4(_) = gen_ipaddr() {
79    |             -------^^^^^--------------- help: try this: `if gen_ipaddr().is_ipv4()`
80
81 error: redundant pattern matching, consider using `is_ipv6()`
82   --> $DIR/redundant_pattern_matching_ipaddr.rs:65:19
83    |
84 LL |     } else if let V6(_) = gen_ipaddr() {
85    |            -------^^^^^--------------- help: try this: `if gen_ipaddr().is_ipv6()`
86
87 error: redundant pattern matching, consider using `is_ipv4()`
88   --> $DIR/redundant_pattern_matching_ipaddr.rs:77:12
89    |
90 LL |     if let V4(_) = V4(Ipv4Addr::LOCALHOST) {}
91    |     -------^^^^^-------------------------- help: try this: `if V4(Ipv4Addr::LOCALHOST).is_ipv4()`
92
93 error: redundant pattern matching, consider using `is_ipv6()`
94   --> $DIR/redundant_pattern_matching_ipaddr.rs:79:12
95    |
96 LL |     if let V6(_) = V6(Ipv6Addr::LOCALHOST) {}
97    |     -------^^^^^-------------------------- help: try this: `if V6(Ipv6Addr::LOCALHOST).is_ipv6()`
98
99 error: redundant pattern matching, consider using `is_ipv4()`
100   --> $DIR/redundant_pattern_matching_ipaddr.rs:81:15
101    |
102 LL |     while let V4(_) = V4(Ipv4Addr::LOCALHOST) {}
103    |     ----------^^^^^-------------------------- help: try this: `while V4(Ipv4Addr::LOCALHOST).is_ipv4()`
104
105 error: redundant pattern matching, consider using `is_ipv6()`
106   --> $DIR/redundant_pattern_matching_ipaddr.rs:83:15
107    |
108 LL |     while let V6(_) = V6(Ipv6Addr::LOCALHOST) {}
109    |     ----------^^^^^-------------------------- help: try this: `while V6(Ipv6Addr::LOCALHOST).is_ipv6()`
110
111 error: redundant pattern matching, consider using `is_ipv4()`
112   --> $DIR/redundant_pattern_matching_ipaddr.rs:85:5
113    |
114 LL | /     match V4(Ipv4Addr::LOCALHOST) {
115 LL | |         V4(_) => true,
116 LL | |         V6(_) => false,
117 LL | |     };
118    | |_____^ help: try this: `V4(Ipv4Addr::LOCALHOST).is_ipv4()`
119
120 error: redundant pattern matching, consider using `is_ipv6()`
121   --> $DIR/redundant_pattern_matching_ipaddr.rs:90:5
122    |
123 LL | /     match V6(Ipv6Addr::LOCALHOST) {
124 LL | |         V4(_) => false,
125 LL | |         V6(_) => true,
126 LL | |     };
127    | |_____^ help: try this: `V6(Ipv6Addr::LOCALHOST).is_ipv6()`
128
129 error: aborting due to 18 previous errors
130