a13d4678fe
Fixes #70718 This commit allows making associated items (e.g. associated functions and types) into lang items via the `#[lang]` attribute. This allows such items to be accessed directly, rather than by iterating over the parent item's associated items. I've added `FnOnce::Output` as a lang item, and updated one old usage to use the new lang item. The remaining uses can be updated separately.
28 lines
1.1 KiB
Plaintext
28 lines
1.1 KiB
Plaintext
error[E0522]: definition of an unknown language item: `dummy_lang_item_1`
|
|
--> $DIR/assoc-lang-items.rs:4:5
|
|
|
|
|
LL | #[lang = "dummy_lang_item_1"]
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ definition of unknown language item `dummy_lang_item_1`
|
|
|
|
error[E0522]: definition of an unknown language item: `dummy_lang_item_2`
|
|
--> $DIR/assoc-lang-items.rs:7:5
|
|
|
|
|
LL | #[lang = "dummy_lang_item_2"]
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ definition of unknown language item `dummy_lang_item_2`
|
|
|
|
error[E0522]: definition of an unknown language item: `dummy_lang_item_3`
|
|
--> $DIR/assoc-lang-items.rs:10:5
|
|
|
|
|
LL | #[lang = "dummy_lang_item_3"]
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ definition of unknown language item `dummy_lang_item_3`
|
|
|
|
error[E0522]: definition of an unknown language item: `dummy_lang_item_4`
|
|
--> $DIR/assoc-lang-items.rs:17:5
|
|
|
|
|
LL | #[lang = "dummy_lang_item_4"]
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ definition of unknown language item `dummy_lang_item_4`
|
|
|
|
error: aborting due to 4 previous errors
|
|
|
|
For more information about this error, try `rustc --explain E0522`.
|