about summary refs log tree commit diff
path: root/src/tools/clippy/tests/ui/unnecessary_to_owned_on_split.stderr
blob: 5e4fbb1035d69286236b73c5e9e8e5b8b48d8468 (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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
error: unnecessary use of `to_string`
  --> tests/ui/unnecessary_to_owned_on_split.rs:19:13
   |
LL |     let _ = "a".to_string().split('a').next().unwrap();
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `"a".split('a')`
   |
   = note: `-D clippy::unnecessary-to-owned` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::unnecessary_to_owned)]`

error: unnecessary use of `to_string`
  --> tests/ui/unnecessary_to_owned_on_split.rs:22:13
   |
LL |     let _ = "a".to_string().split("a").next().unwrap();
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `"a".split("a")`

error: unnecessary use of `to_owned`
  --> tests/ui/unnecessary_to_owned_on_split.rs:25:13
   |
LL |     let _ = "a".to_owned().split('a').next().unwrap();
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `"a".split('a')`

error: unnecessary use of `to_owned`
  --> tests/ui/unnecessary_to_owned_on_split.rs:28:13
   |
LL |     let _ = "a".to_owned().split("a").next().unwrap();
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `"a".split("a")`

error: unnecessary use of `to_string`
  --> tests/ui/unnecessary_to_owned_on_split.rs:31:13
   |
LL |     let _ = Issue12068.to_string().split('a').next().unwrap();
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `Issue12068.as_ref().split('a')`

error: unnecessary use of `to_vec`
  --> tests/ui/unnecessary_to_owned_on_split.rs:34:13
   |
LL |     let _ = [1].to_vec().split(|x| *x == 2).next().unwrap();
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `[1].split(|x| *x == 2)`

error: unnecessary use of `to_vec`
  --> tests/ui/unnecessary_to_owned_on_split.rs:37:13
   |
LL |     let _ = [1].to_vec().split(|x| *x == 2).next().unwrap();
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `[1].split(|x| *x == 2)`

error: unnecessary use of `to_owned`
  --> tests/ui/unnecessary_to_owned_on_split.rs:40:13
   |
LL |     let _ = [1].to_owned().split(|x| *x == 2).next().unwrap();
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `[1].split(|x| *x == 2)`

error: unnecessary use of `to_owned`
  --> tests/ui/unnecessary_to_owned_on_split.rs:43:13
   |
LL |     let _ = [1].to_owned().split(|x| *x == 2).next().unwrap();
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `[1].split(|x| *x == 2)`

error: aborting due to 9 previous errors