mirror of https://github.com/rust-lang/rust.git
19 lines
308 B
Rust
19 lines
308 B
Rust
// 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() {}
|