]> git.lizzy.rs Git - rust.git/commitdiff
remove/fix outdated FIXMEs in tests
authorRalf Jung <post@ralfj.de>
Sun, 2 Dec 2018 10:14:24 +0000 (11:14 +0100)
committerRalf Jung <post@ralfj.de>
Sun, 2 Dec 2018 10:14:24 +0000 (11:14 +0100)
tests/compile-fail-fullmir/stacked_borrows/illegal_write2.rs
tests/compile-fail-fullmir/stacked_borrows/pointer_smuggling.rs
tests/compiletest.rs
tests/run-pass/dst-struct.rs
tests/run-pass/sums.rs
tests/run-pass/vec-matching-fold.rs

index b53655c82147e312364940ea983d14fb4102d99a..f4fefaad5e22ddf82cdfe74b2fc5edbe0ac05a0e 100644 (file)
@@ -1,7 +1,3 @@
-// We fail to detect this when neither this nor libstd are optimized/have retagging.
-// FIXME: Investigate that.
-// compile-flags: -Zmir-opt-level=0
-
 #![allow(unused_variables)]
 
 fn main() {
index 68f3d2923b15ff062e9695ec32a42740ef13e6ff..bd5e28b47e8673a94f48cf26144be28900e49f8d 100644 (file)
@@ -1,5 +1,3 @@
-#![allow(unused_variables)]
-
 static mut PTR: *mut u8 = 0 as *mut _;
 
 fn fun1(x: &mut u8) {
@@ -14,7 +12,8 @@ fn fun2() {
 }
 
 fn main() {
-    let val = &mut 0; // FIXME: This should also work with a local variable, but currently it does not.
+    let mut val = 0;
+    let val = &mut val;
     fun1(val);
     *val = 2; // this invalidates any raw ptrs `fun1` might have created.
     fun2(); // if they now use a raw ptr they break our reference
index 7aa55ef6634081dc7d7ca3105675cd28b1a3b2fc..de693bd463209649db313b37f2ebceb0ef9f31dc 100644 (file)
@@ -106,7 +106,7 @@ fn miri_pass(sysroot: &Path, path: &str, target: &str, host: &str, need_fullmir:
         flags.push("-Zmir-opt-level=1".to_owned());
     }
     if !have_fullmir() {
-        // Validation relies on the EscapeToRaw statements being emitted
+        // FIXME: Validation relies on the EscapeToRaw statements being emitted
         flags.push("-Zmiri-disable-validation".to_owned());
     }
 
index 0820614ab5c810a6535ca30ec36b768ec5b72228..6ef0a6330f739ba3e65062e8f288bc4b2343e031 100644 (file)
@@ -127,8 +127,9 @@ pub fn main() {
     let f2 : Box<Fat<[isize]>> = f1;
     foo(&*f2);
 
-    // FIXME (#22405): Replace `Box::new` with `box` here when/if possible.
     let f3 : Box<Fat<[isize]>> =
         Box::<Fat<[_; 3]>>::new(Fat { f1: 5, f2: "some str", ptr: [1, 2, 3] });
     foo(&*f3);
+    let f4 : Box<Fat<[isize]>> = box Fat { f1: 5, f2: "some str", ptr: [1, 2, 3] };
+    foo(&*f4);
 }
index a8dfd5ed66ae7ac5090fe22101278376d818697f..daeba060a78bf344a2f147216a27ca5046d47485 100644 (file)
@@ -1,6 +1,3 @@
-// FIXME(solson): 32-bit mode doesn't test anything currently.
-#![cfg_attr(target_pointer_width = "32", allow(dead_code))]
-
 #[derive(Debug, PartialEq)]
 enum Unit { Unit(()) } // Force non-C-enum representation.
 
index 1a30f875580c201480aec5173002d74d381f0726..396846b23236e724884094e22a8f87a9d6494a30 100644 (file)
@@ -22,7 +22,6 @@ fn foldl<T, U, F>(values: &[T],
         &[ref head, ref tail..] =>
             foldl(tail, function(initial, head), function),
         &[] => {
-            // FIXME: call guards
             let res = initial.clone(); res
         }
     }
@@ -39,7 +38,6 @@ fn foldr<T, U, F>(values: &[T],
         &[ref head.., ref tail] =>
             foldr(head, function(tail, initial), function),
         &[] => {
-            // FIXME: call guards
             let res = initial.clone(); res
         }
     }