mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 09:14:20 +00:00
20 lines
330 B
Rust
20 lines
330 B
Rust
// compile-flags: -Ztrait-solver=next
|
|
// check-pass
|
|
|
|
#![feature(rustc_attrs)]
|
|
|
|
#[rustc_coinductive]
|
|
trait Trait {}
|
|
|
|
#[rustc_coinductive]
|
|
trait Indirect {}
|
|
impl<T: Trait + ?Sized> Indirect for T {}
|
|
|
|
impl<'a> Trait for &'a () where &'a (): Indirect {}
|
|
|
|
fn impls_trait<T: Trait>() {}
|
|
|
|
fn main() {
|
|
impls_trait::<&'static ()>();
|
|
}
|