]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-37051.rs
Auto merge of #57108 - Mark-Simulacrum:license-remove, r=pietroalbini
[rust.git] / src / test / ui / issues / issue-37051.rs
1 // compile-pass
2 // skip-codegen
3 #![feature(associated_type_defaults)]
4 #![allow(warnings)]
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
19 fn main() {
20 }