rust/tests/crashes/127737.rs
Matthias Krüger 5ab2e40294 add more tests
2024-07-21 17:50:57 +02:00

22 lines
389 B
Rust

//@ known-bug: #127737
//@ compile-flags: -Zmir-opt-level=5 --crate-type lib
pub trait TestTrait {
type MyType;
fn func() -> Option<Self>
where
Self: Sized;
}
impl<T> dyn TestTrait<MyType = T>
where
Self: Sized,
{
pub fn other_func() -> Option<Self> {
match Self::func() {
Some(me) => Some(me),
None => None,
}
}
}