3 #![feature(return_position_impl_trait_in_trait)]
4 #![allow(incomplete_features)]
9 fn foo(&self) -> impl Debug;
13 fn foo(&self) -> impl Debug {
18 impl<T: Default + Debug> Foo for std::marker::PhantomData<T> {
19 fn foo(&self) -> impl Debug {
25 fn bar<T>(&self) -> impl Debug;
29 fn bar<T>(&self) -> impl Debug {
30 format!("Hello with generic {}", std::any::type_name::<T>())
35 fn baz(&self) -> impl Debug + '_;
39 fn baz(&self) -> impl Debug + '_ {
45 println!("{:?}", ().foo());
46 println!("{:?}", ().bar::<u64>());
47 println!("{:?}", "hi".to_string().baz());