blob: c9f17607871020561e70425e4d422c5944ac979e [file]
//! Regression test for https://github.com/rust-lang/rust/issues/37051
//@ check-pass
#![feature(associated_type_defaults)]
trait State: Sized {
type NextState: State = StateMachineEnded;
fn execute(self) -> Option<Self::NextState>;
}
struct StateMachineEnded;
impl State for StateMachineEnded {
fn execute(self) -> Option<Self::NextState> {
None
}
}
fn main() {}