Skip to content

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

Merged
Veykril merged 1 commit into
rust-lang:masterfrom
ChayimFriedman2:expr-scope-visitor
Aug 2, 2026
Merged

internal: Do not store references in ExprScope's visitor#22997
Veykril merged 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

@Veykril Veykril left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for picking that up

View changes since this review

@Veykril
Veykril added this pull request to the merge queue Aug 2, 2026
Merged via the queue into rust-lang:master with commit 8ee6692 Aug 2, 2026
18 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 2, 2026
@ChayimFriedman2
ChayimFriedman2 deleted the expr-scope-visitor branch August 2, 2026 18:25
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