Skip to content

Yukang fix 121315 suggest removing#3

Open
chenyukang wants to merge 3 commits intomasterfrom
yukang-fix-121315-suggest-removing
Open

Yukang fix 121315 suggest removing#3
chenyukang wants to merge 3 commits intomasterfrom
yukang-fix-121315-suggest-removing

Conversation

@chenyukang
Copy link
Copy Markdown
Owner

No description provided.

weihanglo and others added 2 commits March 6, 2024 18:39
Update cargo

14 commits in f772ec0224d3755ce52ac5128a80319fb2eb45d0..a4c63fe5388beaa09e5f91196c86addab0a03580
2024-03-01 22:57:35 +0000 to 2024-03-06 22:15:17 +0000
- fix(cli): Skip tracing-chrome for platforms without 64bit atomics (rust-lang/cargo#13551)
- chore: downgrade to openssl v1.1.1 (again) (rust-lang/cargo#13550)
- fix(cli): Add traces to clarify where time is going (rust-lang/cargo#13545)
- fix(rustdoc-map): dedup `--extern-html-too-url` for same unit (rust-lang/cargo#13544)
- test: Add test for packaging a public dependency (rust-lang/cargo#13536)
- doc: Edits for git/path dependency sections (rust-lang/cargo#13341)
- feat(cli): Allow logging to chrome traces (rust-lang/cargo#13399)
- fix(log): Trace parameters to align with profile (rust-lang/cargo#13538)
- fix(toml): Don't warn on unset Edition if only 2015 is compatible (rust-lang/cargo#13533)
- fix(cli): Trace core cargo operations (rust-lang/cargo#13532)
- chore: update pulldown-cmark to 0.10.0 (rust-lang/cargo#13517)
- feat(add): Fallback to `rustc -v` when no MSRV is set (rust-lang/cargo#13516)
- chore(ci): Ensure lockfile is respected during MSRV testing (rust-lang/cargo#13523)
- feat: Use consistent colors when testing (rust-lang/cargo#13520)
@chenyukang chenyukang force-pushed the yukang-fix-121315-suggest-removing branch 5 times, most recently from adb87a0 to 2f8b7b7 Compare March 8, 2024 03:08
@chenyukang chenyukang force-pushed the yukang-fix-121315-suggest-removing branch from 2f8b7b7 to 5a1485b Compare March 8, 2024 03:17
chenyukang pushed a commit that referenced this pull request Mar 25, 2026
…rochenkov

Avoid prematurely choosing a glob import

Fixes rust-lang#153842

Use the following without introducing trait to explain:
```rust
mod a {
    pub use crate::x::y as x; // single import #1
}

mod b {
    pub mod x {
        pub mod y {}
    }
}

use a::x; // single import #2
use b::*; // glob import #3

fn main() {}
```

In current implementation, when `#1` is first resolved, `crate::x` is temporarily taken from glob import `#3` as `crate::b::x`. This happens because `single_import_can_define_name` will see that `#2` cannot define `x` (because it depends on `#1` and `#1` is ignored) and then return `false`. Later, during finalization, `crate::x` in `#1` resolves through single import `#2` instead, which no longer matches the initially cached module `crate::b::x` and triggers the ICE.

I think the resolver should keep this unresolved because `#2` may still define `x` to avoid prematurely choosing a glob import.

r? petrochenkov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants