summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-37051.rs
blob: 9cae6cf5e7665ced8faeb73dab67ad3676e0b3c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// 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() {}