Compute is_late_bound_map query separately from lifetime resolution#97415
Compute is_late_bound_map query separately from lifetime resolution#97415bors merged 2 commits intorust-lang:masterfrom
is_late_bound_map query separately from lifetime resolution#97415Conversation
|
Some changes occurred in src/tools/clippy. cc @rust-lang/clippy |
|
r? @estebank (rust-highfive has picked a reviewer for you, use r? to override) |
|
This is a good candidate to split out independently, if you can. I'd r+ quickly. |
There was a problem hiding this comment.
Wait, this isn't a regression? The new behavior is what this should have always been, right?
If so, let's change these files to be // check-build
There was a problem hiding this comment.
This is explicitly proposed to lang team in #96296.
There was a problem hiding this comment.
These on the other hand, are a regression, right?
There was a problem hiding this comment.
I'd take this to be a regression... Could we expand E0392 to check for the duplicated case so that we don't emit this redundant error?
There was a problem hiding this comment.
The change needs to be in a totally different place. I'll do that in a follow-up PR.
There was a problem hiding this comment.
Could this potentially break existing (invalid) code? Likely worth it to land anyways, but might need a crater run to gauge the fallout.
There was a problem hiding this comment.
There is an inconsistency here between hir().get_generics and the custom implementation in generics_of. I am tempted to correct it by adding more cases to get_generics and use it in generics_of. I don't see how it could break code, but I'll need to review the calls before giving an definite answer.
There was a problem hiding this comment.
It is already run-pass because it checks that the correct labels are selected in case of hygienic shadowing.
There was a problem hiding this comment.
This file still errs on undeclared labels at lines 7 and 29.
There was a problem hiding this comment.
Wouldn't this be the same as getting the ident and passing that through?
There was a problem hiding this comment.
The point of this commit was to stop storing the ident of parameters in the ribs. As we only need them in the case of diagnostics, we fetch them at the last moment.
Anyway, this code will go away with #97313.
8470fca to
0385024
Compare
|
r=me after making CI happy |
|
☔ The latest upstream changes (presumably #97644) made this pull request unmergeable. Please resolve the merge conflicts. |
The computation is actually much simpler, and can be done by directly fetching the HIR for the `FnDecl` and its generics.
0385024 to
ba40fe9
Compare
|
@bors r=estebank |
|
📌 Commit ba40fe9 has been approved by |
…bank Compute `is_late_bound_map` query separately from lifetime resolution This query is actually very simple, and is only useful for functions and method. It can be computed directly by fetching the HIR, with no need to embed it within the lifetime resolution visitor. Based on rust-lang#96296
Rollup of 3 pull requests Successful merges: - rust-lang#97415 (Compute `is_late_bound_map` query separately from lifetime resolution) - rust-lang#97471 (Provide more context when denying invalid type params ) - rust-lang#97681 (Add more eslint checks) Failed merges: - rust-lang#97446 (Make hir().get_generics and generics_of consistent.) r? `@ghost` `@rustbot` modify labels: rollup
…bank Compute `is_late_bound_map` query separately from lifetime resolution This query is actually very simple, and is only useful for functions and method. It can be computed directly by fetching the HIR, with no need to embed it within the lifetime resolution visitor. Based on rust-lang#96296
Fail gracefully when encountering an HRTB in APIT. Fixes rust-lang#96954 ~The first commit will be merged as part of rust-lang#97415
Fail gracefully when encountering an HRTB in APIT. Fixes rust-lang#96954 ~The first commit will be merged as part of rust-lang#97415
This query is actually very simple, and is only useful for functions and method. It can be computed directly by fetching the HIR, with no need to embed it within the lifetime resolution visitor.
Based on #96296