]> git.lizzy.rs Git - rust.git/blob - src/librustc_error_codes/error_codes/E0093.md
Rollup merge of #68361 - t6:patch-freebsd-lld-i386, r=alexcrichton
[rust.git] / src / librustc_error_codes / error_codes / E0093.md
1 An unknown intrinsic function was declared.
2
3 Erroneous code example:
4
5 ```compile_fail,E0093
6 #![feature(intrinsics)]
7
8 extern "rust-intrinsic" {
9     fn foo(); // error: unrecognized intrinsic function: `foo`
10 }
11
12 fn main() {
13     unsafe {
14         foo();
15     }
16 }
17 ```
18
19 Please check you didn't make a mistake in the function's name. All intrinsic
20 functions are defined in `librustc_codegen_llvm/intrinsic.rs` and in
21 `libcore/intrinsics.rs` in the Rust source code. Example:
22
23 ```
24 #![feature(intrinsics)]
25
26 extern "rust-intrinsic" {
27     fn atomic_fence(); // ok!
28 }
29
30 fn main() {
31     unsafe {
32         atomic_fence();
33     }
34 }
35 ```