Stop passing resolver disambiguator state to AST lowering.#143361
Stop passing resolver disambiguator state to AST lowering.#143361bors merged 1 commit intorust-lang:masterfrom
Conversation
| DefPathData::Ctor => 'c', | ||
| DefPathData::AnonConst => 'k', | ||
| DefPathData::AnonConst => 'K', | ||
| DefPathData::LateAnonConst => 'k', |
There was a problem hiding this comment.
I'm not certain changing mangling is the best idea. Is there some update to a demangler to be made before this PR is accepted?
There was a problem hiding this comment.
I'm surprised you're not getting the demangler roundtrip ICE, but most likely this code path isn't hit in codegen tests with v0 mangling.
I don't think it's possible without changing mangling
There was a problem hiding this comment.
I couldn't find where in the demangler code this is used. IIUC, there are only two categories that are checked, 'C' and 'S', the latter not being produced any more. Should I look somewhere else?
There was a problem hiding this comment.
If it is unused, the demangler will just fail to demangle. Which is fine, you'd just get a weird symbol. We do have a roundtrip assertion checking that all symbols emitted in tests can be demangled back to the original symbol. I'm not quite certain why this is not causing issues, but maybe paths are just handled well enough together that it all works out.
|
@rustbot author Please add a codegen test (which will probably ICE if the compiler is built with debug assertions as the demangler can't support this new syntax yet). |
|
Reminder, once the PR becomes ready for a review, use |
|
☔ The latest upstream changes (presumably #144249) made this pull request unmergeable. Please resolve the merge conflicts. |
4b55098 to
235f4df
Compare
|
Some changes occurred in tests/codegen-llvm/sanitizer cc @rcvalle |
This comment has been minimized.
This comment has been minimized.
235f4df to
b67453f
Compare
|
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
@bors r+ |
Rollup of 4 pull requests Successful merges: - #143361 (Stop passing resolver disambiguator state to AST lowering.) - #148000 (Improvements to attribute suggestions) - #148007 (chore: Update to the latest annotate-snippets) - #148088 (compiletest: Simplify passing arguments to spawned test threads) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 4 pull requests Successful merges: - #143361 (Stop passing resolver disambiguator state to AST lowering.) - #148000 (Improvements to attribute suggestions) - #148007 (chore: Update to the latest annotate-snippets) - #148088 (compiletest: Simplify passing arguments to spawned test threads) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of #143361 - cjgillot:split-disambig, r=oli-obk Stop passing resolver disambiguator state to AST lowering. AST->HIR lowering can use a disjoint set of `DefPathData` as the resolver, so we don't need to pass the disambiguator state. r? `@oli-obk`
Rollup of 4 pull requests Successful merges: - rust-lang/rust#143361 (Stop passing resolver disambiguator state to AST lowering.) - rust-lang/rust#148000 (Improvements to attribute suggestions) - rust-lang/rust#148007 (chore: Update to the latest annotate-snippets) - rust-lang/rust#148088 (compiletest: Simplify passing arguments to spawned test threads) r? `@ghost` `@rustbot` modify labels: rollup
|
@cjgillot What was the rationale behind this change? I spent a few hours figuring out why the disambiguator failed to resolve collisions in the DefPathData. I'd like to document this design choice on |
|
The high level objective is to stop having to carry the disambiguator state between compiler passes. The disambiguator state, as a pseudo-global mutable state is incompatible with incremental compilation. |
1 similar comment
|
The high level objective is to stop having to carry the disambiguator state between compiler passes. The disambiguator state, as a pseudo-global mutable state is incompatible with incremental compilation. |
AST->HIR lowering can use a disjoint set of
DefPathDataas the resolver, so we don't need to pass the disambiguator state.r? @oli-obk