3 #![feature(return_position_impl_trait_in_trait)]
4 //~^ WARN the feature `return_position_impl_trait_in_trait` is incomplete
9 impl TestTrait for TestA {
12 impl TestTrait for TestB {
20 impl<A, B> TestTrait for GreeterOutput<A, B>
22 A: TestTrait<Output = ()>,
23 B: TestTrait<Output = ()>,
28 enum GreeterOutput<A, B>
30 A: TestTrait<Output = ()>,
31 B: TestTrait<Output = ()>,
38 fn test_func(&self, func: &str) -> impl TestTrait<Output = ()> {
40 "SayHello" => GreeterOutput::SayHello(TestA {}),
41 "SayGoodbye" => GreeterOutput::SayGoodbye(TestB {}),
42 _ => GreeterOutput::SayHello(TestA {}),
48 println!("Hello, world!");