summary refs log tree commit diff
path: root/src/test/ui/issues/issue-37051.rs
blob: 1ccf5b978019006f00999a4bbdd140f8752b6aaa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// 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() {
}