summaryrefslogtreecommitdiffstats
path: root/tests/ui/traits/new-solver/opportunistic-region-resolve.rs
blob: 2610789cd485acbbf2115a39b1c091a08df106f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// 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 ()>();
}