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