Debian Codegraph @

third_party/rust/async-trait/tests/ui/arg-implementation-detail.rs

raw
1 use async_trait::async_trait;
2
3 pub struct Struct;
4
5 #[async_trait]
6 pub trait Trait {
7 async fn f((_a, _b): (Struct, Struct)) {
8 // Expands to something like:
9 //
10 // fn f(__arg0: (Struct, Struct)) -> … {
11 // Box::pin(async move {
12 // let (_a, _b) = __arg0;
13 // …
14 // })
15 // }
16 //
17 // but user's code must not be allowed to name that temporary argument:
18 let _ = __arg0;
19 }
20 }
21
22 fn main() {}