]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/min_rust_version_attr.stderr
Auto merge of #102025 - chenyukang:fix-102002, r=jyn514
[rust.git] / src / tools / clippy / tests / ui / min_rust_version_attr.stderr
1 error: stripping a prefix manually
2   --> $DIR/min_rust_version_attr.rs:216:24
3    |
4 LL |             assert_eq!(s["hello, ".len()..].to_uppercase(), "WORLD!");
5    |                        ^^^^^^^^^^^^^^^^^^^^
6    |
7 note: the prefix was tested here
8   --> $DIR/min_rust_version_attr.rs:215:9
9    |
10 LL |         if s.starts_with("hello, ") {
11    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12    = note: `-D clippy::manual-strip` implied by `-D warnings`
13 help: try using the `strip_prefix` method
14    |
15 LL ~         if let Some(<stripped>) = s.strip_prefix("hello, ") {
16 LL ~             assert_eq!(<stripped>.to_uppercase(), "WORLD!");
17    |
18
19 error: stripping a prefix manually
20   --> $DIR/min_rust_version_attr.rs:228:24
21    |
22 LL |             assert_eq!(s["hello, ".len()..].to_uppercase(), "WORLD!");
23    |                        ^^^^^^^^^^^^^^^^^^^^
24    |
25 note: the prefix was tested here
26   --> $DIR/min_rust_version_attr.rs:227:9
27    |
28 LL |         if s.starts_with("hello, ") {
29    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
30 help: try using the `strip_prefix` method
31    |
32 LL ~         if let Some(<stripped>) = s.strip_prefix("hello, ") {
33 LL ~             assert_eq!(<stripped>.to_uppercase(), "WORLD!");
34    |
35
36 error: aborting due to 2 previous errors
37