Skip to content

Commit b7c3898

Browse files
committed
bless new output
1 parent 2fc1693 commit b7c3898

File tree

1 file changed

+20
-12
lines changed

1 file changed

+20
-12
lines changed

tests/ui/suspicious_to_owned.stderr

+20-12
Original file line numberDiff line numberDiff line change
@@ -5,51 +5,59 @@ LL | let _ = cow.to_owned();
55
| ^^^^^^^^^^^^^^
66
|
77
= note: `-D clippy::suspicious-to-owned` implied by `-D warnings`
8-
help: depending on intent, either make the Cow an Owned variant or clone the Cow itself
8+
help: depending on intent, either make the Cow an Owned variant
99
|
10-
LL | let _ = cow.clone();
11-
| ~~~~~~~~~~~
1210
LL | let _ = cow.into_owned();
1311
| ~~~~~~~~~~~~~~~~
12+
help: or clone the Cow itself
13+
|
14+
LL | let _ = cow.clone();
15+
| ~~~~~~~~~~~
1416

1517
error: this `to_owned` call clones the Cow<'_, [char; 3]> itself and does not cause the Cow<'_, [char; 3]> contents to become owned
1618
--> $DIR/suspicious_to_owned.rs:26:13
1719
|
1820
LL | let _ = cow.to_owned();
1921
| ^^^^^^^^^^^^^^
2022
|
21-
help: depending on intent, either make the Cow an Owned variant or clone the Cow itself
23+
help: depending on intent, either make the Cow an Owned variant
2224
|
23-
LL | let _ = cow.clone();
24-
| ~~~~~~~~~~~
2525
LL | let _ = cow.into_owned();
2626
| ~~~~~~~~~~~~~~~~
27+
help: or clone the Cow itself
28+
|
29+
LL | let _ = cow.clone();
30+
| ~~~~~~~~~~~
2731

2832
error: this `to_owned` call clones the Cow<'_, Vec<char>> itself and does not cause the Cow<'_, Vec<char>> contents to become owned
2933
--> $DIR/suspicious_to_owned.rs:36:13
3034
|
3135
LL | let _ = cow.to_owned();
3236
| ^^^^^^^^^^^^^^
3337
|
34-
help: depending on intent, either make the Cow an Owned variant or clone the Cow itself
38+
help: depending on intent, either make the Cow an Owned variant
3539
|
36-
LL | let _ = cow.clone();
37-
| ~~~~~~~~~~~
3840
LL | let _ = cow.into_owned();
3941
| ~~~~~~~~~~~~~~~~
42+
help: or clone the Cow itself
43+
|
44+
LL | let _ = cow.clone();
45+
| ~~~~~~~~~~~
4046

4147
error: this `to_owned` call clones the Cow<'_, str> itself and does not cause the Cow<'_, str> contents to become owned
4248
--> $DIR/suspicious_to_owned.rs:46:13
4349
|
4450
LL | let _ = cow.to_owned();
4551
| ^^^^^^^^^^^^^^
4652
|
47-
help: depending on intent, either make the Cow an Owned variant or clone the Cow itself
53+
help: depending on intent, either make the Cow an Owned variant
4854
|
49-
LL | let _ = cow.clone();
50-
| ~~~~~~~~~~~
5155
LL | let _ = cow.into_owned();
5256
| ~~~~~~~~~~~~~~~~
57+
help: or clone the Cow itself
58+
|
59+
LL | let _ = cow.clone();
60+
| ~~~~~~~~~~~
5361

5462
error: implicitly cloning a `String` by calling `to_owned` on its dereferenced type
5563
--> $DIR/suspicious_to_owned.rs:60:13

0 commit comments

Comments
 (0)