2024-07-10 09:03:20 -05:00
|
|
|
// A regression test for pyella-0.1.5 which broke when
|
|
|
|
// enabling the new solver in coherence.
|
|
|
|
//
|
|
|
|
// `Tensor: TensorValue` is knowable while `Tensor: TensorOp<?t2>`
|
|
|
|
// may be implemented downstream. We previously didn't check the
|
|
|
|
// super trait bound in coherence, causing these impls to overlap.
|
|
|
|
//
|
|
|
|
// However, we did fail to normalize `<Tensor as TensorValue::Unmasked`
|
|
|
|
// which caused the old solver to emit a `Tensor: TensorValue` goal in
|
|
|
|
// `fn normalize_to_error` which then failed, causing this test to pass.
|
|
|
|
|
2024-09-11 16:57:04 -05:00
|
|
|
//@ revisions: current next
|
|
|
|
//@ ignore-compare-mode-next-solver (explicit revisions)
|
|
|
|
//@[next] compile-flags: -Znext-solver
|
2024-07-10 09:03:20 -05:00
|
|
|
//@ check-pass
|
|
|
|
|
|
|
|
pub trait TensorValue {
|
|
|
|
type Unmasked;
|
|
|
|
}
|
|
|
|
|
|
|
|
trait TensorCompare<T> {}
|
|
|
|
pub trait TensorOp<T>: TensorValue {}
|
|
|
|
|
|
|
|
pub struct Tensor;
|
|
|
|
impl<T2> TensorCompare<T2> for Tensor {}
|
|
|
|
impl<T1, T2> TensorCompare<T2> for T1
|
|
|
|
where
|
|
|
|
T1: TensorOp<T2>,
|
|
|
|
T1::Unmasked: Sized,
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
|
|
fn main() {}
|