-
Notifications
You must be signed in to change notification settings - Fork 0
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
Introduce pat_adjustments table #1
Conversation
Review status: 0 of 6 files reviewed at latest revision, 6 unresolved discussions. src/librustc/ty/sty.rs, line 160 at r1 (raw file):
src/librustc_const_eval/pattern.rs, line 306 at r1 (raw file):
src/librustc_typeck/check/_match.rs, line 167 at r1 (raw file):
@nikomatsakis here I'm just pointing out that it is where we'll end up for src/librustc_typeck/check/_match.rs, line 631 at r1 (raw file):
src/librustc_typeck/check/_match.rs, line 684 at r1 (raw file):
src/librustc_typeck/check/_match.rs, line 695 at r1 (raw file):
Comments from Reviewable |
Made some progress writing code that I think is "roughly correct" to populate Review status: 0 of 5 files reviewed at latest revision, 7 unresolved discussions. src/librustc_const_eval/pattern.rs, line 318 at r1 (raw file):
What do you think about this, @nikomatsakis? In particular, I don't know how to generate a new src/librustc_typeck/check/_match.rs, line 631 at r1 (raw file): Previously, tschottdorf (Tobias Schottdorf) wrote…
Ok. How do I find out? I'm not sure what to look for. src/librustc_typeck/check/_match.rs, line 695 at r1 (raw file): Previously, tschottdorf (Tobias Schottdorf) wrote…
Did the plumbing. Please check that I terminated it correctly - the binding mode begins in src/librustc/ty/sty.rs, line 160 at r1 (raw file): Previously, tschottdorf (Tobias Schottdorf) wrote…
Ack, removed. Comments from Reviewable |
LGTM Review status: 0 of 5 files reviewed at latest revision, 7 unresolved discussions. src/librustc_const_eval/pattern.rs, line 318 at r1 (raw file): Previously, tschottdorf (Tobias Schottdorf) wrote…
I think the thing to do here is not construct new HIR, but rather to just change the pattern that gets returned. I think what I would expect is that we do not generate a new src/librustc_typeck/check/_match.rs, line 167 at r1 (raw file): Previously, tschottdorf (Tobias Schottdorf) wrote…
yes -- I think that's right src/librustc_typeck/check/_match.rs, line 631 at r1 (raw file): Previously, tschottdorf (Tobias Schottdorf) wrote…
based on the function src/librustc_typeck/check/_match.rs, line 695 at r1 (raw file): Previously, tschottdorf (Tobias Schottdorf) wrote…
Looks...pretty good to me! Comments from Reviewable |
a529337
to
f9cf76a
Compare
Ok, I think this is now functional enough to open a PR on the main repo. What do you think, @nikomatsakis? Review status: 0 of 8 files reviewed at latest revision, 7 unresolved discussions. src/librustc_const_eval/pattern.rs, line 318 at r1 (raw file): Previously, nikomatsakis (Niko Matsakis) wrote…
Done. src/librustc_typeck/check/_match.rs, line 167 at r1 (raw file): Previously, nikomatsakis (Niko Matsakis) wrote…
Haven't done this yet, but the comment is still in the code, so I'll get around to it. src/librustc_typeck/check/_match.rs, line 631 at r1 (raw file): Previously, nikomatsakis (Niko Matsakis) wrote…
Done. Comments from Reviewable |
55c2434
to
bb34d50
Compare
Reviewed 206 of 206 files at r2. src/librustc_const_eval/pattern.rs, line 306 at r1 (raw file): Previously, tschottdorf (Tobias Schottdorf) wrote…
OK src/librustc_typeck/check/_match.rs, line 684 at r1 (raw file): Previously, tschottdorf (Tobias Schottdorf) wrote…
LGTM src/librustc_typeck/check/_match.rs, line 51 at r2 (raw file):
Hmm I guess I have to check out what produces a Comments from Reviewable |
bb34d50
to
faa5c9d
Compare
See the [RFC] and [tracking issue]. This is a work in progress. The basic examples from the RFC are in place and work, but there are still some obvious deficiencies (some of which documented through currently problematic tests). Commentary is sparse. This will be improved before merging. [tracking issue]: rust-lang#42640 [RFC]: https://github.com/rust-lang/rfcs/blob/491e0af/text/2005-match-ergonomics.md
These updates look like the are unintentional, but I am not sure how to fix them.
faa5c9d
to
59ca44e
Compare
Closing this. Will open a PR against the main repo next. |
wip: implement pattern-binding-modes RFC
See the RFC and tracking issue.
This is a work in progress. The basic examples from the RFC are in place and work,
but there are still some obvious deficiencies (some of which documented through
currently problematic tests).
Commentary is sparse. This will be improved before merging.
This change is