-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Implement partial support for non-lifetime binders #107489
Conversation
b24f6e6
to
c285ae8
Compare
I reworked this PR quite a lot -- specifically, to remove |
I think this is worth a review at this point, though. Not sure if the strategy I took to get rid of needing to introduce a separate |
Some changes occurred in src/tools/clippy cc @rust-lang/clippy Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt |
r? compiler |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First pass. I'll do a more in-depth review a bit later.
☔ The latest upstream changes (presumably #107811) made this pull request unmergeable. Please resolve the merge conflicts. |
c285ae8
to
4df983a
Compare
☔ The latest upstream changes (presumably #107924) made this pull request unmergeable. Please resolve the merge conflicts. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excited to see this working soon.
Last nits and then r=me.
4df983a
to
0162292
Compare
@bors r=cjgillot |
…rs, r=cjgillot Implement partial support for non-lifetime binders This implements support for non-lifetime binders. It's pretty useless currently, but I wanted to put this up so the implementation can be discussed. Specifically, this piggybacks off of the late-bound lifetime collection code in `rustc_hir_typeck::collect::lifetimes`. This seems like a necessary step given the fact we don't resolve late-bound regions until this point, and binders are sometimes merged. Q: I'm not sure if I should go along this route, or try to modify the earlier nameres code to compute the right bound var indices for type and const binders eagerly... If so, I'll need to rename all these queries to something more appropriate (I've done this for `resolve_lifetime::Region` -> `resolve_lifetime::ResolvedArg`) cc rust-lang/types-team#81 r? `@ghost`
@bors r- needs rebase again 😿 |
☔ The latest upstream changes (presumably #108006) made this pull request unmergeable. Please resolve the merge conflicts. |
8c9b0c4
to
95f35fe
Compare
Rebased. @bors r=cjgillot |
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#104068 (rustdoc: Add PartialOrd trait to doc comment explanation) - rust-lang#107489 (Implement partial support for non-lifetime binders) - rust-lang#107905 (Pass arguments to `x` subcommands with `--`) - rust-lang#108009 (Move some tests) - rust-lang#108086 (wasm: Register the `relaxed-simd` target feature) - rust-lang#108104 (don't into self) - rust-lang#108133 (Small cleanups around `EarlyBinder`) - rust-lang#108136 (Do not ICE on unmet trait alias impl bounds) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
…rs, r=cjgillot Implement partial support for non-lifetime binders This implements support for non-lifetime binders. It's pretty useless currently, but I wanted to put this up so the implementation can be discussed. Specifically, this piggybacks off of the late-bound lifetime collection code in `rustc_hir_typeck::collect::lifetimes`. This seems like a necessary step given the fact we don't resolve late-bound regions until this point, and binders are sometimes merged. Q: I'm not sure if I should go along this route, or try to modify the earlier nameres code to compute the right bound var indices for type and const binders eagerly... If so, I'll need to rename all these queries to something more appropriate (I've done this for `resolve_lifetime::Region` -> `resolve_lifetime::ResolvedArg`) cc rust-lang/types-team#81 r? `@ghost`
This implements support for non-lifetime binders. It's pretty useless currently, but I wanted to put this up so the implementation can be discussed.
Specifically, this piggybacks off of the late-bound lifetime collection code in
rustc_hir_typeck::collect::lifetimes
. This seems like a necessary step given the fact we don't resolve late-bound regions until this point, and binders are sometimes merged.Q: I'm not sure if I should go along this route, or try to modify the earlier nameres code to compute the right bound var indices for type and const binders eagerly... If so, I'll need to rename all these queries to something more appropriate (I've done this for
resolve_lifetime::Region
->resolve_lifetime::ResolvedArg
)cc rust-lang/types-team#81
r? @ghost