-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Uplift the (new solver) canonicalizer into rustc_next_trait_solver
#117586
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
☔ The latest upstream changes (presumably #117590) made this pull request unmergeable. Please resolve the merge conflicts. |
5a0f412
to
df5459a
Compare
This comment has been minimized.
This comment has been minimized.
df5459a
to
895f141
Compare
Some changes occurred to the core trait solver cc @rust-lang/initiative-trait-system-refactor These commits modify the If this was unintentional then you should revert the changes before this PR is merged. |
rustc_type_ir
rustc_next_trait_solver
☔ The latest upstream changes (presumably #118277) made this pull request unmergeable. Please resolve the merge conflicts. |
895f141
to
a79bcfc
Compare
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.
I am fairly unhappy with using Clone
instead of Copy
. However, r-a seems to be using Arc<T>
for interning, going to open a convo on zulip https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Frust-analyzer/topic/interning.20and.20requiring.20.60Copy.60
After talking about this on zulip, I think we should go with requiring |
a79bcfc
to
aa30616
Compare
The only feedback I did not integrate was the:
Because:
@rustbot ready |
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.
r=me after nit
43eb7e3
to
1c1df45
Compare
@bors r=lcnr |
… r=lcnr Uplift the (new solver) canonicalizer into `rustc_next_trait_solver` Uplifts the new trait solver's canonicalizer into a new crate called `rustc_next_trait_solver`. The crate name is literally a bikeshed-avoidance name, so let's not block this PR on that -- renames are welcome later. There are a host of other changes that were required to make this possible: * Expose a `ConstTy` trait to get the `Interner::Ty` from a `Interner::Const`. * Expose some constructor methods to construct `Bound` variants. These are currently methods defined on the interner themselves, but they could be pulled into traits later. * Expose a `IntoKind` trait to turn a `Ty`/`Const`/`Region` into their corresponding `*Kind`s. * Some minor tweaks to other APIs in `rustc_type_ir`. The canonicalizer code itself is best reviewed **with whitespace ignored.** r? `@lcnr`
☔ The latest upstream changes (presumably #118324) made this pull request unmergeable. Please resolve the merge conflicts. |
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#116420 (discard invalid spans in external blocks) - rust-lang#118686 (Only check principal trait ref for object safety) - rust-lang#118688 (Add method to get type of an Rvalue in StableMIR) - rust-lang#118707 (Ping GuillaumeGomez for changes in rustc_codegen_gcc) - rust-lang#118712 (targets: remove not-added {i386,i486}-unknown-linux-gnu) - rust-lang#118719 (CFI: Add char to CFI integer normalization) Failed merges: - rust-lang#117586 (Uplift the (new solver) canonicalizer into `rustc_next_trait_solver`) r? `@ghost` `@rustbot` modify labels: rollup
1c1df45
to
80f240a
Compare
@bors r=lcnr |
… r=lcnr Uplift the (new solver) canonicalizer into `rustc_next_trait_solver` Uplifts the new trait solver's canonicalizer into a new crate called `rustc_next_trait_solver`. The crate name is literally a bikeshed-avoidance name, so let's not block this PR on that -- renames are welcome later. There are a host of other changes that were required to make this possible: * Expose a `ConstTy` trait to get the `Interner::Ty` from a `Interner::Const`. * Expose some constructor methods to construct `Bound` variants. These are currently methods defined on the interner themselves, but they could be pulled into traits later. * Expose a `IntoKind` trait to turn a `Ty`/`Const`/`Region` into their corresponding `*Kind`s. * Some minor tweaks to other APIs in `rustc_type_ir`. The canonicalizer code itself is best reviewed **with whitespace ignored.** r? `@lcnr`
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#117586 (Uplift the (new solver) canonicalizer into `rustc_next_trait_solver`) - rust-lang#118692 (remove redundant imports) - rust-lang#118694 (Add instance evaluation and methods to read an allocation in StableMIR) - rust-lang#118715 (privacy: visit trait def id of projections) - rust-lang#118730 (recurse into refs when comparing tys for diagnostics) - rust-lang#118736 (temporarily revert "ice on ambguity in mir typeck") r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#117586 (Uplift the (new solver) canonicalizer into `rustc_next_trait_solver`) - rust-lang#118502 (fix: correct the arg for 'suggest to use associated function syntax' diagnostic) - rust-lang#118694 (Add instance evaluation and methods to read an allocation in StableMIR) - rust-lang#118715 (privacy: visit trait def id of projections) - rust-lang#118730 (recurse into refs when comparing tys for diagnostics) - rust-lang#118736 (temporarily revert "ice on ambguity in mir typeck") r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#117586 - compiler-errors:the-canonicalizer, r=lcnr Uplift the (new solver) canonicalizer into `rustc_next_trait_solver` Uplifts the new trait solver's canonicalizer into a new crate called `rustc_next_trait_solver`. The crate name is literally a bikeshed-avoidance name, so let's not block this PR on that -- renames are welcome later. There are a host of other changes that were required to make this possible: * Expose a `ConstTy` trait to get the `Interner::Ty` from a `Interner::Const`. * Expose some constructor methods to construct `Bound` variants. These are currently methods defined on the interner themselves, but they could be pulled into traits later. * Expose a `IntoKind` trait to turn a `Ty`/`Const`/`Region` into their corresponding `*Kind`s. * Some minor tweaks to other APIs in `rustc_type_ir`. The canonicalizer code itself is best reviewed **with whitespace ignored.** r? ``@lcnr``
Uplifts the new trait solver's canonicalizer into a new crate called
rustc_next_trait_solver
.The crate name is literally a bikeshed-avoidance name, so let's not block this PR on that -- renames are welcome later.
There are a host of other changes that were required to make this possible:
ConstTy
trait to get theInterner::Ty
from aInterner::Const
.Bound
variants. These are currently methods defined on the interner themselves, but they could be pulled into traits later.IntoKind
trait to turn aTy
/Const
/Region
into their corresponding*Kind
s.rustc_type_ir
.The canonicalizer code itself is best reviewed with whitespace ignored.
r? @lcnr