summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/transmute_ptr_to_ptr.fixed
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/clippy/tests/ui/transmute_ptr_to_ptr.fixed')
-rw-r--r--src/tools/clippy/tests/ui/transmute_ptr_to_ptr.fixed3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/tools/clippy/tests/ui/transmute_ptr_to_ptr.fixed b/src/tools/clippy/tests/ui/transmute_ptr_to_ptr.fixed
index 19abced98..4e145693c 100644
--- a/src/tools/clippy/tests/ui/transmute_ptr_to_ptr.fixed
+++ b/src/tools/clippy/tests/ui/transmute_ptr_to_ptr.fixed
@@ -43,6 +43,9 @@ fn transmute_ptr_to_ptr() {
//~^ ERROR: transmute from a reference to a reference
let _: &GenericParam<f32> = &*(&GenericParam { t: 1u32 } as *const GenericParam<u32> as *const GenericParam<f32>);
//~^ ERROR: transmute from a reference to a reference
+ let u8_ref: &u8 = &0u8;
+ let u64_ref: &u64 = unsafe { &*(u8_ref as *const u8 as *const u64) };
+ //~^ ERROR: transmute from a reference to a reference
}
// these are recommendations for solving the above; if these lint we need to update