about summary refs log tree commit diff
path: root/tests/crashes/131886.rs
blob: 16cb815f1c223074fc10a240be3a22edce998d80 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//@ known-bug: #131886
//@ compile-flags: -Zvalidate-mir
#![feature(type_alias_impl_trait)]

type Tait = impl Sized;

trait Foo<'a>: Bar<'a, 'a, Tait> {}
trait Bar<'a, 'b, T> {}

#[define_opaque(Tait)]
fn test_correct3<'a>(x: &dyn Foo<'a>, _: Tait) {
    let _ = x as &dyn Bar<'_, '_, ()>;
}

fn main() {}