]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/transmute.rs
Auto merge of #3603 - xfix:random-state-lint, r=phansch
[rust.git] / tests / ui / transmute.rs
index 4108750acf620784da45144f50b9fe277cd47716..b27014201cd76510a702fae0847779fc3b4995f8 100644 (file)
@@ -7,10 +7,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-
-#![feature(tool_lints)]
-
-
 #![allow(dead_code)]
 
 extern crate core;
@@ -101,11 +97,11 @@ fn useless() {
 
         let _: *const usize = std::mem::transmute(5_isize);
 
-        let _  = 5_isize as *const usize;
+        let _ = 5_isize as *const usize;
 
-        let _: *const usize = std::mem::transmute(1+1usize);
+        let _: *const usize = std::mem::transmute(1 + 1usize);
 
-        let _  = (1+1_usize) as *const usize;
+        let _ = (1 + 1_usize) as *const usize;
     }
 }
 
@@ -201,9 +197,7 @@ fn transmute_ptr_to_ptr() {
     let s = "hello world".to_owned();
     let lp = LifetimeParam { s: &s };
     let _: &LifetimeParam<'static> = unsafe { std::mem::transmute(&lp) };
-    let _: &GenericParam<&LifetimeParam<'static>> = unsafe {
-        std::mem::transmute(&GenericParam { t: &lp})
-    };
+    let _: &GenericParam<&LifetimeParam<'static>> = unsafe { std::mem::transmute(&GenericParam { t: &lp }) };
 }
 
-fn main() { }
+fn main() {}