@@ -117,127 +117,127 @@ LL | let _: Vec<i32> = my_transmute(my_vec());
117117 | ^^^^^^^^^^^^^^^^^^^^^^
118118
119119error: transmute from an integer to a pointer
120- --> $DIR/transmute.rs:89 :31
120+ --> $DIR/transmute.rs:83 :31
121121 |
122122LL | let _: *const usize = std::mem::transmute(5_isize);
123123 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `5_isize as *const usize`
124124
125125error: transmute from an integer to a pointer
126- --> $DIR/transmute.rs:93 :31
126+ --> $DIR/transmute.rs:87 :31
127127 |
128128LL | let _: *const usize = std::mem::transmute(1 + 1usize);
129129 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(1 + 1usize) as *const usize`
130130
131131error: transmute from a type (`*const Usize`) to the type that it points to (`Usize`)
132- --> $DIR/transmute.rs:108 :24
132+ --> $DIR/transmute.rs:102 :24
133133 |
134134LL | let _: Usize = core::intrinsics::transmute(int_const_ptr);
135135 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
136136 |
137137 = note: `-D clippy::crosspointer-transmute` implied by `-D warnings`
138138
139139error: transmute from a type (`*mut Usize`) to the type that it points to (`Usize`)
140- --> $DIR/transmute.rs:110 :24
140+ --> $DIR/transmute.rs:104 :24
141141 |
142142LL | let _: Usize = core::intrinsics::transmute(int_mut_ptr);
143143 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
144144
145145error: transmute from a type (`Usize`) to a pointer to that type (`*const Usize`)
146- --> $DIR/transmute.rs:112 :31
146+ --> $DIR/transmute.rs:106 :31
147147 |
148148LL | let _: *const Usize = core::intrinsics::transmute(my_int());
149149 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
150150
151151error: transmute from a type (`Usize`) to a pointer to that type (`*mut Usize`)
152- --> $DIR/transmute.rs:114 :29
152+ --> $DIR/transmute.rs:108 :29
153153 |
154154LL | let _: *mut Usize = core::intrinsics::transmute(my_int());
155155 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
156156
157157error: transmute from a `u32` to a `char`
158- --> $DIR/transmute.rs:120 :28
158+ --> $DIR/transmute.rs:114 :28
159159 |
160160LL | let _: char = unsafe { std::mem::transmute(0_u32) };
161161 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `std::char::from_u32(0_u32).unwrap()`
162162 |
163163 = note: `-D clippy::transmute-int-to-char` implied by `-D warnings`
164164
165165error: transmute from a `i32` to a `char`
166- --> $DIR/transmute.rs:121 :28
166+ --> $DIR/transmute.rs:115 :28
167167 |
168168LL | let _: char = unsafe { std::mem::transmute(0_i32) };
169169 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `std::char::from_u32(0_i32 as u32).unwrap()`
170170
171171error: transmute from a `u8` to a `bool`
172- --> $DIR/transmute.rs:126 :28
172+ --> $DIR/transmute.rs:120 :28
173173 |
174174LL | let _: bool = unsafe { std::mem::transmute(0_u8) };
175175 | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `0_u8 != 0`
176176 |
177177 = note: `-D clippy::transmute-int-to-bool` implied by `-D warnings`
178178
179179error: transmute from a `u32` to a `f32`
180- --> $DIR/transmute.rs:131 :27
180+ --> $DIR/transmute.rs:125 :27
181181 |
182182LL | let _: f32 = unsafe { std::mem::transmute(0_u32) };
183183 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `f32::from_bits(0_u32)`
184184 |
185185 = note: `-D clippy::transmute-int-to-float` implied by `-D warnings`
186186
187187error: transmute from a `i32` to a `f32`
188- --> $DIR/transmute.rs:132 :27
188+ --> $DIR/transmute.rs:126 :27
189189 |
190190LL | let _: f32 = unsafe { std::mem::transmute(0_i32) };
191191 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `f32::from_bits(0_i32 as u32)`
192192
193193error: transmute from a `&[u8]` to a `&str`
194- --> $DIR/transmute.rs:136 :28
194+ --> $DIR/transmute.rs:130 :28
195195 |
196196LL | let _: &str = unsafe { std::mem::transmute(b) };
197197 | ^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `std::str::from_utf8(b).unwrap()`
198198 |
199199 = note: `-D clippy::transmute-bytes-to-str` implied by `-D warnings`
200200
201201error: transmute from a `&mut [u8]` to a `&mut str`
202- --> $DIR/transmute.rs:137 :32
202+ --> $DIR/transmute.rs:131 :32
203203 |
204204LL | let _: &mut str = unsafe { std::mem::transmute(mb) };
205205 | ^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `std::str::from_utf8_mut(mb).unwrap()`
206206
207207error: transmute from a pointer to a pointer
208- --> $DIR/transmute.rs:169 :29
208+ --> $DIR/transmute.rs:163 :29
209209 |
210210LL | let _: *const f32 = std::mem::transmute(ptr);
211211 | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `ptr as *const f32`
212212 |
213213 = note: `-D clippy::transmute-ptr-to-ptr` implied by `-D warnings`
214214
215215error: transmute from a pointer to a pointer
216- --> $DIR/transmute.rs:170 :27
216+ --> $DIR/transmute.rs:164 :27
217217 |
218218LL | let _: *mut f32 = std::mem::transmute(mut_ptr);
219219 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `mut_ptr as *mut f32`
220220
221221error: transmute from a reference to a reference
222- --> $DIR/transmute.rs:172 :23
222+ --> $DIR/transmute.rs:166 :23
223223 |
224224LL | let _: &f32 = std::mem::transmute(&1u32);
225225 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&*(&1u32 as *const u32 as *const f32)`
226226
227227error: transmute from a reference to a reference
228- --> $DIR/transmute.rs:173 :23
228+ --> $DIR/transmute.rs:167 :23
229229 |
230230LL | let _: &f64 = std::mem::transmute(&1f32);
231231 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&*(&1f32 as *const f32 as *const f64)`
232232
233233error: transmute from a reference to a reference
234- --> $DIR/transmute.rs:176 :27
234+ --> $DIR/transmute.rs:170 :27
235235 |
236236LL | let _: &mut f32 = std::mem::transmute(&mut 1u32);
237237 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&mut *(&mut 1u32 as *mut u32 as *mut f32)`
238238
239239error: transmute from a reference to a reference
240- --> $DIR/transmute.rs:177 :37
240+ --> $DIR/transmute.rs:171 :37
241241 |
242242LL | let _: &GenericParam<f32> = std::mem::transmute(&GenericParam { t: 1u32 });
243243 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&*(&GenericParam { t: 1u32 } as *const GenericParam<u32> as *const GenericParam<f32>)`
0 commit comments