Skip to content

Commit 429d84f

Browse files
committed
remove/fix outdated FIXMEs in tests
1 parent 819a5bc commit 429d84f

File tree

6 files changed

+5
-14
lines changed

6 files changed

+5
-14
lines changed

tests/compile-fail-fullmir/stacked_borrows/illegal_write2.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
// We fail to detect this when neither this nor libstd are optimized/have retagging.
2-
// FIXME: Investigate that.
3-
// compile-flags: -Zmir-opt-level=0
4-
51
#![allow(unused_variables)]
62

73
fn main() {

tests/compile-fail-fullmir/stacked_borrows/pointer_smuggling.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![allow(unused_variables)]
2-
31
static mut PTR: *mut u8 = 0 as *mut _;
42

53
fn fun1(x: &mut u8) {
@@ -14,7 +12,8 @@ fn fun2() {
1412
}
1513

1614
fn main() {
17-
let val = &mut 0; // FIXME: This should also work with a local variable, but currently it does not.
15+
let mut val = 0;
16+
let val = &mut val;
1817
fun1(val);
1918
*val = 2; // this invalidates any raw ptrs `fun1` might have created.
2019
fun2(); // if they now use a raw ptr they break our reference

tests/compiletest.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ fn miri_pass(sysroot: &Path, path: &str, target: &str, host: &str, need_fullmir:
106106
flags.push("-Zmir-opt-level=1".to_owned());
107107
}
108108
if !have_fullmir() {
109-
// Validation relies on the EscapeToRaw statements being emitted
109+
// FIXME: Validation relies on the EscapeToRaw statements being emitted
110110
flags.push("-Zmiri-disable-validation".to_owned());
111111
}
112112

tests/run-pass/dst-struct.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,9 @@ pub fn main() {
127127
let f2 : Box<Fat<[isize]>> = f1;
128128
foo(&*f2);
129129

130-
// FIXME (#22405): Replace `Box::new` with `box` here when/if possible.
131130
let f3 : Box<Fat<[isize]>> =
132131
Box::<Fat<[_; 3]>>::new(Fat { f1: 5, f2: "some str", ptr: [1, 2, 3] });
133132
foo(&*f3);
133+
let f4 : Box<Fat<[isize]>> = box Fat { f1: 5, f2: "some str", ptr: [1, 2, 3] };
134+
foo(&*f4);
134135
}

tests/run-pass/sums.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
// FIXME(solson): 32-bit mode doesn't test anything currently.
2-
#![cfg_attr(target_pointer_width = "32", allow(dead_code))]
3-
41
#[derive(Debug, PartialEq)]
52
enum Unit { Unit(()) } // Force non-C-enum representation.
63

tests/run-pass/vec-matching-fold.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ fn foldl<T, U, F>(values: &[T],
2222
&[ref head, ref tail..] =>
2323
foldl(tail, function(initial, head), function),
2424
&[] => {
25-
// FIXME: call guards
2625
let res = initial.clone(); res
2726
}
2827
}
@@ -39,7 +38,6 @@ fn foldr<T, U, F>(values: &[T],
3938
&[ref head.., ref tail] =>
4039
foldr(head, function(tail, initial), function),
4140
&[] => {
42-
// FIXME: call guards
4341
let res = initial.clone(); res
4442
}
4543
}

0 commit comments

Comments
 (0)