Skip to content

Commit 1d2532b

Browse files
authored
Rollup merge of #71319 - GuillaumeGomez:cleanup-e0522, r=Dylan-DPC
Clean up E0522 explanation r? @Dylan-DPC
2 parents 7cdcc87 + ca6eb2c commit 1d2532b

File tree

1 file changed

+7
-4
lines changed
  • src/librustc_error_codes/error_codes

1 file changed

+7
-4
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
The lang attribute is intended for marking special items that are built-in to
2-
Rust itself. This includes special traits (like `Copy` and `Sized`) that affect
3-
how the compiler behaves, as well as special functions that may be automatically
4-
invoked (such as the handler for out-of-bounds accesses when indexing a slice).
1+
The lang attribute was used in an invalid context.
2+
53
Erroneous code example:
64

75
```compile_fail,E0522
@@ -12,3 +10,8 @@ fn cookie() -> ! { // error: definition of an unknown language item: `cookie`
1210
loop {}
1311
}
1412
```
13+
14+
The lang attribute is intended for marking special items that are built-in to
15+
Rust itself. This includes special traits (like `Copy` and `Sized`) that affect
16+
how the compiler behaves, as well as special functions that may be automatically
17+
invoked (such as the handler for out-of-bounds accesses when indexing a slice).

0 commit comments

Comments
 (0)