intrinsics: use const generic to set atomic ordering
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
#### Note: this error code is no longer emitted by the compiler.
|
||||
|
||||
An undefined atomic operation function was declared.
|
||||
|
||||
Erroneous code example:
|
||||
|
||||
```compile_fail,E0092
|
||||
```ignore (no longer emitted)
|
||||
#![feature(intrinsics)]
|
||||
#![allow(internal_features)]
|
||||
|
||||
@@ -12,13 +14,4 @@ unsafe fn atomic_foo(); // error: unrecognized atomic operation
|
||||
```
|
||||
|
||||
Please check you didn't make a mistake in the function's name. All intrinsic
|
||||
functions are defined in `compiler/rustc_codegen_llvm/src/intrinsic.rs` and in
|
||||
`library/core/src/intrinsics.rs` in the Rust source code. Example:
|
||||
|
||||
```
|
||||
#![feature(intrinsics)]
|
||||
#![allow(internal_features)]
|
||||
|
||||
#[rustc_intrinsic]
|
||||
unsafe fn atomic_fence_seqcst(); // ok!
|
||||
```
|
||||
functions are defined in `library/core/src/intrinsics` in the Rust source code.
|
||||
|
||||
@@ -17,19 +17,4 @@ fn main() {
|
||||
```
|
||||
|
||||
Please check you didn't make a mistake in the function's name. All intrinsic
|
||||
functions are defined in `compiler/rustc_codegen_llvm/src/intrinsic.rs` and in
|
||||
`library/core/src/intrinsics.rs` in the Rust source code. Example:
|
||||
|
||||
```
|
||||
#![feature(intrinsics)]
|
||||
#![allow(internal_features)]
|
||||
|
||||
#[rustc_intrinsic]
|
||||
unsafe fn atomic_fence_seqcst(); // ok!
|
||||
|
||||
fn main() {
|
||||
unsafe {
|
||||
atomic_fence_seqcst();
|
||||
}
|
||||
}
|
||||
```
|
||||
functions are defined in `library/core/src/intrinsics` in the Rust source code.
|
||||
|
||||
@@ -4,7 +4,7 @@ An intrinsic was declared without being a function.
|
||||
|
||||
Erroneous code example:
|
||||
|
||||
```no_run
|
||||
```ignore (no longer emitted)
|
||||
#![feature(intrinsics)]
|
||||
#![allow(internal_features)]
|
||||
|
||||
@@ -21,7 +21,7 @@ An intrinsic is a function available for use in a given programming language
|
||||
whose implementation is handled specially by the compiler. In order to fix this
|
||||
error, just declare a function. Example:
|
||||
|
||||
```no_run
|
||||
```ignore (no longer emitted)
|
||||
#![feature(intrinsics)]
|
||||
#![allow(internal_features)]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user