rust/src/test/ui/issues/issue-37051.rs
2018-12-25 21:08:33 -07:00

21 lines
359 B
Rust

// compile-pass
// skip-codegen
#![feature(associated_type_defaults)]
#![allow(warnings)]
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() {
}