remove/fix outdated FIXMEs in tests

This commit is contained in:
Ralf Jung 2018-12-02 11:14:24 +01:00
parent 819a5bc129
commit 429d84f068
6 changed files with 5 additions and 14 deletions

View 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() {

View 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

View 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());
}

View 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);
}

View 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.

View 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
}
}