Test that AtomicU64::from_mut is not available on x86 linux.
This commit is contained in:
parent
5d6f1a1e32
commit
bcc1d56917
2 changed files with 16 additions and 0 deletions
7
src/test/ui/atomic-from-mut-not-available.rs
Normal file
7
src/test/ui/atomic-from-mut-not-available.rs
Normal file
|
@ -0,0 +1,7 @@
|
|||
// only-x86
|
||||
// only-linux
|
||||
|
||||
fn main() {
|
||||
core::sync::atomic::AtomicU64::from_mut(&mut 0u64);
|
||||
//~^ ERROR: no function or associated item named `from_mut` found for struct `AtomicU64`
|
||||
}
|
9
src/test/ui/atomic-from-mut-not-available.stderr
Normal file
9
src/test/ui/atomic-from-mut-not-available.stderr
Normal file
|
@ -0,0 +1,9 @@
|
|||
error[E0599]: no function or associated item named `from_mut` found for struct `AtomicU64` in the current scope
|
||||
--> $DIR/atomic-from-mut-not-available.rs:5:36
|
||||
|
|
||||
LL | core::sync::atomic::AtomicU64::from_mut(&mut 0u64);
|
||||
| ^^^^^^^^ function or associated item not found in `AtomicU64`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0599`.
|
Loading…
Reference in a new issue