1
Fork 0

Small error codes explanation cleanup (E0092, E0093 and E0094)

This commit is contained in:
Guillaume Gomez 2019-11-30 13:28:53 +01:00
parent 8f1bbd69e1
commit 481b18acd0
4 changed files with 13 additions and 9 deletions

View file

@ -1,4 +1,5 @@
You tried to declare an undefined atomic operation function. An undefined atomic operation function was declared.
Erroneous code example: Erroneous code example:
```compile_fail,E0092 ```compile_fail,E0092
@ -11,8 +12,8 @@ extern "rust-intrinsic" {
``` ```
Please check you didn't make a mistake in the function's name. All intrinsic Please check you didn't make a mistake in the function's name. All intrinsic
functions are defined in librustc_codegen_llvm/intrinsic.rs and in functions are defined in `librustc_codegen_llvm/intrinsic.rs` and in
libcore/intrinsics.rs in the Rust source code. Example: `libcore/intrinsics.rs` in the Rust source code. Example:
``` ```
#![feature(intrinsics)] #![feature(intrinsics)]

View file

@ -1,4 +1,6 @@
You declared an unknown intrinsic function. Erroneous code example: An unknown intrinsic function was declared.
Erroneous code example:
```compile_fail,E0093 ```compile_fail,E0093
#![feature(intrinsics)] #![feature(intrinsics)]
@ -15,8 +17,8 @@ fn main() {
``` ```
Please check you didn't make a mistake in the function's name. All intrinsic Please check you didn't make a mistake in the function's name. All intrinsic
functions are defined in librustc_codegen_llvm/intrinsic.rs and in functions are defined in `librustc_codegen_llvm/intrinsic.rs` and in
libcore/intrinsics.rs in the Rust source code. Example: `libcore/intrinsics.rs` in the Rust source code. Example:
``` ```
#![feature(intrinsics)] #![feature(intrinsics)]

View file

@ -1,4 +1,5 @@
You gave an invalid number of type parameters to an intrinsic function. An invalid number of type parameters was given to an intrinsic function.
Erroneous code example: Erroneous code example:
```compile_fail,E0094 ```compile_fail,E0094

View file

@ -2,7 +2,7 @@ This error indicates that a lifetime is missing from a type. If it is an error
inside a function signature, the problem may be with failing to adhere to the inside a function signature, the problem may be with failing to adhere to the
lifetime elision rules (see below). lifetime elision rules (see below).
Here are some simple examples of where you'll run into this error: Erroneous code examples:
```compile_fail,E0106 ```compile_fail,E0106
struct Foo1 { x: &bool } struct Foo1 { x: &bool }
@ -27,7 +27,7 @@ function signatures which allows you to leave out lifetimes in certain cases.
For more background on lifetime elision see [the book][book-le]. For more background on lifetime elision see [the book][book-le].
The lifetime elision rules require that any function signature with an elided The lifetime elision rules require that any function signature with an elided
output lifetime must either have output lifetime must either have:
- exactly one input lifetime - exactly one input lifetime
- or, multiple input lifetimes, but the function must also be a method with a - or, multiple input lifetimes, but the function must also be a method with a