Instance::resolve doesn't have the exact same checks as associated type projection. #70419
Labels
A-associated-items
Area: Associated items (types, constants & functions)
A-specialization
Area: Trait impl specialization
A-trait-system
Area: Trait system
A-type-system
Area: Type system
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Specifically, this part of resolving associated
fn
/const
s:rust/src/librustc_ty/instance.rs
Lines 90 to 100 in a17dd36
Is missing this logic deciding whether an associated item is
default
:rust/src/librustc_trait_selection/traits/project.rs
Lines 1018 to 1042 in a17dd36
Just from looking at the code (as I can't get the MIR of this example to constant-fold that associated
const
into the function, so I can't test any of this), this would likely mishandledefault impl
(instead ofdefault
on the associated item inside theimpl
).cc @wesleywiser @nikomatsakis
The text was updated successfully, but these errors were encountered: