2024-10-20 10:05:39 +02:00
|
|
|
//@ known-bug: #131886
|
2024-07-26 10:04:02 +00:00
|
|
|
//@ compile-flags: -Zvalidate-mir
|
2024-12-16 02:29:00 +01:00
|
|
|
#![feature(type_alias_impl_trait)]
|
2024-10-20 10:05:39 +02:00
|
|
|
|
|
|
|
type Tait = impl Sized;
|
|
|
|
|
|
|
|
trait Foo<'a>: Bar<'a, 'a, Tait> {}
|
|
|
|
trait Bar<'a, 'b, T> {}
|
|
|
|
|
2024-07-26 10:04:02 +00:00
|
|
|
#[define_opaque(Tait)]
|
2024-10-20 10:05:39 +02:00
|
|
|
fn test_correct3<'a>(x: &dyn Foo<'a>, _: Tait) {
|
|
|
|
let _ = x as &dyn Bar<'_, '_, ()>;
|
|
|
|
}
|
2024-07-26 10:04:02 +00:00
|
|
|
|
|
|
|
fn main() {}
|