]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/case_sensitive_file_extension_comparisons.stderr
Auto merge of #107843 - bjorn3:sync_cg_clif-2023-02-09, r=bjorn3
[rust.git] / src / tools / clippy / tests / ui / case_sensitive_file_extension_comparisons.stderr
1 error: case-sensitive file extension comparison
2   --> $DIR/case_sensitive_file_extension_comparisons.rs:14:5
3    |
4 LL |     filename.ends_with(".rs")
5    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
6    |
7    = help: consider using a case-insensitive comparison instead
8    = note: `-D clippy::case-sensitive-file-extension-comparisons` implied by `-D warnings`
9 help: use std::path::Path
10    |
11 LL ~     std::path::Path::new(filename)
12 LL +         .extension()
13 LL +         .map_or(false, |ext| ext.eq_ignore_ascii_case("rs"))
14    |
15
16 error: case-sensitive file extension comparison
17   --> $DIR/case_sensitive_file_extension_comparisons.rs:19:13
18    |
19 LL |     let _ = String::new().ends_with(".ext12");
20    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
21    |
22    = help: consider using a case-insensitive comparison instead
23 help: use std::path::Path
24    |
25 LL ~     let _ = std::path::Path::new(&String::new())
26 LL +         .extension()
27 LL ~         .map_or(false, |ext| ext.eq_ignore_ascii_case("ext12"));
28    |
29
30 error: case-sensitive file extension comparison
31   --> $DIR/case_sensitive_file_extension_comparisons.rs:20:13
32    |
33 LL |     let _ = "str".ends_with(".ext12");
34    |             ^^^^^^^^^^^^^^^^^^^^^^^^^
35    |
36    = help: consider using a case-insensitive comparison instead
37 help: use std::path::Path
38    |
39 LL ~     let _ = std::path::Path::new("str")
40 LL +         .extension()
41 LL ~         .map_or(false, |ext| ext.eq_ignore_ascii_case("ext12"));
42    |
43
44 error: case-sensitive file extension comparison
45   --> $DIR/case_sensitive_file_extension_comparisons.rs:24:17
46    |
47 LL |         let _ = "str".ends_with(".ext12");
48    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^
49    |
50    = help: consider using a case-insensitive comparison instead
51 help: use std::path::Path
52    |
53 LL ~         let _ = std::path::Path::new("str")
54 LL +             .extension()
55 LL ~             .map_or(false, |ext| ext.eq_ignore_ascii_case("ext12"));
56    |
57
58 error: case-sensitive file extension comparison
59   --> $DIR/case_sensitive_file_extension_comparisons.rs:31:13
60    |
61 LL |     let _ = String::new().ends_with(".EXT12");
62    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
63    |
64    = help: consider using a case-insensitive comparison instead
65 help: use std::path::Path
66    |
67 LL ~     let _ = std::path::Path::new(&String::new())
68 LL +         .extension()
69 LL ~         .map_or(false, |ext| ext.eq_ignore_ascii_case("EXT12"));
70    |
71
72 error: case-sensitive file extension comparison
73   --> $DIR/case_sensitive_file_extension_comparisons.rs:32:13
74    |
75 LL |     let _ = "str".ends_with(".EXT12");
76    |             ^^^^^^^^^^^^^^^^^^^^^^^^^
77    |
78    = help: consider using a case-insensitive comparison instead
79 help: use std::path::Path
80    |
81 LL ~     let _ = std::path::Path::new("str")
82 LL +         .extension()
83 LL ~         .map_or(false, |ext| ext.eq_ignore_ascii_case("EXT12"));
84    |
85
86 error: aborting due to 6 previous errors
87