Rollup merge of #124067 - RalfJung:weak-lang-items, r=davidtwco
weak lang items are not allowed to be #[track_caller] For instance the panic handler will be called via this import ```rust extern "Rust" { #[lang = "panic_impl"] fn panic_impl(pi: &PanicInfo<'_>) -> !; } ``` A `#[track_caller]` would add an extra argument and thus make this the wrong signature. The 2nd commit is a consistency rename; based on the docs [here](https://doc.rust-lang.org/unstable-book/language-features/lang-items.html) and [here](https://rustc-dev-guide.rust-lang.org/lang-items.html) I figured "lang item" is more widely used. (In the compiler output, "lang item" and "language item" seem to be pretty even.)
This commit is contained in:
commit
36316df9fe
37 changed files with 141 additions and 78 deletions
|
@ -798,7 +798,7 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
|
|||
// ==========================================================================
|
||||
gated!(
|
||||
lang, Normal, template!(NameValueStr: "name"), DuplicatesOk, EncodeCrossCrate::No, lang_items,
|
||||
"language items are subject to change",
|
||||
"lang items are subject to change",
|
||||
),
|
||||
rustc_attr!(
|
||||
rustc_pass_by_value, Normal, template!(Word), ErrorFollowing,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue