Debian Codegraph @

third_party/rust/async-trait/tests/ui/send-not-implemented.rs

raw
1 use async_trait::async_trait;
2 use std::sync::Mutex;
3
4 async fn f() {}
5
6 #[async_trait]
7 trait Test {
8 async fn test(&self) {
9 let mutex = Mutex::new(());
10 let _guard = mutex.lock().unwrap();
11 f().await;
12 }
13
14 async fn test_ret(&self) -> bool {
15 let mutex = Mutex::new(());
16 let _guard = mutex.lock().unwrap();
17 f().await;
18 true
19 }
20 }
21
22 fn main() {}