1
1
error: case-sensitive file extension comparison
2
- --> tests/ui/case_sensitive_file_extension_comparisons.rs:14 :5
2
+ --> tests/ui/case_sensitive_file_extension_comparisons.rs:13 :5
3
3
|
4
4
LL | filename.ends_with(".rs")
5
5
| ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -11,11 +11,11 @@ help: use std::path::Path
11
11
|
12
12
LL ~ std::path::Path::new(filename)
13
13
LL + .extension()
14
- LL + .map_or(false, |ext| ext.eq_ignore_ascii_case("rs"))
14
+ LL + .is_some_and( |ext| ext.eq_ignore_ascii_case("rs"))
15
15
|
16
16
17
17
error: case-sensitive file extension comparison
18
- --> tests/ui/case_sensitive_file_extension_comparisons.rs:20 :13
18
+ --> tests/ui/case_sensitive_file_extension_comparisons.rs:19 :13
19
19
|
20
20
LL | let _ = String::new().ends_with(".ext12");
21
21
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -25,11 +25,11 @@ help: use std::path::Path
25
25
|
26
26
LL ~ let _ = std::path::Path::new(&String::new())
27
27
LL + .extension()
28
- LL ~ .map_or(false, |ext| ext.eq_ignore_ascii_case("ext12"));
28
+ LL ~ .is_some_and( |ext| ext.eq_ignore_ascii_case("ext12"));
29
29
|
30
30
31
31
error: case-sensitive file extension comparison
32
- --> tests/ui/case_sensitive_file_extension_comparisons.rs:22 :13
32
+ --> tests/ui/case_sensitive_file_extension_comparisons.rs:21 :13
33
33
|
34
34
LL | let _ = "str".ends_with(".ext12");
35
35
| ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -39,11 +39,11 @@ help: use std::path::Path
39
39
|
40
40
LL ~ let _ = std::path::Path::new("str")
41
41
LL + .extension()
42
- LL ~ .map_or(false, |ext| ext.eq_ignore_ascii_case("ext12"));
42
+ LL ~ .is_some_and( |ext| ext.eq_ignore_ascii_case("ext12"));
43
43
|
44
44
45
45
error: case-sensitive file extension comparison
46
- --> tests/ui/case_sensitive_file_extension_comparisons.rs:27 :17
46
+ --> tests/ui/case_sensitive_file_extension_comparisons.rs:26 :17
47
47
|
48
48
LL | let _ = "str".ends_with(".ext12");
49
49
| ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -53,11 +53,11 @@ help: use std::path::Path
53
53
|
54
54
LL ~ let _ = std::path::Path::new("str")
55
55
LL + .extension()
56
- LL ~ .map_or(false, |ext| ext.eq_ignore_ascii_case("ext12"));
56
+ LL ~ .is_some_and( |ext| ext.eq_ignore_ascii_case("ext12"));
57
57
|
58
58
59
59
error: case-sensitive file extension comparison
60
- --> tests/ui/case_sensitive_file_extension_comparisons.rs:35 :13
60
+ --> tests/ui/case_sensitive_file_extension_comparisons.rs:34 :13
61
61
|
62
62
LL | let _ = String::new().ends_with(".EXT12");
63
63
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -67,11 +67,11 @@ help: use std::path::Path
67
67
|
68
68
LL ~ let _ = std::path::Path::new(&String::new())
69
69
LL + .extension()
70
- LL ~ .map_or(false, |ext| ext.eq_ignore_ascii_case("EXT12"));
70
+ LL ~ .is_some_and( |ext| ext.eq_ignore_ascii_case("EXT12"));
71
71
|
72
72
73
73
error: case-sensitive file extension comparison
74
- --> tests/ui/case_sensitive_file_extension_comparisons.rs:37 :13
74
+ --> tests/ui/case_sensitive_file_extension_comparisons.rs:36 :13
75
75
|
76
76
LL | let _ = "str".ends_with(".EXT12");
77
77
| ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -81,8 +81,22 @@ help: use std::path::Path
81
81
|
82
82
LL ~ let _ = std::path::Path::new("str")
83
83
LL + .extension()
84
- LL ~ .map_or(false, |ext| ext.eq_ignore_ascii_case("EXT12"));
84
+ LL ~ .is_some_and(|ext| ext.eq_ignore_ascii_case("EXT12"));
85
+ |
86
+
87
+ error: case-sensitive file extension comparison
88
+ --> tests/ui/case_sensitive_file_extension_comparisons.rs:69:13
89
+ |
90
+ LL | let _ = String::new().ends_with(".ext12");
91
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
92
+ |
93
+ = help: consider using a case-insensitive comparison instead
94
+ help: use std::path::Path
95
+ |
96
+ LL ~ let _ = std::path::Path::new(&String::new())
97
+ LL + .extension()
98
+ LL ~ .map_or(false, |ext| ext.eq_ignore_ascii_case("ext12"));
85
99
|
86
100
87
- error: aborting due to 6 previous errors
101
+ error: aborting due to 7 previous errors
88
102
0 commit comments