mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 16:24:46 +00:00
Rollup merge of #130276 - compiler-errors:nalgebra-hang, r=lcnr
Add test for nalgebra hang in coherence r? lcnr
This commit is contained in:
commit
ed1602e480
23
tests/ui/traits/coherence-alias-hang.rs
Normal file
23
tests/ui/traits/coherence-alias-hang.rs
Normal file
@ -0,0 +1,23 @@
|
||||
//@ check-pass
|
||||
|
||||
// Regression test for nalgebra hang <https://github.com/rust-lang/rust/issues/130056>.
|
||||
|
||||
#![feature(lazy_type_alias)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
type Id<T: ?Sized> = T;
|
||||
trait NotImplemented {}
|
||||
|
||||
struct W<T: ?Sized, U: ?Sized>(*const T, *const U);
|
||||
trait Trait {
|
||||
type Assoc: ?Sized;
|
||||
}
|
||||
impl<T: ?Sized + Trait> Trait for W<T, T> {
|
||||
type Assoc = W<T::Assoc, Id<T::Assoc>>;
|
||||
}
|
||||
|
||||
trait Overlap<T: ?Sized> {}
|
||||
impl<T: ?Sized> Overlap<T> for W<T, T> {}
|
||||
impl<T: ?Sized + Trait + NotImplemented> Overlap<T::Assoc> for T {}
|
||||
|
||||
fn main() {}
|
Loading…
Reference in New Issue
Block a user