-
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
erica solver: implement builtin Pointee
trait impl candidates
#107282
Conversation
Some changes occurred to the core trait solver cc @rust-lang/initiative-trait-system-refactor |
@bors r+ rollup (only affects the new solver) |
) -> QueryResult<'tcx> { | ||
let tcx = ecx.tcx(); | ||
ecx.infcx.probe(|_| { | ||
let metadata_ty = match goal.predicate.self_ty().kind() { |
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.
we implicitly assume that there's only a single associated type for pointee
, would be nice to check that the DefId
is #[lang = "metadata_type"]
. doesn't matter too much 🤷
…s, r=compiler-errors erica solver: implement builtin `Pointee` trait impl candidates r? `@compiler-errors`
…s, r=compiler-errors erica solver: implement builtin `Pointee` trait impl candidates r? ``@compiler-errors``
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#105345 (Add hint for missing lifetime bound on trait object when type alias is used) - rust-lang#106897 (Tweak E0597) - rust-lang#106944 (Suggest using a lock for `*Cell: Sync` bounds) - rust-lang#107239 (Bring tests back into rustc source tarball) - rust-lang#107244 (rustdoc: rearrange HTML in primitive reference links) - rust-lang#107255 (add test where we ignore hr implied bounds) - rust-lang#107256 (Delete `SimplifyArmIdentity` and `SimplifyBranchSame` mir opts) - rust-lang#107266 (rustdoc: prohibit scroll bar on source viewer in Safari) - rust-lang#107282 (erica solver: implement builtin `Pointee` trait impl candidates) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
…fers, r=lcnr ICE in new solver if we see an inference variable By construction, we do not expect to see any `ty::Infer(ty::TyVar(_))` inference types in the solver (we treat this as ambiguous, since we need to be able to structurally resolve the self type at least one layer to assemble candidates for it). Additionally, since we're doing no freshening, we also don't expect to see any fresh vars of any kind in the solver. Let's make that an ICE so we can catch any mistakes. When rust-lang#107282 lands, we should also ICE there too if we see a non-int/float infer. r? `@lcnr`
r? @compiler-errors