about summary refs log tree commit diff
path: root/compiler/rustc_interface/src/errors.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-08-20 22:21:56 +0200
committerGitHub <noreply@github.com>2024-08-20 22:21:56 +0200
commit2e58d62fec255997c89b53601fd4a4500e9aecb6 (patch)
tree6371ff3330e4d6c02998118d71271d11649511d0 /compiler/rustc_interface/src/errors.rs
parent552b5c73fb2fca2062f9795eb9c7b7c0daf7e5dd (diff)
parentdf019a9f46d58fcb1b32ee69022a294a93e1a0a7 (diff)
downloadrust-2e58d62fec255997c89b53601fd4a4500e9aecb6.tar.gz
rust-2e58d62fec255997c89b53601fd4a4500e9aecb6.zip
Rollup merge of #128932 - bvanjoi:issue-128813, r=petrochenkov
skip updating when external binding is existed

Fixes #128813

For following code:

```rs
extern crate core;

fn f() {
    use ::core;
}

macro_rules! m {
    () => {
        extern crate std as core;
    };
}

m!();

fn main() {}
```

- In the first loop, we define `extern crate core` and `use ::core` will be referred to `core` (yes, it does not consider if there are some macros that are not expanded. Ideally, this should be delayed if there are some unexpanded macros in the root, but I didn't change it like that because it seems like a huge change).
- Then `m` is expanded, which makes `extern_prelude('core')` return `std` rather than `core`, causing the inconsistency.

r? `@petrochenkov`
Diffstat (limited to 'compiler/rustc_interface/src/errors.rs')
0 files changed, 0 insertions, 0 deletions