]> git.lizzy.rs Git - rust.git/blobdiff - src/etc/test-float-parse/rand-f64.rs
Rollup merge of #53093 - 0e4ef622:issue-52169-fix, r=petrochenkov
[rust.git] / src / etc / test-float-parse / rand-f64.rs
index 762c3d95ec6eb8e7255179cf73ef82a3ef8395b3..2994dd9d5e6446511698fd96162dab55767cd7c1 100644 (file)
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(rand)]
-
 extern crate rand;
 
 mod _common;
@@ -25,7 +23,7 @@ fn main() {
         let bits = rnd.next_u64();
         let x: f64 = unsafe { transmute(bits) };
         if x.is_finite() {
-            validate(format!("{:e}", x));
+            validate(&format!("{:e}", x));
             i += 1;
         }
     }