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
|
@ -1042,7 +1042,7 @@ pub struct Resolver<'a, 'tcx> {
|
|||
block_map: NodeMap<Module<'a>>,
|
||||
/// A fake module that contains no definition and no prelude. Used so that
|
||||
/// some AST passes can generate identifiers that only resolve to local or
|
||||
/// language items.
|
||||
/// lang items.
|
||||
empty_module: Module<'a>,
|
||||
module_map: FxHashMap<DefId, Module<'a>>,
|
||||
binding_parent_modules: FxHashMap<NameBinding<'a>, Module<'a>>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue