about summary refs log tree commit diff
path: root/tests/ui/error-codes
diff options
context:
space:
mode:
authorBennet Bleßmann <bb-github@t-online.de>2025-04-06 15:12:24 +0200
committerBennet Bleßmann <3877590+Skgland@users.noreply.github.com>2025-04-06 21:41:47 +0200
commit7dd57f085cab4cc671b01d6dd27977c76d04de28 (patch)
tree73f3be9ea696210dbe161727fb46a893cc4758b6 /tests/ui/error-codes
parent6dfb29624cf2fd1b6d2f31e6321bcef5e4a4a84e (diff)
downloadrust-7dd57f085cab4cc671b01d6dd27977c76d04de28.tar.gz
rust-7dd57f085cab4cc671b01d6dd27977c76d04de28.zip
update/bless tests
Diffstat (limited to 'tests/ui/error-codes')
-rw-r--r--tests/ui/error-codes/E0092.rs9
-rw-r--r--tests/ui/error-codes/E0092.stderr6
-rw-r--r--tests/ui/error-codes/E0093.rs11
-rw-r--r--tests/ui/error-codes/E0093.stderr6
-rw-r--r--tests/ui/error-codes/E0622.rs14
-rw-r--r--tests/ui/error-codes/E0622.stderr6
6 files changed, 29 insertions, 23 deletions
diff --git a/tests/ui/error-codes/E0092.rs b/tests/ui/error-codes/E0092.rs
index ddaace98bd4..19a7c65a48e 100644
--- a/tests/ui/error-codes/E0092.rs
+++ b/tests/ui/error-codes/E0092.rs
@@ -1,7 +1,6 @@
 #![feature(intrinsics)]
-extern "rust-intrinsic" {
-    fn atomic_foo(); //~ ERROR E0092
-}
 
-fn main() {
-}
+#[rustc_intrinsic]
+unsafe fn atomic_foo(); //~ ERROR E0092
+
+fn main() {}
diff --git a/tests/ui/error-codes/E0092.stderr b/tests/ui/error-codes/E0092.stderr
index 4ff2e6f077d..003c989fd59 100644
--- a/tests/ui/error-codes/E0092.stderr
+++ b/tests/ui/error-codes/E0092.stderr
@@ -1,8 +1,8 @@
 error[E0092]: unrecognized atomic operation function: `foo`
-  --> $DIR/E0092.rs:3:5
+  --> $DIR/E0092.rs:4:11
    |
-LL |     fn atomic_foo();
-   |     ^^^^^^^^^^^^^^^^ unrecognized atomic operation
+LL | unsafe fn atomic_foo();
+   |           ^^^^^^^^^^ unrecognized atomic operation
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/error-codes/E0093.rs b/tests/ui/error-codes/E0093.rs
index a2f0b1ae443..24df7a9a32b 100644
--- a/tests/ui/error-codes/E0093.rs
+++ b/tests/ui/error-codes/E0093.rs
@@ -1,8 +1,7 @@
 #![feature(intrinsics)]
-extern "rust-intrinsic" {
-    fn foo();
-    //~^ ERROR E0093
-}
 
-fn main() {
-}
+#[rustc_intrinsic]
+unsafe fn foo();
+//~^ ERROR E0093
+
+fn main() {}
diff --git a/tests/ui/error-codes/E0093.stderr b/tests/ui/error-codes/E0093.stderr
index 51c367b343a..d81bf53976a 100644
--- a/tests/ui/error-codes/E0093.stderr
+++ b/tests/ui/error-codes/E0093.stderr
@@ -1,8 +1,8 @@
 error[E0093]: unrecognized intrinsic function: `foo`
-  --> $DIR/E0093.rs:3:5
+  --> $DIR/E0093.rs:4:11
    |
-LL |     fn foo();
-   |     ^^^^^^^^^ unrecognized intrinsic
+LL | unsafe fn foo();
+   |           ^^^ unrecognized intrinsic
    |
    = help: if you're adding an intrinsic, be sure to update `check_intrinsic_type`
 
diff --git a/tests/ui/error-codes/E0622.rs b/tests/ui/error-codes/E0622.rs
index 08c6d171296..0c2a4f226d8 100644
--- a/tests/ui/error-codes/E0622.rs
+++ b/tests/ui/error-codes/E0622.rs
@@ -1,6 +1,14 @@
 #![feature(intrinsics)]
-extern "rust-intrinsic" {
-    pub static atomic_singlethreadfence_seqcst : unsafe extern "rust-intrinsic" fn();
+
+extern "C" {
+
+    #[rustc_intrinsic]
+    pub static atomic_singlethreadfence_seqcst: unsafe extern "C" fn();
     //~^ ERROR intrinsic must be a function [E0622]
 }
-fn main() { unsafe { atomic_singlethreadfence_seqcst(); } }
+
+fn main() {
+    unsafe {
+        atomic_singlethreadfence_seqcst();
+    }
+}
diff --git a/tests/ui/error-codes/E0622.stderr b/tests/ui/error-codes/E0622.stderr
index 739ec984fc6..c0aea542af0 100644
--- a/tests/ui/error-codes/E0622.stderr
+++ b/tests/ui/error-codes/E0622.stderr
@@ -1,8 +1,8 @@
 error[E0622]: intrinsic must be a function
-  --> $DIR/E0622.rs:3:5
+  --> $DIR/E0622.rs:6:5
    |
-LL |     pub static atomic_singlethreadfence_seqcst : unsafe extern "rust-intrinsic" fn();
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected a function
+LL |     pub static atomic_singlethreadfence_seqcst: unsafe extern "C" fn();
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected a function
 
 error: aborting due to 1 previous error