about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMara Bos <m-ou.se@m-ou.se>2020-09-21 21:12:20 +0200
committerMara Bos <m-ou.se@m-ou.se>2020-09-21 21:20:05 +0200
commitbcc1d56917fe061071ebc539b5d2e304a44a7b00 (patch)
tree4e63e8f33fe9c354bd29731da787f94dc36f7b57
parent5d6f1a1e32de4936e5b269b04781b2737f6d410b (diff)
downloadrust-bcc1d56917fe061071ebc539b5d2e304a44a7b00.tar.gz
rust-bcc1d56917fe061071ebc539b5d2e304a44a7b00.zip
Test that AtomicU64::from_mut is not available on x86 linux.
-rw-r--r--src/test/ui/atomic-from-mut-not-available.rs7
-rw-r--r--src/test/ui/atomic-from-mut-not-available.stderr9
2 files changed, 16 insertions, 0 deletions
diff --git a/src/test/ui/atomic-from-mut-not-available.rs b/src/test/ui/atomic-from-mut-not-available.rs
new file mode 100644
index 00000000000..bf946160075
--- /dev/null
+++ b/src/test/ui/atomic-from-mut-not-available.rs
@@ -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`
+}
diff --git a/src/test/ui/atomic-from-mut-not-available.stderr b/src/test/ui/atomic-from-mut-not-available.stderr
new file mode 100644
index 00000000000..d1ebca8a29e
--- /dev/null
+++ b/src/test/ui/atomic-from-mut-not-available.stderr
@@ -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`.