Skip to content

Commit b02bf05

Browse files
committed
update stderr for transmutes_expressible_as_ptr_casts
1 parent c04c4cb commit b02bf05

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,53 @@
11
error: transmute from an integer to a pointer
2-
--> $DIR/transmutes_expressible_as_ptr_casts.rs:18:9
2+
--> $DIR/transmutes_expressible_as_ptr_casts.rs:19:9
33
|
44
LL | transmute::<isize, *const i32>(-1)
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `-1 as *const i32`
66
|
77
= note: `-D clippy::useless-transmute` implied by `-D warnings`
88

99
error: transmute from a pointer to a pointer
10-
--> $DIR/transmutes_expressible_as_ptr_casts.rs:24:9
10+
--> $DIR/transmutes_expressible_as_ptr_casts.rs:25:9
1111
|
1212
LL | transmute::<*const i32, *const i8>(ptr_i32)
1313
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `ptr_i32 as *const i8`
1414
|
1515
= note: `-D clippy::transmute-ptr-to-ptr` implied by `-D warnings`
1616

1717
error: transmute from a pointer to a pointer
18-
--> $DIR/transmutes_expressible_as_ptr_casts.rs:32:9
18+
--> $DIR/transmutes_expressible_as_ptr_casts.rs:33:9
1919
|
2020
LL | transmute::<*const [i32], *const [u16]>(slice_ptr)
2121
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `slice_ptr as *const [u16]`
2222

2323
error: transmute from `*const i32` to `usize` which could be expressed as a pointer cast instead
24-
--> $DIR/transmutes_expressible_as_ptr_casts.rs:40:9
24+
--> $DIR/transmutes_expressible_as_ptr_casts.rs:41:9
2525
|
2626
LL | transmute::<*const i32, usize>(ptr_i32)
2727
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `ptr_i32 as usize`
2828
|
2929
= note: `-D clippy::transmutes-expressible-as-ptr-casts` implied by `-D warnings`
3030

3131
error: transmute from a reference to a pointer
32-
--> $DIR/transmutes_expressible_as_ptr_casts.rs:48:9
32+
--> $DIR/transmutes_expressible_as_ptr_casts.rs:49:9
3333
|
3434
LL | transmute::<&[i32; 4], *const [i32; 4]>(array_ref)
3535
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `array_ref as *const [i32; 4]`
3636

3737
error: transmute from `fn(usize) -> u8 {main::foo}` to `*const usize` which could be expressed as a pointer cast instead
38-
--> $DIR/transmutes_expressible_as_ptr_casts.rs:56:9
38+
--> $DIR/transmutes_expressible_as_ptr_casts.rs:57:9
3939
|
4040
LL | transmute::<fn(usize) -> u8, *const usize>(foo)
4141
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `foo as *const usize`
4242

4343
error: transmute from `fn(usize) -> u8 {main::foo}` to `usize` which could be expressed as a pointer cast instead
44-
--> $DIR/transmutes_expressible_as_ptr_casts.rs:62:9
44+
--> $DIR/transmutes_expressible_as_ptr_casts.rs:63:9
4545
|
4646
LL | transmute::<fn(usize) -> u8, usize>(foo)
4747
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `foo as usize`
4848

4949
error: transmute from a reference to a pointer
50-
--> $DIR/transmutes_expressible_as_ptr_casts.rs:75:14
50+
--> $DIR/transmutes_expressible_as_ptr_casts.rs:76:14
5151
|
5252
LL | unsafe { transmute::<&[i32; 1], *const u8>(in_param) }
5353
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `in_param as *const [i32; 1] as *const u8`

0 commit comments

Comments
 (0)