File tree Expand file tree Collapse file tree 3 files changed +4
-0
lines changed Expand file tree Collapse file tree 3 files changed +4
-0
lines changed Original file line number Diff line number Diff line change
1
+ #![ allow( integer_to_ptr_transmutes) ]
2
+
1
3
fn main ( ) {
2
4
#[ cfg( all( target_endian = "little" , target_pointer_width = "64" ) ) ]
3
5
let bad = unsafe { std:: mem:: transmute :: < u128 , & [ u8 ] > ( 42 ) } ;
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ fn test_bool() {
32
32
assert_eq ! ( true ^ true , false ) ;
33
33
}
34
34
35
+ #[ allow( integer_to_ptr_transmutes) ]
35
36
fn test_ptr ( ) {
36
37
unsafe {
37
38
let p1: * const u8 = :: std:: mem:: transmute ( 0_usize ) ;
Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ fn test_bool() {
35
35
assert_eq ! ( true ^ true , false ) ;
36
36
}
37
37
38
+ #[ allow( integer_to_ptr_transmutes) ]
38
39
fn test_ptr ( ) {
39
40
unsafe {
40
41
let p1: * const u8 = :: std:: mem:: transmute ( 0_usize ) ;
You can’t perform that action at this time.
0 commit comments