1
Fork 0

Update tests based on feedback

This commit is contained in:
Bryan Garza 2022-10-07 16:08:56 +00:00
parent 8a0ebca97e
commit 11b1439380
10 changed files with 48 additions and 33 deletions

View file

@ -6,12 +6,27 @@
trait MyTrait {
async fn foo(&self) -> i32;
async fn bar(&self) -> i32;
}
impl MyTrait for i32 {
async fn foo(&self) -> i32 {
*self
}
async fn bar(&self) -> i32 {
self.foo().await
}
}
fn main() {}
fn main() {
let x = 5;
// Calling from non-async context
let _ = x.foo();
let _ = x.bar();
// Calling from async block in non-async context
async {
let _ = x.foo();
let _ = x.bar();
};
}