-
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
remove EvaluationResult::EvaluatedTo{Unknown,Recur} #114249
Conversation
// Avoid caching results that depend on more than just the trait-ref | ||
// - the stack can create recursion. | ||
if result.is_stack_dependent() { | ||
return; |
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.
How is it sound to remove this? Aren't we caching things that should not be cached?
as @compiler-errors noted, this example breaks under this PR because trait Trait<J> {}
// This impl doesn't hold
impl<J> Trait<J> for Box<u32>
where
Box<u16>: Trait<J>,
Option<u8>: Trait<J>,
{}
// This impl holds
impl Trait<()> for Box<u8> {}
// --- Trait2
trait Trait2<J> {}
// This impl doesn't hold
impl<J> Trait2<J> for Box<u32> where Box<u16>: Trait<J> {}
// This impl holds
impl Trait2<()> for Box<u8> {}
fn impls_trait1<T: Trait<J>, J>() {}
fn impls_trait2<T: Trait2<J>, J>() {}
fn main() {
impls_trait1::<Box<_>, _>;
impls_trait2::<Box<_>, _>;
} @rustbot author |
☔ The latest upstream changes (presumably #114023) made this pull request unmergeable. Please resolve the merge conflicts. |
@aliemjay any updates on this? |
Closing this as inactive. Feel free to reöpen this pr or create a new pr if you get the time to work on this. Thanks |
I was confused by them while reviewing #114023.
EvaluatedToRecur
was introduced in #42840, seemingly with intent to support inductive cycles in the current solver, but that's not something we plan to have in the old solver. It is broken anyway because it's never converted intoEvaluatedToErr
in the root predicate, see the FIXME in the docs.EvaluatedToUnknown
is not handled any differently thanEvaluatedtoAmbig
.r? @lcnr @compiler-errors