Uh oh!
There was an error while loading. Please reload this page.
Provide positional information when visiting ty, substs and closure_substs in MIR - #43324
Conversation
rust-highfive
commented
Jul 19, 2017
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @arielb1 (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
| make_mir_visitor!(Visitor,); | ||
| make_mir_visitor!(MutVisitor,mut); | ||
| pub enum PositionalInfo { |
There was a problem hiding this comment.
This is the one part I wasn't sure about. I could have just passed Spans as the third parameter to visit_ty, but this leaves the visit implementations a little flexible for future uses. Also, is this the best place for this enum?
Nashenas88
commented
Jul 19, 2017
The one travis failure looks like a network issue. It never even finished the git processes. |
arielb1
commented
Jul 19, 2017
r+ with a |
Nashenas88
commented
Jul 19, 2017
Sorry, I made a mistake when I said I could have just passed a |
carols10cents
commented
Jul 24, 2017
ping @arielb1, @Nashenas88 has some questions for you! |
Then maybe also pass the
|
Nashenas88
commented
Jul 25, 2017
@arielb1 I'm not sure I follow. |
Nashenas88
commented
Jul 26, 2017
@arielb1 would it suffice to reduce the enum to |
arielb1
commented
Jul 28, 2017
Ok @bors r+ |
bors
commented
Jul 28, 2017
📌 Commit 4b9acad has been approved by |
bors
commented
Jul 28, 2017
Provide positional information when visiting ty, substs and closure_substs in MIR This will enable the region renumbering portion of #43234 (non-lexical lifetimes). @nikomatsakis's current plan [here](https://gist.github.com/nikomatsakis/dfc27b28cd024eb25054b52bb11082f2) shows that we need spans of the original code to create new region variables, e.g. `self.infcx.next_region_var(infer::MiscVariable(span))`. The current visitor impls did not pass positional information (`Location` in some, `Span` and `SourceInfo` for others) for all types. I did not expand this to all visits, just the ones necessary for the above-mentioned plan.
bors
commented
Jul 28, 2017
☀️ Test successful - status-appveyor, status-travis |
This will enable the region renumbering portion of #43234 (non-lexical lifetimes). @nikomatsakis's current plan here shows that we need spans of the original code to create new region variables, e.g.
self.infcx.next_region_var(infer::MiscVariable(span)). The current visitor impls did not pass positional information (Locationin some,SpanandSourceInfofor others) for all types. I did not expand this to all visits, just the ones necessary for the above-mentioned plan.