about summary refs log tree commit diff
path: root/tests/ui/higher-ranked/leak-check/leak-check-in-selection-2.rs
blob: 24e38ec45a2c489db5cb03e263ce719914b5c3e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
//@ revisions: old next
//@[next] compile-flags: -Znext-solver
//@[old] check-pass

// cc #119820

trait Trait<T, U> {}

// using this impl results in a higher-ranked region error.
impl<'a> Trait<&'a str, &'a str> for () {}

impl<'a> Trait<&'a str, String> for () {}

fn impls_trait<T: for<'a> Trait<&'a str, U>, U>() {}

fn main() {
    impls_trait::<(), _>();
    //[next]~^ ERROR type annotations needed
}