-
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
Stall auto trait assembly in new solver for int/float vars #109752
Stall auto trait assembly in new solver for int/float vars #109752
Conversation
Some changes occurred to the core trait solver cc @rust-lang/initiative-trait-system-refactor |
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.
can you instead make this is a match on goal.predicate.self_ty().kind()
and only call find_map_relevant_impl
for actual rigid types, already a bit worried about how this handles alias types and what not.
r=me afterwards
ea14918
to
0b7cae5
Compare
@bors r+ rollup |
📌 Commit 0b7cae532dff143bbf722ff92bfe1b65c4227f53 has been approved by It is now in the queue for this repository. |
Rollup of 6 pull requests Successful merges: - rust-lang#109724 (prioritize param env candidates if they don't guide type inference) - rust-lang#110021 (Fix a couple ICEs in the new `CastKind::Transmute` code) - rust-lang#110044 (Avoid some manual slice length calculation) - rust-lang#110115 (compiletest: Use remap-path-prefix only in CI) - rust-lang#110121 (Fix `x check --stage 1` when download-rustc is enabled) - rust-lang#110124 (Some clippy fixes in the compiler) Failed merges: - rust-lang#109752 (Stall auto trait assembly in new solver for int/float vars) r? `@ghost` `@rustbot` modify labels: rollup
☔ The latest upstream changes (presumably #110137) made this pull request unmergeable. Please resolve the merge conflicts. |
0b7cae5
to
8d2dbba
Compare
@bors r=lcnr |
…uto-trait-for-num-var, r=lcnr Stall auto trait assembly in new solver for int/float vars Make sure that we don't match int/float vars against *all* manual auto trait impls due to this check: https://github.com/rust-lang/rust/blob/2fb0e8d162a021f8a795fb603f5d8c0017855160/compiler/rustc_trait_selection/src/solve/trait_goals.rs#L151-L169 Since `find_map_relevant_impl` treats all impls as candidates for int/float vars, due to the way that `fast_reject::simplify_type` works. This fixes compiler-errors/next-solver-hir-issues#11. r? `@lcnr`
Rollup of 8 pull requests Successful merges: - rust-lang#109527 (Set up standard library path substitution in rust-gdb and gdbgui) - rust-lang#109752 (Stall auto trait assembly in new solver for int/float vars) - rust-lang#109860 (Add support for RISC-V relax target feature) - rust-lang#109923 (Update `error [E0449]: unnecessary visibility qualifier` to be more clear) - rust-lang#110070 (The `wrapping_neg` example for unsigned types shouldn't use `i8`) - rust-lang#110146 (fix(doc): do not parse inline when output is json for external crate) - rust-lang#110147 (Add regression test for rust-lang#104916) - rust-lang#110149 (Update books) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Make sure that we don't match int/float vars against all manual auto trait impls due to this check:
rust/compiler/rustc_trait_selection/src/solve/trait_goals.rs
Lines 151 to 169 in 2fb0e8d
Since
find_map_relevant_impl
treats all impls as candidates for int/float vars, due to the way thatfast_reject::simplify_type
works.This fixes compiler-errors/next-solver-hir-issues#11.
r? @lcnr