move resolve_lifetimes into a proper query#46657
Conversation
5b96e8d to
c0f68fd
Compare
2d9214f to
15fda6a
Compare
|
cc @gaurikholkar -- this is the PR I was talking about |
Now that we made `resolve_lifetimes` into a query, elision errors no longer abort compilation, which affects some tests. Also, remove `dep_graph_crosscontaminate_tables` -- there is no a path in the dep-graph, though red-green handles it. The same scenario is (correctly) tested by issue-42602.rs in any case.
15fda6a to
b7794c0
Compare
|
Thanks @nikomatsakis |
| ) -> Rc<ResolveLifetimes> { | ||
| assert_eq!(for_krate, LOCAL_CRATE); | ||
|
|
||
| let named_region_map = krate(tcx).unwrap_or_default(); |
There was a problem hiding this comment.
This looks a bit violent and likely to cause cascade errors - if resolving lifetimes for one item fails, it will destroy all lifetime information without aborting compilation.
On a second reading, krate can't actually return an error and trigger this misbehavior.
| }) | ||
| } | ||
|
|
||
| fn krate<'tcx>(tcx: TyCtxt<'_, 'tcx, 'tcx>) -> Result<NamedRegionMap, ErrorReported> { |
There was a problem hiding this comment.
Can this function actually return ErrorReported now?
There was a problem hiding this comment.
You're right, I should fix that. A holdover from older code.
|
If OTOH, With that done, and because I don't think |
|
r=me with that cleaned up. |
|
@bors r=arielb1 |
|
📌 Commit fdbd9b0 has been approved by |
move `resolve_lifetimes` into a proper query Now that we made `resolve_lifetimes` into a query, elision errors no longer abort compilation, which affects some tests. Also, remove `dep_graph_crosscontaminate_tables` -- there is no a path in the dep-graph, though red-green handles it. The same scenario is (correctly) tested by issue-42602.rs in any case. r? @michaelwoerister
|
☀️ Test successful - status-appveyor, status-travis |
Now that we made
resolve_lifetimesinto a query, elision errors nolonger abort compilation, which affects some tests.
Also, remove
dep_graph_crosscontaminate_tables-- there is no a path inthe dep-graph, though red-green handles it. The same scenario
is (correctly) tested by issue-42602.rs in any case.
r? @michaelwoerister