We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 38d81f3 commit 77c4a1fCopy full SHA for 77c4a1f
tests/ui/use_self.fixed
@@ -422,3 +422,18 @@ mod lint_at_impl_item_level {
422
}
423
424
425
+
426
+mod issue4734 {
427
+ #[repr(C, packed)]
428
+ pub struct X {
429
+ pub x: u32,
430
+ }
431
432
+ impl From<X> for u32 {
433
+ fn from(c: X) -> Self {
434
+ unsafe {
435
+ core::mem::transmute(c)
436
437
438
439
+}
tests/ui/use_self.rs
0 commit comments