rust/tests/crashes/127737.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
389 B
Rust
Raw Normal View History

2024-07-21 10:50:57 -05:00
//@ 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,
}
}
}