Skip to content

Commit 758ea34

Browse files
Add E0092 error explanation
1 parent 0ba2db5 commit 758ea34

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

src/librustc_typeck/diagnostics.rs

+26-1
Original file line numberDiff line numberDiff line change
@@ -1022,6 +1022,32 @@ type Foo<A> = Box<A>; // ok!
10221022
```
10231023
"##,
10241024

1025+
E0092: r##"
1026+
You tried to call an undefined atomic operation function.
1027+
Erroneous code example:
1028+
1029+
```
1030+
#![feature(intrinsics)]
1031+
1032+
extern "rust-intrinsic" {
1033+
fn atomic_foo(); // error: unrecognized atomic operation
1034+
// function
1035+
}
1036+
```
1037+
1038+
Please check you didn't make a mistake in the function's name. All intrinsic
1039+
functions are defined in librustc_trans/trans/intrinsic.rs and in
1040+
libcore/intrinsics.rs. Example:
1041+
1042+
```
1043+
#![feature(intrinsics)]
1044+
1045+
extern "rust-intrinsic" {
1046+
fn atomic_fence(); // ok!
1047+
}
1048+
```
1049+
"##,
1050+
10251051
E0093: r##"
10261052
You called an unknown intrinsic function. Erroneous code example:
10271053
@@ -1771,7 +1797,6 @@ register_diagnostics! {
17711797
E0085,
17721798
E0086,
17731799
E0090,
1774-
E0092,
17751800
E0101,
17761801
E0102,
17771802
E0103,

0 commit comments

Comments
 (0)