-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Handle bindings in substructure of patterns with type ascriptions #55274
Handle bindings in substructure of patterns with type ascriptions #55274
Commits on Oct 26, 2018
-
Remove
PlaceContext
from API ofmir::Visitor::visit_projection_elem
.It is unused, and would not make sense to maintain in the commits later in this PR.
Configuration menu - View commit details
-
Copy full SHA for 26c4069 - Browse repository at this point
Copy the full SHA 26c4069View commit details -
Configuration menu - View commit details
-
Copy full SHA for 54681b0 - Browse repository at this point
Copy the full SHA 54681b0View commit details -
Refactoring: added
PatternTypeAnnotation
wrapper around `UserTypeAn……notation` to ease future changes.
Configuration menu - View commit details
-
Copy full SHA for 36d8432 - Browse repository at this point
Copy the full SHA 36d8432View commit details -
Added
mir::UserTypeProjection
, a stub for a structure that projects…… *into* a given UserTypeAnnotation. (That is, it will pull out some component type held or referenced by the type annotation.) Note: this still needs to actually do projection itself. That comes in a later commit
Configuration menu - View commit details
-
Copy full SHA for 28ce99d - Browse repository at this point
Copy the full SHA 28ce99dView commit details -
Checkpoint: Added abstraction over collection of projections into use…
…r type. I did not think I would need this in the MIR, but in general local decls are going to need to support this. (That, or we need to be able define a least-upper-bound for a collection of types encountered via the pattern compilation.)
Configuration menu - View commit details
-
Copy full SHA for b569caf - Browse repository at this point
Copy the full SHA b569cafView commit details -
Add the actual chain of projections to
UserTypeProjection
.Update the existing NLL `patterns.rs` test accordingly. includes changes addressing review feedback: * Added example to docs for `UserTypeProjections` illustrating how we build up multiple projections when descending into a pattern with type ascriptions. * Adapted niko's suggested docs for `UserTypeProjection`. * Factored out `projection_ty` from more general `projection_ty_core` (as a drive-by, made its callback an `FnMut`, as I discovered later that I need that). * Add note to docs that `PlaceTy.field_ty(..)` does not normalize its result. * Normalize as we project out `field_ty`.
Configuration menu - View commit details
-
Copy full SHA for 740e8a3 - Browse repository at this point
Copy the full SHA 740e8a3View commit details -
Update mir-opt tests to reflect change to
AscribeUserType
to carry ……a `UserTypeProjection`.
Configuration menu - View commit details
-
Copy full SHA for 7e76196 - Browse repository at this point
Copy the full SHA 7e76196View commit details -
Configuration menu - View commit details
-
Copy full SHA for f09a0eb - Browse repository at this point
Copy the full SHA f09a0ebView commit details -
Add test for normalization during field-lookup on patterns with ascri…
…bed types. As a drive-by, also added test analogous to existing static_to_a_to_static_through_tuple, but now apply to a struct instead of a tuple.
Configuration menu - View commit details
-
Copy full SHA for 92cbe47 - Browse repository at this point
Copy the full SHA 92cbe47View commit details -
Add intern table for
List<ProjectionElem<'tcx, (), ()>>
.Also added alias `ProjectionKind<'tcx>` for `ProjectionElem<'tcx, (), ()>`.
Configuration menu - View commit details
-
Copy full SHA for 47e2d82 - Browse repository at this point
Copy the full SHA 47e2d82View commit details -
Further foundational stuff on
ProjectionKind
before I add it to `As……cribeUserType`.
Configuration menu - View commit details
-
Copy full SHA for 82ab668 - Browse repository at this point
Copy the full SHA 82ab668View commit details -
Configuration menu - View commit details
-
Copy full SHA for 639a3ff - Browse repository at this point
Copy the full SHA 639a3ffView commit details