Skip to content

Document promotion of match scrutinees #1963

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

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

Conversation

traviscross
Copy link
Contributor

@traviscross traviscross commented Aug 15, 2025

@rustbot rustbot added the S-waiting-on-review Status: The marked PR is awaiting review from a maintainer label Aug 15, 2025
@traviscross traviscross marked this pull request as draft August 15, 2025 08:42
@rustbot rustbot removed the S-waiting-on-review Status: The marked PR is awaiting review from a maintainer label Aug 15, 2025
Borrowing part of a match scrutinee from within the guard can trigger
constant promotion even if that part of the scrutinee is later moved
into a variable.  Let's add a note about this.
@traviscross traviscross force-pushed the TC/document-promotion-of-match-scrutinee-due-to-guard branch from a350402 to 52c6561 Compare August 15, 2025 09:02
@traviscross traviscross changed the title Document promotion of match scrutinees due to guards Document promotion of match scrutinees Aug 15, 2025
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.

2 participants