]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-37051.rs
Require Drop impls to have the same constness on its bounds as the bounds on the...
[rust.git] / src / test / 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() {}