diff options
| author | Dylan DPC <dylan.dpc@gmail.com> | 2020-04-19 15:12:42 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-19 15:12:42 +0200 |
| commit | 1d2532bdf623772c0596166c31df98374d7c6af6 (patch) | |
| tree | f908f092b07ee3843882e6a3687ed6636cfbccd1 /src/librustc_error_codes/error_codes | |
| parent | 7cdcc876a5bc2b7a4bad094da395309da22760d6 (diff) | |
| parent | ca6eb2c2b225b18014cbc4edfc2bb006f6bc9111 (diff) | |
Rollup merge of #71319 - GuillaumeGomez:cleanup-e0522, r=Dylan-DPC
Clean up E0522 explanation r? @Dylan-DPC
Diffstat (limited to 'src/librustc_error_codes/error_codes')
| -rw-r--r-- | src/librustc_error_codes/error_codes/E0522.md | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/librustc_error_codes/error_codes/E0522.md b/src/librustc_error_codes/error_codes/E0522.md index e4756c384c4..83272314a87 100644 --- a/src/librustc_error_codes/error_codes/E0522.md +++ b/src/librustc_error_codes/error_codes/E0522.md @@ -1,7 +1,5 @@ -The lang attribute is intended for marking special items that are built-in to -Rust itself. This includes special traits (like `Copy` and `Sized`) that affect -how the compiler behaves, as well as special functions that may be automatically -invoked (such as the handler for out-of-bounds accesses when indexing a slice). +The lang attribute was used in an invalid context. + Erroneous code example: ```compile_fail,E0522 @@ -12,3 +10,8 @@ fn cookie() -> ! { // error: definition of an unknown language item: `cookie` loop {} } ``` + +The lang attribute is intended for marking special items that are built-in to +Rust itself. This includes special traits (like `Copy` and `Sized`) that affect +how the compiler behaves, as well as special functions that may be automatically +invoked (such as the handler for out-of-bounds accesses when indexing a slice). |
