Skip to content

Commit 9b83e31

Browse files
committed
Bless clippy.
1 parent 8077d03 commit 9b83e31

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

src/tools/clippy/tests/ui/inefficient_to_string.stderr

+4-4
Original file line numberDiff line numberDiff line change
@@ -35,21 +35,21 @@ LL | let _: String = rrrstring.to_string();
3535
|
3636
= help: `&&std::string::String` implements `ToString` through a slower blanket impl, but `std::string::String` has a fast specialization of `ToString`
3737

38-
error: calling `to_string` on `&&std::borrow::Cow<str>`
38+
error: calling `to_string` on `&&std::borrow::Cow<'_, str>`
3939
--> $DIR/inefficient_to_string.rs:29:21
4040
|
4141
LL | let _: String = rrcow.to_string();
4242
| ^^^^^^^^^^^^^^^^^ help: try dereferencing the receiver: `(*rrcow).to_string()`
4343
|
44-
= help: `&std::borrow::Cow<str>` implements `ToString` through a slower blanket impl, but `std::borrow::Cow<str>` has a fast specialization of `ToString`
44+
= help: `&std::borrow::Cow<'_, str>` implements `ToString` through a slower blanket impl, but `std::borrow::Cow<'_, str>` has a fast specialization of `ToString`
4545

46-
error: calling `to_string` on `&&&std::borrow::Cow<str>`
46+
error: calling `to_string` on `&&&std::borrow::Cow<'_, str>`
4747
--> $DIR/inefficient_to_string.rs:30:21
4848
|
4949
LL | let _: String = rrrcow.to_string();
5050
| ^^^^^^^^^^^^^^^^^^ help: try dereferencing the receiver: `(**rrrcow).to_string()`
5151
|
52-
= help: `&&std::borrow::Cow<str>` implements `ToString` through a slower blanket impl, but `std::borrow::Cow<str>` has a fast specialization of `ToString`
52+
= help: `&&std::borrow::Cow<'_, str>` implements `ToString` through a slower blanket impl, but `std::borrow::Cow<'_, str>` has a fast specialization of `ToString`
5353

5454
error: aborting due to 6 previous errors
5555

src/tools/clippy/tests/ui/suspicious_to_owned.stderr

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
error: this `to_owned` call clones the std::borrow::Cow<str> itself and does not cause the std::borrow::Cow<str> contents to become owned
1+
error: this `to_owned` call clones the std::borrow::Cow<'_, str> itself and does not cause the std::borrow::Cow<'_, str> contents to become owned
22
--> $DIR/suspicious_to_owned.rs:16:13
33
|
44
LL | let _ = cow.to_owned();
55
| ^^^^^^^^^^^^^^ help: consider using, depending on intent: `cow.clone()` or `cow.into_owned()`
66
|
77
= note: `-D clippy::suspicious-to-owned` implied by `-D warnings`
88

9-
error: this `to_owned` call clones the std::borrow::Cow<[char; 3]> itself and does not cause the std::borrow::Cow<[char; 3]> contents to become owned
9+
error: this `to_owned` call clones the std::borrow::Cow<'_, [char; 3]> itself and does not cause the std::borrow::Cow<'_, [char; 3]> contents to become owned
1010
--> $DIR/suspicious_to_owned.rs:26:13
1111
|
1212
LL | let _ = cow.to_owned();
1313
| ^^^^^^^^^^^^^^ help: consider using, depending on intent: `cow.clone()` or `cow.into_owned()`
1414

15-
error: this `to_owned` call clones the std::borrow::Cow<std::vec::Vec<char>> itself and does not cause the std::borrow::Cow<std::vec::Vec<char>> contents to become owned
15+
error: this `to_owned` call clones the std::borrow::Cow<'_, std::vec::Vec<char>> itself and does not cause the std::borrow::Cow<'_, std::vec::Vec<char>> contents to become owned
1616
--> $DIR/suspicious_to_owned.rs:36:13
1717
|
1818
LL | let _ = cow.to_owned();
1919
| ^^^^^^^^^^^^^^ help: consider using, depending on intent: `cow.clone()` or `cow.into_owned()`
2020

21-
error: this `to_owned` call clones the std::borrow::Cow<str> itself and does not cause the std::borrow::Cow<str> contents to become owned
21+
error: this `to_owned` call clones the std::borrow::Cow<'_, str> itself and does not cause the std::borrow::Cow<'_, str> contents to become owned
2222
--> $DIR/suspicious_to_owned.rs:46:13
2323
|
2424
LL | let _ = cow.to_owned();

src/tools/clippy/tests/ui/transmute_ptr_to_ref.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@ error: transmute from a pointer type (`*mut U`) to a reference type (`&T`)
4242
LL | let _: &T = std::mem::transmute(om);
4343
| ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&*(om as *const T)`
4444

45-
error: transmute from a pointer type (`*const i32`) to a reference type (`&_issue1231::Foo<u8>`)
45+
error: transmute from a pointer type (`*const i32`) to a reference type (`&_issue1231::Foo<'_, u8>`)
4646
--> $DIR/transmute_ptr_to_ref.rs:36:32
4747
|
4848
LL | let _: &Foo<u8> = unsafe { std::mem::transmute::<_, &Foo<_>>(raw) };
4949
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&*raw.cast::<Foo<_>>()`
5050

51-
error: transmute from a pointer type (`*const i32`) to a reference type (`&_issue1231::Foo<&u8>`)
51+
error: transmute from a pointer type (`*const i32`) to a reference type (`&_issue1231::Foo<'_, &u8>`)
5252
--> $DIR/transmute_ptr_to_ref.rs:38:33
5353
|
5454
LL | let _: &Foo<&u8> = unsafe { std::mem::transmute::<_, &Foo<&_>>(raw) };

src/tools/clippy/tests/ui/useless_conversion.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ error: useless conversion to the same type: `std::string::String`
4646
LL | let _ = String::from(format!("A: {:04}", 123));
4747
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `format!("A: {:04}", 123)`
4848

49-
error: useless conversion to the same type: `std::str::Lines`
49+
error: useless conversion to the same type: `std::str::Lines<'_>`
5050
--> $DIR/useless_conversion.rs:65:13
5151
|
5252
LL | let _ = "".lines().into_iter();

0 commit comments

Comments
 (0)