|
1 | 1 | error: transmute from a type (`&T`) to itself
|
2 |
| - --> $DIR/transmute.rs:20:20 |
| 2 | + --> $DIR/transmute.rs:19:20 |
3 | 3 | |
|
4 | 4 | LL | let _: &'a T = core::intrinsics::transmute(t);
|
5 | 5 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
6 | 6 | |
|
7 | 7 | = note: `-D clippy::useless-transmute` implied by `-D warnings`
|
8 | 8 |
|
9 | 9 | error: transmute from a reference to a pointer
|
10 |
| - --> $DIR/transmute.rs:24:23 |
| 10 | + --> $DIR/transmute.rs:23:23 |
11 | 11 | |
|
12 | 12 | LL | let _: *const T = core::intrinsics::transmute(t);
|
13 | 13 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `t as *const T`
|
14 | 14 |
|
15 | 15 | error: transmute from a reference to a pointer
|
16 |
| - --> $DIR/transmute.rs:26:21 |
| 16 | + --> $DIR/transmute.rs:25:21 |
17 | 17 | |
|
18 | 18 | LL | let _: *mut T = core::intrinsics::transmute(t);
|
19 | 19 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `t as *const T as *mut T`
|
20 | 20 |
|
21 | 21 | error: transmute from a reference to a pointer
|
22 |
| - --> $DIR/transmute.rs:28:23 |
| 22 | + --> $DIR/transmute.rs:27:23 |
23 | 23 | |
|
24 | 24 | LL | let _: *const U = core::intrinsics::transmute(t);
|
25 | 25 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `t as *const T as *const U`
|
26 | 26 |
|
27 | 27 | error: transmute from a type (`std::vec::Vec<i32>`) to itself
|
28 |
| - --> $DIR/transmute.rs:34:27 |
| 28 | + --> $DIR/transmute.rs:33:27 |
29 | 29 | |
|
30 | 30 | LL | let _: Vec<i32> = core::intrinsics::transmute(my_vec());
|
31 | 31 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
32 | 32 |
|
33 | 33 | error: transmute from a type (`std::vec::Vec<i32>`) to itself
|
34 |
| - --> $DIR/transmute.rs:36:27 |
| 34 | + --> $DIR/transmute.rs:35:27 |
35 | 35 | |
|
36 | 36 | LL | let _: Vec<i32> = core::mem::transmute(my_vec());
|
37 | 37 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
38 | 38 |
|
39 | 39 | error: transmute from a type (`std::vec::Vec<i32>`) to itself
|
40 |
| - --> $DIR/transmute.rs:38:27 |
| 40 | + --> $DIR/transmute.rs:37:27 |
41 | 41 | |
|
42 | 42 | LL | let _: Vec<i32> = std::intrinsics::transmute(my_vec());
|
43 | 43 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
44 | 44 |
|
45 | 45 | error: transmute from a type (`std::vec::Vec<i32>`) to itself
|
46 |
| - --> $DIR/transmute.rs:40:27 |
| 46 | + --> $DIR/transmute.rs:39:27 |
47 | 47 | |
|
48 | 48 | LL | let _: Vec<i32> = std::mem::transmute(my_vec());
|
49 | 49 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
50 | 50 |
|
51 | 51 | error: transmute from a type (`std::vec::Vec<i32>`) to itself
|
52 |
| - --> $DIR/transmute.rs:42:27 |
| 52 | + --> $DIR/transmute.rs:41:27 |
53 | 53 | |
|
54 | 54 | LL | let _: Vec<i32> = my_transmute(my_vec());
|
55 | 55 | | ^^^^^^^^^^^^^^^^^^^^^^
|
56 | 56 |
|
57 | 57 | error: transmute from an integer to a pointer
|
58 |
| - --> $DIR/transmute.rs:44:31 |
| 58 | + --> $DIR/transmute.rs:43:31 |
59 | 59 | |
|
60 | 60 | LL | let _: *const usize = std::mem::transmute(5_isize);
|
61 | 61 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `5_isize as *const usize`
|
62 | 62 |
|
63 | 63 | error: transmute from an integer to a pointer
|
64 |
| - --> $DIR/transmute.rs:48:31 |
| 64 | + --> $DIR/transmute.rs:47:31 |
65 | 65 | |
|
66 | 66 | LL | let _: *const usize = std::mem::transmute(1 + 1usize);
|
67 | 67 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(1 + 1usize) as *const usize`
|
68 | 68 |
|
69 | 69 | error: transmute from a type (`*const Usize`) to the type that it points to (`Usize`)
|
70 |
| - --> $DIR/transmute.rs:63:24 |
| 70 | + --> $DIR/transmute.rs:62:24 |
71 | 71 | |
|
72 | 72 | LL | let _: Usize = core::intrinsics::transmute(int_const_ptr);
|
73 | 73 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
74 | 74 | |
|
75 | 75 | = note: `-D clippy::crosspointer-transmute` implied by `-D warnings`
|
76 | 76 |
|
77 | 77 | error: transmute from a type (`*mut Usize`) to the type that it points to (`Usize`)
|
78 |
| - --> $DIR/transmute.rs:65:24 |
| 78 | + --> $DIR/transmute.rs:64:24 |
79 | 79 | |
|
80 | 80 | LL | let _: Usize = core::intrinsics::transmute(int_mut_ptr);
|
81 | 81 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
82 | 82 |
|
83 | 83 | error: transmute from a type (`Usize`) to a pointer to that type (`*const Usize`)
|
84 |
| - --> $DIR/transmute.rs:67:31 |
| 84 | + --> $DIR/transmute.rs:66:31 |
85 | 85 | |
|
86 | 86 | LL | let _: *const Usize = core::intrinsics::transmute(my_int());
|
87 | 87 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
88 | 88 |
|
89 | 89 | error: transmute from a type (`Usize`) to a pointer to that type (`*mut Usize`)
|
90 |
| - --> $DIR/transmute.rs:69:29 |
| 90 | + --> $DIR/transmute.rs:68:29 |
91 | 91 | |
|
92 | 92 | LL | let _: *mut Usize = core::intrinsics::transmute(my_int());
|
93 | 93 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
94 | 94 |
|
95 | 95 | error: transmute from a `u32` to a `char`
|
96 |
| - --> $DIR/transmute.rs:75:28 |
| 96 | + --> $DIR/transmute.rs:74:28 |
97 | 97 | |
|
98 | 98 | LL | let _: char = unsafe { std::mem::transmute(0_u32) };
|
99 | 99 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `std::char::from_u32(0_u32).unwrap()`
|
100 | 100 | |
|
101 | 101 | = note: `-D clippy::transmute-int-to-char` implied by `-D warnings`
|
102 | 102 |
|
103 | 103 | error: transmute from a `i32` to a `char`
|
104 |
| - --> $DIR/transmute.rs:76:28 |
| 104 | + --> $DIR/transmute.rs:75:28 |
105 | 105 | |
|
106 | 106 | LL | let _: char = unsafe { std::mem::transmute(0_i32) };
|
107 | 107 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `std::char::from_u32(0_i32 as u32).unwrap()`
|
108 | 108 |
|
109 | 109 | error: transmute from a `u8` to a `bool`
|
110 |
| - --> $DIR/transmute.rs:81:28 |
| 110 | + --> $DIR/transmute.rs:80:28 |
111 | 111 | |
|
112 | 112 | LL | let _: bool = unsafe { std::mem::transmute(0_u8) };
|
113 | 113 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `0_u8 != 0`
|
114 | 114 | |
|
115 | 115 | = note: `-D clippy::transmute-int-to-bool` implied by `-D warnings`
|
116 | 116 |
|
117 | 117 | error: transmute from a `u32` to a `f32`
|
118 |
| - --> $DIR/transmute.rs:87:31 |
| 118 | + --> $DIR/transmute.rs:86:31 |
119 | 119 | |
|
120 | 120 | LL | let _: f32 = unsafe { std::mem::transmute(0_u32) };
|
121 | 121 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `f32::from_bits(0_u32)`
|
122 | 122 | |
|
123 | 123 | = note: `-D clippy::transmute-int-to-float` implied by `-D warnings`
|
124 | 124 |
|
125 | 125 | error: transmute from a `i32` to a `f32`
|
126 |
| - --> $DIR/transmute.rs:88:31 |
| 126 | + --> $DIR/transmute.rs:87:31 |
127 | 127 | |
|
128 | 128 | LL | let _: f32 = unsafe { std::mem::transmute(0_i32) };
|
129 | 129 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `f32::from_bits(0_i32 as u32)`
|
130 | 130 |
|
131 | 131 | error: transmute from a `u64` to a `f64`
|
132 |
| - --> $DIR/transmute.rs:89:31 |
| 132 | + --> $DIR/transmute.rs:88:31 |
133 | 133 | |
|
134 | 134 | LL | let _: f64 = unsafe { std::mem::transmute(0_u64) };
|
135 | 135 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `f64::from_bits(0_u64)`
|
136 | 136 |
|
137 | 137 | error: transmute from a `i64` to a `f64`
|
138 |
| - --> $DIR/transmute.rs:90:31 |
| 138 | + --> $DIR/transmute.rs:89:31 |
139 | 139 | |
|
140 | 140 | LL | let _: f64 = unsafe { std::mem::transmute(0_i64) };
|
141 | 141 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `f64::from_bits(0_i64 as u64)`
|
142 | 142 |
|
143 | 143 | error: transmute from a `&[u8]` to a `&str`
|
144 |
| - --> $DIR/transmute.rs:108:28 |
| 144 | + --> $DIR/transmute.rs:107:28 |
145 | 145 | |
|
146 | 146 | LL | let _: &str = unsafe { std::mem::transmute(b) };
|
147 | 147 | | ^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `std::str::from_utf8(b).unwrap()`
|
148 | 148 | |
|
149 | 149 | = note: `-D clippy::transmute-bytes-to-str` implied by `-D warnings`
|
150 | 150 |
|
151 | 151 | error: transmute from a `&mut [u8]` to a `&mut str`
|
152 |
| - --> $DIR/transmute.rs:109:32 |
| 152 | + --> $DIR/transmute.rs:108:32 |
153 | 153 | |
|
154 | 154 | LL | let _: &mut str = unsafe { std::mem::transmute(mb) };
|
155 | 155 | | ^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `std::str::from_utf8_mut(mb).unwrap()`
|
|
0 commit comments