Skip to content

Commit 58e7b8f

Browse files
committed
Auto merge of rust-lang#2356 - rust-lang:slash_slash_at, r=RalfJung
require level and colon in `//~` style comments implements rust-lang/miri#2348 (comment)
2 parents 97d115c + bfc23e2 commit 58e7b8f

File tree

245 files changed

+346
-391
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

245 files changed

+346
-391
lines changed

tests/fail/alloc/reallocate-change-alloc.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ fn main() {
44
unsafe {
55
let x = alloc(Layout::from_size_align_unchecked(1, 1));
66
let _y = realloc(x, Layout::from_size_align_unchecked(1, 1), 1);
7-
let _z = *x; //~ ERROR dereferenced after this allocation got freed
7+
let _z = *x; //~ ERROR: dereferenced after this allocation got freed
88
}
99
}

tests/fail/backtrace/bad-backtrace-decl.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ fn main() {
77
let frames = unsafe { miri_get_backtrace(0) };
88
for frame in frames.into_iter() {
99
unsafe {
10-
miri_resolve_frame(*frame, 0); //~ ERROR Undefined Behavior: bad declaration of miri_resolve_frame - should return a struct with 5 fields
10+
miri_resolve_frame(*frame, 0); //~ ERROR: Undefined Behavior: bad declaration of miri_resolve_frame - should return a struct with 5 fields
1111
}
1212
}
1313
}

tests/fail/backtrace/bad-backtrace-flags.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ extern "Rust" {
44

55
fn main() {
66
unsafe {
7-
miri_get_backtrace(2, std::ptr::null_mut()); //~ ERROR unsupported operation: unknown `miri_get_backtrace` flags 2
7+
miri_get_backtrace(2, std::ptr::null_mut()); //~ ERROR: unsupported operation: unknown `miri_get_backtrace` flags 2
88
}
99
}

tests/fail/backtrace/bad-backtrace-ptr.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ extern "Rust" {
44

55
fn main() {
66
unsafe {
7-
miri_resolve_frame(std::ptr::null_mut(), 0); //~ ERROR null pointer is a dangling pointer
7+
miri_resolve_frame(std::ptr::null_mut(), 0); //~ ERROR: null pointer is a dangling pointer
88
}
99
}

tests/fail/backtrace/bad-backtrace-resolve-flags.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ fn main() {
2020
miri_get_backtrace(1, buf.as_mut_ptr());
2121

2222
// miri_resolve_frame will error from an invalid backtrace before it will from invalid flags
23-
miri_resolve_frame(buf[0], 2); //~ ERROR unsupported operation: unknown `miri_resolve_frame` flags 2
23+
miri_resolve_frame(buf[0], 2); //~ ERROR: unsupported operation: unknown `miri_resolve_frame` flags 2
2424
}
2525
}

tests/fail/backtrace/bad-backtrace-resolve-names-flags.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ fn main() {
1111
miri_get_backtrace(1, buf.as_mut_ptr());
1212

1313
// miri_resolve_frame_names will error from an invalid backtrace before it will from invalid flags
14-
miri_resolve_frame_names(buf[0], 2, std::ptr::null_mut(), std::ptr::null_mut()); //~ ERROR unsupported operation: unknown `miri_resolve_frame_names` flags 2
14+
miri_resolve_frame_names(buf[0], 2, std::ptr::null_mut(), std::ptr::null_mut()); //~ ERROR: unsupported operation: unknown `miri_resolve_frame_names` flags 2
1515
}
1616
}

tests/fail/backtrace/bad-backtrace-size-flags.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ extern "Rust" {
44

55
fn main() {
66
unsafe {
7-
miri_backtrace_size(2); //~ ERROR unsupported operation: unknown `miri_backtrace_size` flags 2
7+
miri_backtrace_size(2); //~ ERROR: unsupported operation: unknown `miri_backtrace_size` flags 2
88
}
99
}

tests/fail/box-cell-alias.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use std::cell::Cell;
66

77
fn helper(val: Box<Cell<u8>>, ptr: *const Cell<u8>) -> u8 {
88
val.set(10);
9-
unsafe { (*ptr).set(20) }; //~ ERROR does not exist in the borrow stack
9+
unsafe { (*ptr).set(20) }; //~ ERROR: does not exist in the borrow stack
1010
val.get()
1111
}
1212

tests/fail/branchless-select-i128-pointer.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ fn main() {
1212
// However, it drops provenance when transmuting to TwoPtrs, so this is UB.
1313
let val = unsafe {
1414
transmute::<_, &str>(
15-
//~^ ERROR constructing invalid value: encountered a dangling reference
15+
//~^ ERROR: constructing invalid value: encountered a dangling reference
1616
!mask & transmute::<_, TwoPtrs>("false !")
1717
| mask & transmute::<_, TwoPtrs>("true !"),
1818
)

tests/fail/breakpoint.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
fn main() {
44
unsafe {
5-
core::intrinsics::breakpoint() //~ ERROR Trace/breakpoint trap
5+
core::intrinsics::breakpoint() //~ ERROR: Trace/breakpoint trap
66
};
77
}

tests/fail/concurrency/thread_local_static_dealloc.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ unsafe impl Send for SendRaw {}
1313
fn main() {
1414
unsafe {
1515
let dangling_ptr = std::thread::spawn(|| SendRaw(&TLS as *const u8)).join().unwrap();
16-
let _val = *dangling_ptr.0; //~ ERROR dereferenced after this allocation got freed
16+
let _val = *dangling_ptr.0; //~ ERROR: dereferenced after this allocation got freed
1717
}
1818
}

tests/fail/concurrency/unwind_top_of_stack.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ extern crate libc;
1010
use std::{mem, ptr};
1111

1212
extern "C-unwind" fn thread_start(_null: *mut libc::c_void) -> *mut libc::c_void {
13-
//~^ ERROR unwinding past the topmost frame of the stack
13+
//~^ ERROR: unwinding past the topmost frame of the stack
1414
panic!()
1515
}
1616

tests/fail/dangling_pointers/dangling_pointer_addr_of.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ fn main() {
77
let b = Box::new(42);
88
&*b as *const i32
99
};
10-
let x = unsafe { ptr::addr_of!(*p) }; //~ ERROR dereferenced after this allocation got freed
10+
let x = unsafe { ptr::addr_of!(*p) }; //~ ERROR: dereferenced after this allocation got freed
1111
panic!("this should never print: {:?}", x);
1212
}

tests/fail/dangling_pointers/dangling_pointer_deref.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ fn main() {
66
let b = Box::new(42);
77
&*b as *const i32
88
};
9-
let x = unsafe { *p }; //~ ERROR dereferenced after this allocation got freed
9+
let x = unsafe { *p }; //~ ERROR: dereferenced after this allocation got freed
1010
panic!("this should never print: {}", x);
1111
}

tests/fail/dangling_pointers/dangling_zst_deref.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ fn main() {
77
let b = Box::new(42);
88
&*b as *const i32 as *const ()
99
};
10-
let _x = unsafe { *p }; //~ ERROR dereferenced after this allocation got freed
10+
let _x = unsafe { *p }; //~ ERROR: dereferenced after this allocation got freed
1111
}

tests/fail/dangling_pointers/deref-invalid-ptr.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33

44
fn main() {
55
let x = 16usize as *const u32;
6-
let _y = unsafe { &*x as *const u32 }; //~ ERROR is a dangling pointer
6+
let _y = unsafe { &*x as *const u32 }; //~ ERROR: is a dangling pointer
77
}

tests/fail/dangling_pointers/deref-partially-dangling.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
fn main() {
44
let x = (1, 13);
55
let xptr = &x as *const _ as *const (i32, i32, i32);
6-
let val = unsafe { (*xptr).1 }; //~ ERROR pointer to 12 bytes starting at offset 0 is out-of-bounds
6+
let val = unsafe { (*xptr).1 }; //~ ERROR: pointer to 12 bytes starting at offset 0 is out-of-bounds
77
assert_eq!(val, 13);
88
}

tests/fail/dangling_pointers/dyn_size.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ fn main() {
99
// That should be UB, as the reference is not fully dereferencable.
1010
let ptr: *const SliceWithHead = unsafe { std::mem::transmute((&buf, 4usize)) };
1111
// Re-borrow that. This should be UB.
12-
let _ptr = unsafe { &*ptr }; //~ ERROR pointer to 5 bytes starting at offset 0 is out-of-bounds
12+
let _ptr = unsafe { &*ptr }; //~ ERROR: pointer to 5 bytes starting at offset 0 is out-of-bounds
1313
}

tests/fail/dangling_pointers/maybe_null_pointer_deref_zst.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
fn main() {
55
// This pointer *could* be NULL so we cannot load from it, not even at ZST
66
let ptr = (&0u8 as *const u8).wrapping_sub(0x800) as *const ();
7-
let _x: () = unsafe { *ptr }; //~ ERROR out-of-bounds
7+
let _x: () = unsafe { *ptr }; //~ ERROR: out-of-bounds
88
}

tests/fail/dangling_pointers/maybe_null_pointer_write_zst.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ fn main() {
77
// Also not assigning directly as that's array initialization, not assignment.
88
let zst_val = [1u8; 0];
99
let ptr = (&0u8 as *const u8).wrapping_sub(0x800) as *mut [u8; 0];
10-
unsafe { *ptr = zst_val }; //~ ERROR out-of-bounds
10+
unsafe { *ptr = zst_val }; //~ ERROR: out-of-bounds
1111
}
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#[allow(deref_nullptr)]
22
fn main() {
3-
let x: i32 = unsafe { *std::ptr::null() }; //~ ERROR null pointer is a dangling pointer
3+
let x: i32 = unsafe { *std::ptr::null() }; //~ ERROR: null pointer is a dangling pointer
44
panic!("this should never print: {}", x);
55
}

tests/fail/dangling_pointers/null_pointer_deref_zst.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33

44
#[allow(deref_nullptr)]
55
fn main() {
6-
let x: () = unsafe { *std::ptr::null() }; //~ ERROR dereferencing pointer failed: null pointer is a dangling pointer
6+
let x: () = unsafe { *std::ptr::null() }; //~ ERROR: dereferencing pointer failed: null pointer is a dangling pointer
77
panic!("this should never print: {:?}", x);
88
}
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#[allow(deref_nullptr)]
22
fn main() {
3-
unsafe { *std::ptr::null_mut() = 0i32 }; //~ ERROR null pointer is a dangling pointer
3+
unsafe { *std::ptr::null_mut() = 0i32 }; //~ ERROR: null pointer is a dangling pointer
44
}
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
fn main() {
22
let v: Vec<u8> = vec![1, 2];
3-
let x = unsafe { *v.as_ptr().wrapping_offset(5) }; //~ ERROR out-of-bounds
3+
let x = unsafe { *v.as_ptr().wrapping_offset(5) }; //~ ERROR: out-of-bounds
44
panic!("this should never print: {}", x);
55
}
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
fn main() {
22
let v: Vec<u8> = vec![1, 2];
3-
let x = unsafe { *v.as_ptr().wrapping_offset(5) }; //~ ERROR out-of-bounds
3+
let x = unsafe { *v.as_ptr().wrapping_offset(5) }; //~ ERROR: out-of-bounds
44
panic!("this should never print: {}", x);
55
}

tests/fail/dangling_pointers/stack_temporary.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ unsafe fn make_ref<'a>(x: *mut i32) -> &'a mut i32 {
88
fn main() {
99
unsafe {
1010
let x = make_ref(&mut 0); // The temporary storing "0" is deallocated at the ";"!
11-
let val = *x; //~ ERROR dereferenced after this allocation got freed
11+
let val = *x; //~ ERROR: dereferenced after this allocation got freed
1212
println!("{}", val);
1313
}
1414
}

tests/fail/dangling_pointers/storage_dead_dangling.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ fn fill(v: &mut i32) {
1010
}
1111

1212
fn evil() {
13-
unsafe { &mut *(LEAK as *mut i32) }; //~ ERROR is a dangling pointer
13+
unsafe { &mut *(LEAK as *mut i32) }; //~ ERROR: is a dangling pointer
1414
}
1515

1616
fn main() {

tests/fail/dangling_pointers/wild_pointer_deref.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
fn main() {
44
let p = 44 as *const i32;
5-
let x = unsafe { *p }; //~ ERROR is a dangling pointer
5+
let x = unsafe { *p }; //~ ERROR: is a dangling pointer
66
panic!("this should never print: {}", x);
77
}

tests/fail/data_race/alloc_read_race.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ pub fn main() {
3838
let pointer = &*ptr.0;
3939

4040
// Note: could also error due to reading uninitialized memory, but the data-race detector triggers first.
41-
*pointer.load(Ordering::Relaxed) //~ ERROR Data race detected between Read on thread `<unnamed>` and Allocate on thread `<unnamed>`
41+
*pointer.load(Ordering::Relaxed) //~ ERROR: Data race detected between Read on thread `<unnamed>` and Allocate on thread `<unnamed>`
4242
});
4343

4444
j1.join().unwrap();

tests/fail/data_race/alloc_write_race.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ pub fn main() {
3636

3737
let j2 = spawn(move || {
3838
let pointer = &*ptr.0;
39-
*pointer.load(Ordering::Relaxed) = 2; //~ ERROR Data race detected between Write on thread `<unnamed>` and Allocate on thread `<unnamed>`
39+
*pointer.load(Ordering::Relaxed) = 2; //~ ERROR: Data race detected between Write on thread `<unnamed>` and Allocate on thread `<unnamed>`
4040
});
4141

4242
j1.join().unwrap();

tests/fail/data_race/atomic_read_na_write_race1.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ pub fn main() {
2424

2525
let j2 = spawn(move || {
2626
//Equivalent to: (&*c.0).load(Ordering::SeqCst)
27-
intrinsics::atomic_load_seqcst(c.0 as *mut usize) //~ ERROR Data race detected between Atomic Load on thread `<unnamed>` and Write on thread `<unnamed>`
27+
intrinsics::atomic_load_seqcst(c.0 as *mut usize) //~ ERROR: Data race detected between Atomic Load on thread `<unnamed>` and Write on thread `<unnamed>`
2828
});
2929

3030
j1.join().unwrap();

tests/fail/data_race/atomic_read_na_write_race2.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ pub fn main() {
2424

2525
let j2 = spawn(move || {
2626
let atomic_ref = &mut *c.0;
27-
*atomic_ref.get_mut() = 32; //~ ERROR Data race detected between Write on thread `<unnamed>` and Atomic Load on thread `<unnamed>`
27+
*atomic_ref.get_mut() = 32; //~ ERROR: Data race detected between Write on thread `<unnamed>` and Atomic Load on thread `<unnamed>`
2828
});
2929

3030
j1.join().unwrap();

tests/fail/data_race/atomic_write_na_read_race1.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ pub fn main() {
2424

2525
let j2 = spawn(move || {
2626
let atomic_ref = &mut *c.0;
27-
*atomic_ref.get_mut() //~ ERROR Data race detected between Read on thread `<unnamed>` and Atomic Store on thread `<unnamed>`
27+
*atomic_ref.get_mut() //~ ERROR: Data race detected between Read on thread `<unnamed>` and Atomic Store on thread `<unnamed>`
2828
});
2929

3030
j1.join().unwrap();

tests/fail/data_race/atomic_write_na_read_race2.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ pub fn main() {
2424

2525
let j2 = spawn(move || {
2626
//Equivalent to: (&*c.0).store(32, Ordering::SeqCst)
27-
atomic_store(c.0 as *mut usize, 32); //~ ERROR Data race detected between Atomic Store on thread `<unnamed>` and Read on thread `<unnamed>`
27+
atomic_store(c.0 as *mut usize, 32); //~ ERROR: Data race detected between Atomic Store on thread `<unnamed>` and Read on thread `<unnamed>`
2828
});
2929

3030
j1.join().unwrap();

tests/fail/data_race/atomic_write_na_write_race1.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ pub fn main() {
2424

2525
let j2 = spawn(move || {
2626
//Equivalent to: (&*c.0).store(64, Ordering::SeqCst)
27-
atomic_store(c.0 as *mut usize, 64); //~ ERROR Data race detected between Atomic Store on thread `<unnamed>` and Write on thread `<unnamed>`
27+
atomic_store(c.0 as *mut usize, 64); //~ ERROR: Data race detected between Atomic Store on thread `<unnamed>` and Write on thread `<unnamed>`
2828
});
2929

3030
j1.join().unwrap();

tests/fail/data_race/atomic_write_na_write_race2.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ pub fn main() {
2424

2525
let j2 = spawn(move || {
2626
let atomic_ref = &mut *c.0;
27-
*atomic_ref.get_mut() = 32; //~ ERROR Data race detected between Write on thread `<unnamed>` and Atomic Store on thread `<unnamed>`
27+
*atomic_ref.get_mut() = 32; //~ ERROR: Data race detected between Write on thread `<unnamed>` and Atomic Store on thread `<unnamed>`
2828
});
2929

3030
j1.join().unwrap();

tests/fail/data_race/dangling_thread_async_race.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ fn main() {
3535

3636
let join2 = unsafe {
3737
spawn(move || {
38-
*c.0 = 64; //~ ERROR Data race detected between Write on thread `<unnamed>` and Write on thread `<unnamed>`
38+
*c.0 = 64; //~ ERROR: Data race detected between Write on thread `<unnamed>` and Write on thread `<unnamed>`
3939
})
4040
};
4141

tests/fail/data_race/dangling_thread_race.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,6 @@ fn main() {
3434
spawn(|| ()).join().unwrap();
3535

3636
unsafe {
37-
*c.0 = 64; //~ ERROR Data race detected between Write on thread `main` and Write on thread `<unnamed>`
37+
*c.0 = 64; //~ ERROR: Data race detected between Write on thread `main` and Write on thread `<unnamed>`
3838
}
3939
}

tests/fail/data_race/dealloc_read_race1.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ pub fn main() {
2626

2727
let j2 = spawn(move || {
2828
__rust_dealloc(
29-
//~^ ERROR Data race detected between Deallocate on thread `<unnamed>` and Read on thread `<unnamed>`
29+
//~^ ERROR: Data race detected between Deallocate on thread `<unnamed>` and Read on thread `<unnamed>`
3030
ptr.0 as *mut _,
3131
std::mem::size_of::<usize>(),
3232
std::mem::align_of::<usize>(),

tests/fail/data_race/dealloc_read_race2.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ pub fn main() {
3131
let j2 = spawn(move || {
3232
// Also an error of the form: Data race detected between Read on thread `<unnamed>` and Deallocate on thread `<unnamed>`
3333
// but the invalid allocation is detected first.
34-
*ptr.0 //~ ERROR dereferenced after this allocation got freed
34+
*ptr.0 //~ ERROR: dereferenced after this allocation got freed
3535
});
3636

3737
j1.join().unwrap();

tests/fail/data_race/dealloc_read_race_stack.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ pub fn main() {
3636
sleep(Duration::from_millis(200));
3737

3838
// Now `stack_var` gets deallocated.
39-
} //~ ERROR Data race detected between Deallocate on thread `<unnamed>` and Read on thread `<unnamed>`
39+
} //~ ERROR: Data race detected between Deallocate on thread `<unnamed>` and Read on thread `<unnamed>`
4040
});
4141

4242
let j2 = spawn(move || {

tests/fail/data_race/dealloc_write_race1.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ pub fn main() {
2525

2626
let j2 = spawn(move || {
2727
__rust_dealloc(
28-
//~^ ERROR Data race detected between Deallocate on thread `<unnamed>` and Write on thread `<unnamed>`
28+
//~^ ERROR: Data race detected between Deallocate on thread `<unnamed>` and Write on thread `<unnamed>`
2929
ptr.0 as *mut _,
3030
std::mem::size_of::<usize>(),
3131
std::mem::align_of::<usize>(),

tests/fail/data_race/dealloc_write_race2.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ pub fn main() {
3030
let j2 = spawn(move || {
3131
// Also an error of the form: Data race detected between Write on thread `<unnamed>` and Deallocate on thread `<unnamed>`
3232
// but the invalid allocation is detected first.
33-
*ptr.0 = 2; //~ ERROR dereferenced after this allocation got freed
33+
*ptr.0 = 2; //~ ERROR: dereferenced after this allocation got freed
3434
});
3535

3636
j1.join().unwrap();

tests/fail/data_race/dealloc_write_race_stack.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ pub fn main() {
3636
sleep(Duration::from_millis(200));
3737

3838
// Now `stack_var` gets deallocated.
39-
} //~ ERROR Data race detected between Deallocate on thread `<unnamed>` and Write on thread `<unnamed>`
39+
} //~ ERROR: Data race detected between Deallocate on thread `<unnamed>` and Write on thread `<unnamed>`
4040
});
4141

4242
let j2 = spawn(move || {

tests/fail/data_race/enable_after_join_to_main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ pub fn main() {
3131
});
3232

3333
let j2 = spawn(move || {
34-
*c.0 = 64; //~ ERROR Data race detected between Write on thread `<unnamed>` and Write on thread `<unnamed>`
34+
*c.0 = 64; //~ ERROR: Data race detected between Write on thread `<unnamed>` and Write on thread `<unnamed>`
3535
});
3636

3737
j1.join().unwrap();

tests/fail/data_race/fence_after_load.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ fn main() {
2121
// The fence is useless, since it did not happen-after the `store` in the other thread.
2222
// Hence this is a data race.
2323
// Also see https://github.com/rust-lang/miri/issues/2192.
24-
unsafe { V = 2 } //~ERROR Data race detected between Write on thread `main` and Write on thread `<unnamed>`
24+
unsafe { V = 2 } //~ERROR: Data race detected between Write on thread `main` and Write on thread `<unnamed>`
2525
}

tests/fail/data_race/read_write_race.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ pub fn main() {
2020
});
2121

2222
let j2 = spawn(move || {
23-
*c.0 = 64; //~ ERROR Data race detected between Write on thread `<unnamed>` and Read on thread `<unnamed>`
23+
*c.0 = 64; //~ ERROR: Data race detected between Write on thread `<unnamed>` and Read on thread `<unnamed>`
2424
});
2525

2626
j1.join().unwrap();

tests/fail/data_race/read_write_race_stack.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ pub fn main() {
4343

4444
sleep(Duration::from_millis(200));
4545

46-
stack_var //~ ERROR Data race detected between Read on thread `<unnamed>` and Write on thread `<unnamed>`
46+
stack_var //~ ERROR: Data race detected between Read on thread `<unnamed>` and Write on thread `<unnamed>`
4747
});
4848

4949
let j2 = spawn(move || {

0 commit comments

Comments
 (0)