diff --git a/tests/ui/traits/coherence-alias-hang.rs b/tests/ui/traits/coherence-alias-hang.rs new file mode 100644 index 00000000000..37b80739589 --- /dev/null +++ b/tests/ui/traits/coherence-alias-hang.rs @@ -0,0 +1,23 @@ +//@ check-pass + +// Regression test for nalgebra hang . + +#![feature(lazy_type_alias)] +#![allow(incomplete_features)] + +type Id = T; +trait NotImplemented {} + +struct W(*const T, *const U); +trait Trait { + type Assoc: ?Sized; +} +impl Trait for W { + type Assoc = W>; +} + +trait Overlap {} +impl Overlap for W {} +impl Overlap for T {} + +fn main() {}