about summary refs log tree commit diff
path: root/tests/ui/traits/alias/expand-higher-ranked-alias.rs
blob: 8a301d39f4c460a9f3b863cba2d1b140d2fa5503 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Make sure we are using the right binder vars when expanding
// `for<'a> Foo<'a>` to `for<'a> Bar<'a>`.

//@ check-pass

#![feature(trait_alias)]

trait Bar<'a> {}

trait Foo<'a> = Bar<'a>;

fn test2(_: &(impl for<'a> Foo<'a> + ?Sized)) {}

fn test(x: &dyn for<'a> Foo<'a>) {
    test2(x);
}

fn main() {}