Debian Codegraph @

third_party/rust/async-trait/tests/ui/lifetime-defined-here.rs

raw
1 use async_trait::async_trait;
2
3 #[async_trait]
4 trait Foo {
5 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 {
12 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
23 fn main() {}