]> git.proxmox.com Git - rustc.git/blame - compiler/rustc_error_codes/src/error_codes/E0093.md
New upstream version 1.73.0+dfsg1
[rustc.git] / compiler / rustc_error_codes / src / error_codes / E0093.md
CommitLineData
60c5eb7d
XL
1An unknown intrinsic function was declared.
2
3Erroneous code example:
4
5```compile_fail,E0093
6#![feature(intrinsics)]
add651ee 7#![allow(internal_features)]
60c5eb7d
XL
8
9extern "rust-intrinsic" {
10 fn foo(); // error: unrecognized intrinsic function: `foo`
11}
12
13fn main() {
14 unsafe {
15 foo();
16 }
17}
18```
19
20Please check you didn't make a mistake in the function's name. All intrinsic
1b1a35ee
XL
21functions are defined in `compiler/rustc_codegen_llvm/src/intrinsic.rs` and in
22`library/core/src/intrinsics.rs` in the Rust source code. Example:
60c5eb7d
XL
23
24```
25#![feature(intrinsics)]
add651ee 26#![allow(internal_features)]
60c5eb7d
XL
27
28extern "rust-intrinsic" {
064997fb 29 fn atomic_fence_seqcst(); // ok!
60c5eb7d
XL
30}
31
32fn main() {
33 unsafe {
064997fb 34 atomic_fence_seqcst();
60c5eb7d
XL
35 }
36}
37```