Skip to content

Commit b875c53

Browse files
committed
rustups rust-lang/rust#69189 which is part of rust-lang/rust#70085 (at least I think this is the only pr that changes clippy test stdout)
1 parent 23549a8 commit b875c53

4 files changed

+34
-8
lines changed

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

tests/ui/transmute.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: transmute from a type (`&'a T`) to itself
1+
error: transmute from a type (`&T`) to itself
22
--> $DIR/transmute.rs:19:20
33
|
44
LL | let _: &'a T = core::intrinsics::transmute(t);

tests/ui/transmute_ptr_to_ptr.stderr

+27-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
error: transmute from a type (`&T`) to itself
2+
--> $DIR/transmute_ptr_to_ptr.rs:8:5
3+
|
4+
LL | std::mem::transmute::<&'a T, &'static T>(t)
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6+
|
7+
= note: `-D clippy::useless-transmute` implied by `-D warnings`
8+
9+
error: transmute from a type (`&T`) to itself
10+
--> $DIR/transmute_ptr_to_ptr.rs:13:5
11+
|
12+
LL | std::mem::transmute::<&'a T, &'b T>(t)
13+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
14+
115
error: transmute from a pointer to a pointer
216
--> $DIR/transmute_ptr_to_ptr.rs:29:29
317
|
@@ -36,5 +50,17 @@ error: transmute from a reference to a reference
3650
LL | let _: &GenericParam<f32> = std::mem::transmute(&GenericParam { t: 1u32 });
3751
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&*(&GenericParam { t: 1u32 } as *const GenericParam<u32> as *const GenericParam<f32>)`
3852

39-
error: aborting due to 6 previous errors
53+
error: transmute from a type (`&LifetimeParam`) to itself
54+
--> $DIR/transmute_ptr_to_ptr.rs:50:47
55+
|
56+
LL | let _: &LifetimeParam<'static> = unsafe { std::mem::transmute(&lp) };
57+
| ^^^^^^^^^^^^^^^^^^^^^^^^
58+
59+
error: transmute from a type (`&GenericParam<&LifetimeParam>`) to itself
60+
--> $DIR/transmute_ptr_to_ptr.rs:51:62
61+
|
62+
LL | let _: &GenericParam<&LifetimeParam<'static>> = unsafe { std::mem::transmute(&GenericParam { t: &lp }) };
63+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
64+
65+
error: aborting due to 10 previous errors
4066

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:32:32
4747
|
4848
LL | let _: &Foo<u8> = unsafe { std::mem::transmute::<_, &Foo<_>>(raw) };
4949
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&*(raw as *const 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:34:33
5353
|
5454
LL | let _: &Foo<&u8> = unsafe { std::mem::transmute::<_, &Foo<&_>>(raw) };

0 commit comments

Comments
 (0)