]> git.lizzy.rs Git - rust.git/blob - src/librustc_error_codes/error_codes/E0522.md
Rollup merge of #68120 - Centril:ban-range-to-dotdotdot, r=oli-obk
[rust.git] / src / librustc_error_codes / error_codes / E0522.md
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).
5 Erroneous code example:
6
7 ```compile_fail,E0522
8 #![feature(lang_items)]
9
10 #[lang = "cookie"]
11 fn cookie() -> ! { // error: definition of an unknown language item: `cookie`
12     loop {}
13 }
14 ```