]> git.lizzy.rs Git - rust.git/blob - tests/ui/issues/issue-37051.rs
Rollup merge of #106441 - mllken:abstract-socket-noref, r=joshtriplett
[rust.git] / tests / ui / issues / issue-37051.rs
1 // check-pass
2
3 #![feature(associated_type_defaults)]
4
5 trait State: Sized {
6     type NextState: State = StateMachineEnded;
7     fn execute(self) -> Option<Self::NextState>;
8 }
9
10 struct StateMachineEnded;
11
12 impl State for StateMachineEnded {
13     fn execute(self) -> Option<Self::NextState> {
14         None
15     }
16 }
17
18 fn main() {}