Skip to content

Stop passing resolver disambiguator state to AST lowering. #143361

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cjgillot
Copy link
Contributor

@cjgillot cjgillot commented Jul 3, 2025

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

@rustbot rustbot added PG-exploit-mitigations Project group: Exploit mitigations S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jul 3, 2025
@rustbot
Copy link
Collaborator

rustbot commented Jul 3, 2025

Some changes occurred in compiler/rustc_sanitizers

cc @rcvalle

Some changes occurred in tests/codegen/sanitizer

cc @rcvalle

@@ -872,7 +872,8 @@ impl<'tcx> Printer<'tcx> for SymbolMangler<'tcx> {
DefPathData::ValueNs(_) => 'v',
DefPathData::Closure => 'C',
DefPathData::Ctor => 'c',
DefPathData::AnonConst => 'k',
DefPathData::AnonConst => 'K',
DefPathData::LateAnonConst => 'k',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PG-exploit-mitigations Project group: Exploit mitigations S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants