summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/min_rust_version_attr.stderr
blob: b1c23b539ffdeb9fc62a262deb39656f6b314967 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
error: stripping a prefix manually
  --> $DIR/min_rust_version_attr.rs:204:24
   |
LL |             assert_eq!(s["hello, ".len()..].to_uppercase(), "WORLD!");
   |                        ^^^^^^^^^^^^^^^^^^^^
   |
   = note: `-D clippy::manual-strip` implied by `-D warnings`
note: the prefix was tested here
  --> $DIR/min_rust_version_attr.rs:203:9
   |
LL |         if s.starts_with("hello, ") {
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: try using the `strip_prefix` method
   |
LL ~         if let Some(<stripped>) = s.strip_prefix("hello, ") {
LL ~             assert_eq!(<stripped>.to_uppercase(), "WORLD!");
   |

error: stripping a prefix manually
  --> $DIR/min_rust_version_attr.rs:216:24
   |
LL |             assert_eq!(s["hello, ".len()..].to_uppercase(), "WORLD!");
   |                        ^^^^^^^^^^^^^^^^^^^^
   |
note: the prefix was tested here
  --> $DIR/min_rust_version_attr.rs:215:9
   |
LL |         if s.starts_with("hello, ") {
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: try using the `strip_prefix` method
   |
LL ~         if let Some(<stripped>) = s.strip_prefix("hello, ") {
LL ~             assert_eq!(<stripped>.to_uppercase(), "WORLD!");
   |

error: aborting due to 2 previous errors