diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-04-23 12:10:25 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-23 12:10:25 +0200 |
| commit | 36316df9fe6c3e246153fe6e78967643cf08c148 (patch) | |
| tree | c729390a09b2fe6d6f2bc0a8fd15012467a010b0 /compiler/rustc_resolve/src | |
| parent | 72e8fb42680a68d6a09ffad94300161aed50b832 (diff) | |
| parent | 8b35be741fd1e46f81a3614478279d718701783e (diff) | |
| download | rust-36316df9fe6c3e246153fe6e78967643cf08c148.tar.gz rust-36316df9fe6c3e246153fe6e78967643cf08c148.zip | |
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.)
Diffstat (limited to 'compiler/rustc_resolve/src')
| -rw-r--r-- | compiler/rustc_resolve/src/lib.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_resolve/src/lib.rs b/compiler/rustc_resolve/src/lib.rs index b8221d9d7f9..b5b6d899cc5 100644 --- a/compiler/rustc_resolve/src/lib.rs +++ b/compiler/rustc_resolve/src/lib.rs @@ -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>>, |
