mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-05 20:34:52 +00:00
Fix phrasing
This commit is contained in:
parent
c2f459ca74
commit
a2e09baa32
@ -224,7 +224,7 @@ pub fn report_error<'tcx, 'mir>(
|
||||
vec![(None, format!("use Strict Provenance APIs (https://doc.rust-lang.org/nightly/std/ptr/index.html#strict-provenance, https://crates.io/crates/sptr) instead"))],
|
||||
DataRace { op2, .. } =>
|
||||
vec![
|
||||
(Some(op2.span), format!("and {} on {}, which is here", op2.action, op2.thread_info)),
|
||||
(Some(op2.span), format!("and the {} on {} is here", op2.action, op2.thread_info)),
|
||||
(None, format!("this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior")),
|
||||
(None, format!("see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information")),
|
||||
],
|
||||
|
@ -4,7 +4,7 @@ error: Undefined Behavior: Data race detected between Read on thread `<unnamed>`
|
||||
LL | *pointer.load(Ordering::Relaxed)
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between Read on thread `<unnamed>` and Allocate on thread `<unnamed>` at ALLOC. The Read is here
|
||||
|
|
||||
help: and Allocate on thread `<unnamed>`, which is here
|
||||
help: and the Allocate on thread `<unnamed>` is here
|
||||
--> $DIR/alloc_read_race.rs:LL:CC
|
||||
|
|
||||
LL | pointer.store(Box::into_raw(Box::new_uninit()), Ordering::Relaxed);
|
||||
|
@ -4,7 +4,7 @@ error: Undefined Behavior: Data race detected between Write on thread `<unnamed>
|
||||
LL | *pointer.load(Ordering::Relaxed) = 2;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between Write on thread `<unnamed>` and Allocate on thread `<unnamed>` at ALLOC. The Write is here
|
||||
|
|
||||
help: and Allocate on thread `<unnamed>`, which is here
|
||||
help: and the Allocate on thread `<unnamed>` is here
|
||||
--> $DIR/alloc_write_race.rs:LL:CC
|
||||
|
|
||||
LL | .store(Box::into_raw(Box::<usize>::new_uninit()) as *mut usize, Ordering::Relaxed);
|
||||
|
@ -4,7 +4,7 @@ error: Undefined Behavior: Data race detected between Atomic Load on thread `<un
|
||||
LL | (&*c.0).load(Ordering::SeqCst)
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between Atomic Load on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Atomic Load is here
|
||||
|
|
||||
help: and Write on thread `<unnamed>`, which is here
|
||||
help: and the Write on thread `<unnamed>` is here
|
||||
--> $DIR/atomic_read_na_write_race1.rs:LL:CC
|
||||
|
|
||||
LL | *(c.0 as *mut usize) = 32;
|
||||
|
@ -4,7 +4,7 @@ error: Undefined Behavior: Data race detected between Write on thread `<unnamed>
|
||||
LL | *atomic_ref.get_mut() = 32;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between Write on thread `<unnamed>` and Atomic Load on thread `<unnamed>` at ALLOC. The Write is here
|
||||
|
|
||||
help: and Atomic Load on thread `<unnamed>`, which is here
|
||||
help: and the Atomic Load on thread `<unnamed>` is here
|
||||
--> $DIR/atomic_read_na_write_race2.rs:LL:CC
|
||||
|
|
||||
LL | atomic_ref.load(Ordering::SeqCst)
|
||||
|
@ -4,7 +4,7 @@ error: Undefined Behavior: Data race detected between Read on thread `<unnamed>`
|
||||
LL | *atomic_ref.get_mut()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ Data race detected between Read on thread `<unnamed>` and Atomic Store on thread `<unnamed>` at ALLOC. The Read is here
|
||||
|
|
||||
help: and Atomic Store on thread `<unnamed>`, which is here
|
||||
help: and the Atomic Store on thread `<unnamed>` is here
|
||||
--> $DIR/atomic_write_na_read_race1.rs:LL:CC
|
||||
|
|
||||
LL | atomic_ref.store(32, Ordering::SeqCst)
|
||||
|
@ -4,7 +4,7 @@ error: Undefined Behavior: Data race detected between Atomic Store on thread `<u
|
||||
LL | (&*c.0).store(32, Ordering::SeqCst);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between Atomic Store on thread `<unnamed>` and Read on thread `<unnamed>` at ALLOC. The Atomic Store is here
|
||||
|
|
||||
help: and Read on thread `<unnamed>`, which is here
|
||||
help: and the Read on thread `<unnamed>` is here
|
||||
--> $DIR/atomic_write_na_read_race2.rs:LL:CC
|
||||
|
|
||||
LL | let _val = *(c.0 as *mut usize);
|
||||
|
@ -4,7 +4,7 @@ error: Undefined Behavior: Data race detected between Atomic Store on thread `<u
|
||||
LL | (&*c.0).store(64, Ordering::SeqCst);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between Atomic Store on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Atomic Store is here
|
||||
|
|
||||
help: and Write on thread `<unnamed>`, which is here
|
||||
help: and the Write on thread `<unnamed>` is here
|
||||
--> $DIR/atomic_write_na_write_race1.rs:LL:CC
|
||||
|
|
||||
LL | *(c.0 as *mut usize) = 32;
|
||||
|
@ -4,7 +4,7 @@ error: Undefined Behavior: Data race detected between Write on thread `<unnamed>
|
||||
LL | *atomic_ref.get_mut() = 32;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between Write on thread `<unnamed>` and Atomic Store on thread `<unnamed>` at ALLOC. The Write is here
|
||||
|
|
||||
help: and Atomic Store on thread `<unnamed>`, which is here
|
||||
help: and the Atomic Store on thread `<unnamed>` is here
|
||||
--> $DIR/atomic_write_na_write_race2.rs:LL:CC
|
||||
|
|
||||
LL | atomic_ref.store(64, Ordering::SeqCst);
|
||||
|
@ -4,7 +4,7 @@ error: Undefined Behavior: Data race detected between Write on thread `<unnamed>
|
||||
LL | *c.0 = 64;
|
||||
| ^^^^^^^^^ Data race detected between Write on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Write is here
|
||||
|
|
||||
help: and Write on thread `<unnamed>`, which is here
|
||||
help: and the Write on thread `<unnamed>` is here
|
||||
--> $DIR/dangling_thread_async_race.rs:LL:CC
|
||||
|
|
||||
LL | *c.0 = 32;
|
||||
|
@ -4,7 +4,7 @@ error: Undefined Behavior: Data race detected between Write on thread `main` and
|
||||
LL | *c.0 = 64;
|
||||
| ^^^^^^^^^ Data race detected between Write on thread `main` and Write on thread `<unnamed>` at ALLOC. The Write is here
|
||||
|
|
||||
help: and Write on thread `<unnamed>`, which is here
|
||||
help: and the Write on thread `<unnamed>` is here
|
||||
--> $DIR/dangling_thread_race.rs:LL:CC
|
||||
|
|
||||
LL | *c.0 = 32;
|
||||
|
@ -9,7 +9,7 @@ LL | | std::mem::align_of::<usize>(),
|
||||
LL | | );
|
||||
| |_____________^ Data race detected between Deallocate on thread `<unnamed>` and Read on thread `<unnamed>` at ALLOC. The Deallocate is here
|
||||
|
|
||||
help: and Read on thread `<unnamed>`, which is here
|
||||
help: and the Read on thread `<unnamed>` is here
|
||||
--> $DIR/dealloc_read_race1.rs:LL:CC
|
||||
|
|
||||
LL | let _val = *ptr.0;
|
||||
|
@ -4,7 +4,7 @@ error: Undefined Behavior: Data race detected between Deallocate on thread `<unn
|
||||
LL | }
|
||||
| ^ Data race detected between Deallocate on thread `<unnamed>` and Read on thread `<unnamed>` at ALLOC. The Deallocate is here
|
||||
|
|
||||
help: and Read on thread `<unnamed>`, which is here
|
||||
help: and the Read on thread `<unnamed>` is here
|
||||
--> $DIR/dealloc_read_race_stack.rs:LL:CC
|
||||
|
|
||||
LL | *pointer.load(Ordering::Acquire)
|
||||
|
@ -9,7 +9,7 @@ LL | | std::mem::align_of::<usize>(),
|
||||
LL | | );
|
||||
| |_____________^ Data race detected between Deallocate on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Deallocate is here
|
||||
|
|
||||
help: and Write on thread `<unnamed>`, which is here
|
||||
help: and the Write on thread `<unnamed>` is here
|
||||
--> $DIR/dealloc_write_race1.rs:LL:CC
|
||||
|
|
||||
LL | *ptr.0 = 2;
|
||||
|
@ -4,7 +4,7 @@ error: Undefined Behavior: Data race detected between Deallocate on thread `<unn
|
||||
LL | }
|
||||
| ^ Data race detected between Deallocate on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Deallocate is here
|
||||
|
|
||||
help: and Write on thread `<unnamed>`, which is here
|
||||
help: and the Write on thread `<unnamed>` is here
|
||||
--> $DIR/dealloc_write_race_stack.rs:LL:CC
|
||||
|
|
||||
LL | *pointer.load(Ordering::Acquire) = 3;
|
||||
|
@ -4,7 +4,7 @@ error: Undefined Behavior: Data race detected between Write on thread `<unnamed>
|
||||
LL | *c.0 = 64;
|
||||
| ^^^^^^^^^ Data race detected between Write on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Write is here
|
||||
|
|
||||
help: and Write on thread `<unnamed>`, which is here
|
||||
help: and the Write on thread `<unnamed>` is here
|
||||
--> $DIR/enable_after_join_to_main.rs:LL:CC
|
||||
|
|
||||
LL | *c.0 = 32;
|
||||
|
@ -4,7 +4,7 @@ error: Undefined Behavior: Data race detected between Write on thread `main` and
|
||||
LL | unsafe { V = 2 }
|
||||
| ^^^^^ Data race detected between Write on thread `main` and Write on thread `<unnamed>` at ALLOC. The Write is here
|
||||
|
|
||||
help: and Write on thread `<unnamed>`, which is here
|
||||
help: and the Write on thread `<unnamed>` is here
|
||||
--> $DIR/fence_after_load.rs:LL:CC
|
||||
|
|
||||
LL | unsafe { V = 1 }
|
||||
|
@ -4,7 +4,7 @@ error: Undefined Behavior: Data race detected between Write on thread `<unnamed>
|
||||
LL | *c.0 = 64;
|
||||
| ^^^^^^^^^ Data race detected between Write on thread `<unnamed>` and Read on thread `<unnamed>` at ALLOC. The Write is here
|
||||
|
|
||||
help: and Read on thread `<unnamed>`, which is here
|
||||
help: and the Read on thread `<unnamed>` is here
|
||||
--> $DIR/read_write_race.rs:LL:CC
|
||||
|
|
||||
LL | let _val = *c.0;
|
||||
|
@ -4,7 +4,7 @@ error: Undefined Behavior: Data race detected between Read on thread `<unnamed>`
|
||||
LL | stack_var
|
||||
| ^^^^^^^^^ Data race detected between Read on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Read is here
|
||||
|
|
||||
help: and Write on thread `<unnamed>`, which is here
|
||||
help: and the Write on thread `<unnamed>` is here
|
||||
--> $DIR/read_write_race_stack.rs:LL:CC
|
||||
|
|
||||
LL | *pointer.load(Ordering::Acquire) = 3;
|
||||
|
@ -4,7 +4,7 @@ error: Undefined Behavior: Data race detected between Read on thread `<unnamed>`
|
||||
LL | *c.0
|
||||
| ^^^^ Data race detected between Read on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Read is here
|
||||
|
|
||||
help: and Write on thread `<unnamed>`, which is here
|
||||
help: and the Write on thread `<unnamed>` is here
|
||||
--> $DIR/relax_acquire_race.rs:LL:CC
|
||||
|
|
||||
LL | *c.0 = 1;
|
||||
|
@ -4,7 +4,7 @@ error: Undefined Behavior: Data race detected between Read on thread `<unnamed>`
|
||||
LL | *c.0
|
||||
| ^^^^ Data race detected between Read on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Read is here
|
||||
|
|
||||
help: and Write on thread `<unnamed>`, which is here
|
||||
help: and the Write on thread `<unnamed>` is here
|
||||
--> $DIR/release_seq_race.rs:LL:CC
|
||||
|
|
||||
LL | *c.0 = 1;
|
||||
|
@ -4,7 +4,7 @@ error: Undefined Behavior: Data race detected between Read on thread `<unnamed>`
|
||||
LL | *c.0
|
||||
| ^^^^ Data race detected between Read on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Read is here
|
||||
|
|
||||
help: and Write on thread `<unnamed>`, which is here
|
||||
help: and the Write on thread `<unnamed>` is here
|
||||
--> $DIR/release_seq_race_same_thread.rs:LL:CC
|
||||
|
|
||||
LL | *c.0 = 1;
|
||||
|
@ -4,7 +4,7 @@ error: Undefined Behavior: Data race detected between Read on thread `<unnamed>`
|
||||
LL | *c.0
|
||||
| ^^^^ Data race detected between Read on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Read is here
|
||||
|
|
||||
help: and Write on thread `<unnamed>`, which is here
|
||||
help: and the Write on thread `<unnamed>` is here
|
||||
--> $DIR/rmw_race.rs:LL:CC
|
||||
|
|
||||
LL | *c.0 = 1;
|
||||
|
@ -4,7 +4,7 @@ error: Undefined Behavior: Data race detected between Deallocate on thread `main
|
||||
LL | }
|
||||
| ^ Data race detected between Deallocate on thread `main` and Read on thread `<unnamed>` at ALLOC. The Deallocate is here
|
||||
|
|
||||
help: and Read on thread `<unnamed>`, which is here
|
||||
help: and the Read on thread `<unnamed>` is here
|
||||
--> $DIR/stack_pop_race.rs:LL:CC
|
||||
|
|
||||
LL | let _val = unsafe { *ptr.0 };
|
||||
|
@ -4,7 +4,7 @@ error: Undefined Behavior: Data race detected between Write on thread `<unnamed>
|
||||
LL | *c.0 = 64;
|
||||
| ^^^^^^^^^ Data race detected between Write on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Write is here
|
||||
|
|
||||
help: and Write on thread `<unnamed>`, which is here
|
||||
help: and the Write on thread `<unnamed>` is here
|
||||
--> $DIR/write_write_race.rs:LL:CC
|
||||
|
|
||||
LL | *c.0 = 32;
|
||||
|
@ -4,7 +4,7 @@ error: Undefined Behavior: Data race detected between Write on thread `<unnamed>
|
||||
LL | stack_var = 1usize;
|
||||
| ^^^^^^^^^^^^^^^^^^ Data race detected between Write on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Write is here
|
||||
|
|
||||
help: and Write on thread `<unnamed>`, which is here
|
||||
help: and the Write on thread `<unnamed>` is here
|
||||
--> $DIR/write_write_race_stack.rs:LL:CC
|
||||
|
|
||||
LL | *pointer.load(Ordering::Acquire) = 3;
|
||||
|
@ -4,7 +4,7 @@ error: Undefined Behavior: Data race detected between Write on thread `<unnamed>
|
||||
LL | *p = 5;
|
||||
| ^^^^^^ Data race detected between Write on thread `<unnamed>` and Read on thread `<unnamed>` at ALLOC. The Write is here
|
||||
|
|
||||
help: and Read on thread `<unnamed>`, which is here
|
||||
help: and the Read on thread `<unnamed>` is here
|
||||
--> $DIR/retag_data_race_read.rs:LL:CC
|
||||
|
|
||||
LL | let _r = &*p;
|
||||
|
@ -4,7 +4,7 @@ error: Undefined Behavior: Data race detected between Write on thread `<unnamed>
|
||||
LL | *p = 5;
|
||||
| ^^^^^^ Data race detected between Write on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Write is here
|
||||
|
|
||||
help: and Write on thread `<unnamed>`, which is here
|
||||
help: and the Write on thread `<unnamed>` is here
|
||||
--> $DIR/retag_data_race_write.rs:LL:CC
|
||||
|
|
||||
LL | let _r = &mut *p;
|
||||
|
Loading…
Reference in New Issue
Block a user