Repository navigation
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
dianne
force-pushed
the
scope-extend-new
branch
from
November 2, 2026 10:58
3746ff8 to
0586f6c
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
dianne
force-pushed
the
scope-extend-new
branch
from
November 20, 2026 09:27
0586f6c to
89702ee
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Travis Cross <tc@traviscross.com>
dianne
force-pushed
the
scope-extend-new
branch
2 times, most recently
from
November 24, 2026 09:22
4b4880b to
f4a61a5
Compare
dianne
force-pushed
the
scope-extend-new
branch
from
November 25, 2026 03:29
f4a61a5 to
9a6b565
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is my initial take on the
scope!andextend!operators proposed by @traviscross. I've done a bit of interpretation; the exact semantics will need to be discussed. Part of rust-lang/goals#648, "Redesigningsuper let".Diagnostics, documentation, splitting this PR up, this PR description, refining lints, and probably other things are all very much unfinished. The operators themselves seem to work just fine though! For how it looks in action, see the drop order test: temporary-rescoping.rs.
This is implemented on top of the (non-semantics-changing) refactor of temporary scoping I did as part of #146098. The first three commits are the tests and the refactor from that PR.
Since this experiment is meant to potentially replace
super letstatements, I'm piggy-backing off of thesuper_lettracking issue for now, but there's a new feature gate:temporary_rescoping, introduced in #166450.Tracking issue for
super let: #139076.This PR is currently being split apart:
scope!andextend!will stay here