-
Notifications
You must be signed in to change notification settings - Fork 0
the provisional cache incorrectly handles inductive overflow #54
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
Comments
normalizes-to
results in unstable query results
an affected test is trait Overflow {
type Assoc;
}
impl<T> Overflow for T {
type Assoc = <T as Overflow>::Assoc;
}
trait Trait {}
impl<T: Overflow<Assoc = U>, U> Trait for T {}
struct LocalTy;
impl Trait for LocalTy {}
fn main() {} results in
|
further minimized, currently writing about what's broken here trait Overflow {
type Assoc: ?Sized;
}
impl<T: ?Sized> Overflow for T {
type Assoc = <T as Overflow>::Assoc;
}
fn foo<T: Overflow<Assoc = <() as Overflow>::Assoc + ?Sized>>() {}
fn main() {
foo::<()>();
} |
the provisional cache does not correctly handle inductive cycles #![feature(trivial_bounds, marker_trait_attr)]
struct Root;
struct MultipleCandidates;
#[marker]
trait Trait {}
impl Trait for Root
where
MultipleCandidates: Trait,
MultipleCandidates: Trait,
{}
impl Trait for MultipleCandidates
where
Root: Trait,
{}
impl Trait for MultipleCandidates {}
fn impls_trait<T: Trait>() {}
fn main() {
impls_trait::<Root>();
} has the proof tree:
to explain the issue a bit more: we keep |
another example where we get OVERFLOW instead of #![feature(trivial_bounds, marker_trait_attr)]
struct MultipleCandidates;
struct MultipleNested;
struct DoesNotImpl;
#[marker]
trait Trait {}
impl Trait for MultipleCandidates
where
MultipleNested: Trait
{}
impl Trait for MultipleCandidates
where
MultipleNested: Trait,
{}
impl Trait for MultipleNested
where
MultipleCandidates: Trait,
DoesNotImpl: Trait,
{}
fn impls_trait<T: Trait>() {}
fn main() {
impls_trait::<MultipleCandidates>();
} this time we have 2 identical impls for |
normalizes-to
results in unstable query results
need to add these as tests/check whether we already added them, then it can be closed |
already added, closing |
see https://github.com/rust-lang/rust/pull/114287/files#r1283008717, need to look into this and fix it.
this also affects
ProjectionPredicate(AliasTy { args: [uint::UTerm, uint::UTerm, bit::B1], def_id: DefId(0:936 ~ typenum[0ab6]::private::PrivateSetBit::Output) }, Term::Ty(<uint::UInt<uint::UTerm, bit::B1> as core::ops::Shl<uint::UTerm>>::Output))
in type num, so probably a more general issue withProjectionPredicate
s, idk 🤷The text was updated successfully, but these errors were encountered: