You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We try to prove that <&mut Value as std::ops::Deref>::Target: std::future::Future does not hold, but that ends up being ambiguous because aliases are treated as non-local tys, even though we can definitely normalize <&mut Value as std::ops::Deref>::Target to just Value, which is a local ty.
The text was updated successfully, but these errors were encountered:
…ze, r=compiler-errors
normalize in `trait_ref_is_knowable` in new solver
fixesrust-lang/trait-system-refactor-initiative#51
Alternatively we could avoid normalizing the self type and do this at the end of the `assemble_candidates_via_self_ty` stack by splitting candidates into:
- applicable without normalizing self type
- applicable for aliases, even if they can be normalized
- applicable for stuff which cannot get normalized further
I don't think this would have any significant benefits and it also seems non-trivial to avoid normalizing only the self type in `trait_ref_is_knowable`.
r? `@compiler-errors`
…ze, r=compiler-errors
normalize in `trait_ref_is_knowable` in new solver
fixesrust-lang/trait-system-refactor-initiative#51
Alternatively we could avoid normalizing the self type and do this at the end of the `assemble_candidates_via_self_ty` stack by splitting candidates into:
- applicable without normalizing self type
- applicable for aliases, even if they can be normalized
- applicable for stuff which cannot get normalized further
I don't think this would have any significant benefits and it also seems non-trivial to avoid normalizing only the self type in `trait_ref_is_knowable`.
r? `@compiler-errors`
bors
added a commit
to rust-lang-ci/rust
that referenced
this issue
Aug 13, 2023
…, r=compiler-errors
normalize in `trait_ref_is_knowable` in new solver
fixesrust-lang/trait-system-refactor-initiative#51
Alternatively we could avoid normalizing the self type and do this at the end of the `assemble_candidates_via_self_ty` stack by splitting candidates into:
- applicable without normalizing self type
- applicable for aliases, even if they can be normalized
- applicable for stuff which cannot get normalized further
I don't think this would have any significant benefits and it also seems non-trivial to avoid normalizing only the self type in `trait_ref_is_knowable`.
r? `@compiler-errors`
This code fails in the new trait solver
-Ztrait-solver=next-coherence
:Which overlaps with this implementation: https://doc.rust-lang.org/std/future/trait.Future.html#impl-Future-for-Pin%3CP%3E
We try to prove that
<&mut Value as std::ops::Deref>::Target: std::future::Future
does not hold, but that ends up being ambiguous because aliases are treated as non-local tys, even though we can definitely normalize<&mut Value as std::ops::Deref>::Target
to justValue
, which is a local ty.The text was updated successfully, but these errors were encountered: