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