diff options
| author | Bennet Bleßmann <bb-github@t-online.de> | 2025-04-06 15:12:24 +0200 |
|---|---|---|
| committer | Bennet Bleßmann <3877590+Skgland@users.noreply.github.com> | 2025-04-06 21:41:47 +0200 |
| commit | 7dd57f085cab4cc671b01d6dd27977c76d04de28 (patch) | |
| tree | 73f3be9ea696210dbe161727fb46a893cc4758b6 /compiler/rustc_error_codes | |
| parent | 6dfb29624cf2fd1b6d2f31e6321bcef5e4a4a84e (diff) | |
| download | rust-7dd57f085cab4cc671b01d6dd27977c76d04de28.tar.gz rust-7dd57f085cab4cc671b01d6dd27977c76d04de28.zip | |
update/bless tests
Diffstat (limited to 'compiler/rustc_error_codes')
| -rw-r--r-- | compiler/rustc_error_codes/src/error_codes/E0622.md | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/rustc_error_codes/src/error_codes/E0622.md b/compiler/rustc_error_codes/src/error_codes/E0622.md index 4cb605b636d..e6ff949d3e9 100644 --- a/compiler/rustc_error_codes/src/error_codes/E0622.md +++ b/compiler/rustc_error_codes/src/error_codes/E0622.md @@ -6,8 +6,9 @@ Erroneous code example: #![feature(intrinsics)] #![allow(internal_features)] -extern "rust-intrinsic" { - pub static atomic_singlethreadfence_seqcst: fn(); +extern "C" { + #[rustc_intrinsic] + pub static atomic_singlethreadfence_seqcst: unsafe fn(); // error: intrinsic must be a function } @@ -22,9 +23,8 @@ error, just declare a function. Example: #![feature(intrinsics)] #![allow(internal_features)] -extern "rust-intrinsic" { - pub fn atomic_singlethreadfence_seqcst(); // ok! -} +#[rustc_intrinsic] +pub unsafe fn atomic_singlethreadfence_seqcst(); // ok! fn main() { unsafe { atomic_singlethreadfence_seqcst(); } } ``` |
