@@ -20,19 +20,31 @@ LL | if let V6(_) = V6(Ipv6Addr::LOCALHOST) {}
20
20
| -------^^^^^-------------------------- help: try: `if V6(Ipv6Addr::LOCALHOST).is_ipv6()`
21
21
22
22
error: redundant pattern matching, consider using `is_ipv4()`
23
- --> $DIR/redundant_pattern_matching_ipaddr.rs:21:15
23
+ --> $DIR/redundant_pattern_matching_ipaddr.rs:22:8
24
+ |
25
+ LL | if matches!(V4(Ipv4Addr::LOCALHOST), V4(_)) {}
26
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `V4(Ipv4Addr::LOCALHOST).is_ipv4()`
27
+
28
+ error: redundant pattern matching, consider using `is_ipv6()`
29
+ --> $DIR/redundant_pattern_matching_ipaddr.rs:25:8
30
+ |
31
+ LL | if matches!(V6(Ipv6Addr::LOCALHOST), V6(_)) {}
32
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `V6(Ipv6Addr::LOCALHOST).is_ipv6()`
33
+
34
+ error: redundant pattern matching, consider using `is_ipv4()`
35
+ --> $DIR/redundant_pattern_matching_ipaddr.rs:27:15
24
36
|
25
37
LL | while let V4(_) = V4(Ipv4Addr::LOCALHOST) {}
26
38
| ----------^^^^^-------------------------- help: try: `while V4(Ipv4Addr::LOCALHOST).is_ipv4()`
27
39
28
40
error: redundant pattern matching, consider using `is_ipv6()`
29
- --> $DIR/redundant_pattern_matching_ipaddr.rs:23 :15
41
+ --> $DIR/redundant_pattern_matching_ipaddr.rs:29 :15
30
42
|
31
43
LL | while let V6(_) = V6(Ipv6Addr::LOCALHOST) {}
32
44
| ----------^^^^^-------------------------- help: try: `while V6(Ipv6Addr::LOCALHOST).is_ipv6()`
33
45
34
46
error: redundant pattern matching, consider using `is_ipv4()`
35
- --> $DIR/redundant_pattern_matching_ipaddr.rs:33 :5
47
+ --> $DIR/redundant_pattern_matching_ipaddr.rs:39 :5
36
48
|
37
49
LL | / match V4(Ipv4Addr::LOCALHOST) {
38
50
LL | | V4(_) => true,
@@ -41,7 +53,7 @@ LL | | };
41
53
| |_____^ help: try: `V4(Ipv4Addr::LOCALHOST).is_ipv4()`
42
54
43
55
error: redundant pattern matching, consider using `is_ipv6()`
44
- --> $DIR/redundant_pattern_matching_ipaddr.rs:38 :5
56
+ --> $DIR/redundant_pattern_matching_ipaddr.rs:44 :5
45
57
|
46
58
LL | / match V4(Ipv4Addr::LOCALHOST) {
47
59
LL | | V4(_) => false,
@@ -50,7 +62,7 @@ LL | | };
50
62
| |_____^ help: try: `V4(Ipv4Addr::LOCALHOST).is_ipv6()`
51
63
52
64
error: redundant pattern matching, consider using `is_ipv6()`
53
- --> $DIR/redundant_pattern_matching_ipaddr.rs:43 :5
65
+ --> $DIR/redundant_pattern_matching_ipaddr.rs:49 :5
54
66
|
55
67
LL | / match V6(Ipv6Addr::LOCALHOST) {
56
68
LL | | V4(_) => false,
@@ -59,7 +71,7 @@ LL | | };
59
71
| |_____^ help: try: `V6(Ipv6Addr::LOCALHOST).is_ipv6()`
60
72
61
73
error: redundant pattern matching, consider using `is_ipv4()`
62
- --> $DIR/redundant_pattern_matching_ipaddr.rs:48 :5
74
+ --> $DIR/redundant_pattern_matching_ipaddr.rs:54 :5
63
75
|
64
76
LL | / match V6(Ipv6Addr::LOCALHOST) {
65
77
LL | | V4(_) => true,
@@ -68,49 +80,49 @@ LL | | };
68
80
| |_____^ help: try: `V6(Ipv6Addr::LOCALHOST).is_ipv4()`
69
81
70
82
error: redundant pattern matching, consider using `is_ipv4()`
71
- --> $DIR/redundant_pattern_matching_ipaddr.rs:53 :20
83
+ --> $DIR/redundant_pattern_matching_ipaddr.rs:59 :20
72
84
|
73
85
LL | let _ = if let V4(_) = V4(Ipv4Addr::LOCALHOST) {
74
86
| -------^^^^^-------------------------- help: try: `if V4(Ipv4Addr::LOCALHOST).is_ipv4()`
75
87
76
88
error: redundant pattern matching, consider using `is_ipv4()`
77
- --> $DIR/redundant_pattern_matching_ipaddr.rs:61 :20
89
+ --> $DIR/redundant_pattern_matching_ipaddr.rs:67 :20
78
90
|
79
91
LL | let _ = if let V4(_) = gen_ipaddr() {
80
92
| -------^^^^^--------------- help: try: `if gen_ipaddr().is_ipv4()`
81
93
82
94
error: redundant pattern matching, consider using `is_ipv6()`
83
- --> $DIR/redundant_pattern_matching_ipaddr.rs:63 :19
95
+ --> $DIR/redundant_pattern_matching_ipaddr.rs:69 :19
84
96
|
85
97
LL | } else if let V6(_) = gen_ipaddr() {
86
98
| -------^^^^^--------------- help: try: `if gen_ipaddr().is_ipv6()`
87
99
88
100
error: redundant pattern matching, consider using `is_ipv4()`
89
- --> $DIR/redundant_pattern_matching_ipaddr.rs:75 :12
101
+ --> $DIR/redundant_pattern_matching_ipaddr.rs:81 :12
90
102
|
91
103
LL | if let V4(_) = V4(Ipv4Addr::LOCALHOST) {}
92
104
| -------^^^^^-------------------------- help: try: `if V4(Ipv4Addr::LOCALHOST).is_ipv4()`
93
105
94
106
error: redundant pattern matching, consider using `is_ipv6()`
95
- --> $DIR/redundant_pattern_matching_ipaddr.rs:77 :12
107
+ --> $DIR/redundant_pattern_matching_ipaddr.rs:83 :12
96
108
|
97
109
LL | if let V6(_) = V6(Ipv6Addr::LOCALHOST) {}
98
110
| -------^^^^^-------------------------- help: try: `if V6(Ipv6Addr::LOCALHOST).is_ipv6()`
99
111
100
112
error: redundant pattern matching, consider using `is_ipv4()`
101
- --> $DIR/redundant_pattern_matching_ipaddr.rs:79 :15
113
+ --> $DIR/redundant_pattern_matching_ipaddr.rs:85 :15
102
114
|
103
115
LL | while let V4(_) = V4(Ipv4Addr::LOCALHOST) {}
104
116
| ----------^^^^^-------------------------- help: try: `while V4(Ipv4Addr::LOCALHOST).is_ipv4()`
105
117
106
118
error: redundant pattern matching, consider using `is_ipv6()`
107
- --> $DIR/redundant_pattern_matching_ipaddr.rs:81 :15
119
+ --> $DIR/redundant_pattern_matching_ipaddr.rs:87 :15
108
120
|
109
121
LL | while let V6(_) = V6(Ipv6Addr::LOCALHOST) {}
110
122
| ----------^^^^^-------------------------- help: try: `while V6(Ipv6Addr::LOCALHOST).is_ipv6()`
111
123
112
124
error: redundant pattern matching, consider using `is_ipv4()`
113
- --> $DIR/redundant_pattern_matching_ipaddr.rs:83 :5
125
+ --> $DIR/redundant_pattern_matching_ipaddr.rs:89 :5
114
126
|
115
127
LL | / match V4(Ipv4Addr::LOCALHOST) {
116
128
LL | | V4(_) => true,
@@ -119,13 +131,13 @@ LL | | };
119
131
| |_____^ help: try: `V4(Ipv4Addr::LOCALHOST).is_ipv4()`
120
132
121
133
error: redundant pattern matching, consider using `is_ipv6()`
122
- --> $DIR/redundant_pattern_matching_ipaddr.rs:88 :5
134
+ --> $DIR/redundant_pattern_matching_ipaddr.rs:94 :5
123
135
|
124
136
LL | / match V6(Ipv6Addr::LOCALHOST) {
125
137
LL | | V4(_) => false,
126
138
LL | | V6(_) => true,
127
139
LL | | };
128
140
| |_____^ help: try: `V6(Ipv6Addr::LOCALHOST).is_ipv6()`
129
141
130
- error: aborting due to 18 previous errors
142
+ error: aborting due to 20 previous errors
131
143
0 commit comments