2019-06-12 18:18:32 +03:00
|
|
|
// check-pass
|
|
|
|
|
2018-10-31 13:08:01 +01:00
|
|
|
#![feature(associated_type_defaults)]
|
2019-06-12 18:18:32 +03:00
|
|
|
|
2017-06-17 14:43:10 -06:00
|
|
|
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
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-06-12 18:18:32 +03:00
|
|
|
fn main() {}
|