Skip to content

internal: Do not store references in ExprScope's visitor - #22997

Open
ChayimFriedman2 wants to merge 1 commit into
rust-lang:masterfrom
ChayimFriedman2:expr-scope-visitor
Open

internal: Do not store references in ExprScope's visitor#22997
ChayimFriedman2 wants to merge 1 commit into
rust-lang:masterfrom
ChayimFriedman2:expr-scope-visitor

Conversation

@ChayimFriedman2

Copy link
Copy Markdown
Contributor

Continuation of #22864.

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 2, 2026
let mut scope = self.scopes.new_scope(*self.scope);
self.scopes.add_pat_bindings(self.store, scope, arm.pat);
if let Some(guard) = arm.guard {
scope = self.scopes.new_scope(scope);

@ChayimFriedman2 ChayimFriedman2 Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I remove this scope since I don't think we actually need it.

View changes since the review

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

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants