1 use async_trait::async_trait; 2 3 #[async_trait] 4 trait Foo { bar(&self, x: &str, y: &'_ str) -> &'static str5 async fn bar(&self, x: &str, y: &'_ str) -> &'static str; 6 } 7 8 struct S(String); 9 10 #[async_trait] 11 impl Foo for S { bar(&self, x: &str, y: &'_ str) -> &'static str12 async fn bar(&self, x: &str, y: &'_ str) -> &'static str { 13 if false { 14 &self.0 15 } else if false { 16 x 17 } else { 18 y 19 } 20 } 21 } 22 main()23fn main() {} 24