Async methods

This commit is contained in:
Taylor Cramer 2018-06-18 21:18:10 -07:00
parent d02631d3df
commit d64e577fa3
8 changed files with 122 additions and 79 deletions

View file

@ -104,10 +104,16 @@ unsafe async fn unsafe_async_fn(x: u8) -> u8 {
x
}
struct Foo {
struct Foo;
trait Bar {
fn foo() {}
}
impl Foo {
async fn async_method(x: u8) -> u8 {
unsafe {
await!(unsafe_async_fn())
await!(unsafe_async_fn(x))
}
}
}