Call Foo::async_method in the async-await test

This commit is contained in:
Jonas Schievink 2018-10-04 14:44:46 +02:00
parent 3c46da8c82
commit 2e1ac08cb3
2 changed files with 1 additions and 14 deletions

View file

@ -170,6 +170,7 @@ fn main() {
async_closure,
async_fn,
async_fn_with_internal_borrow,
Foo::async_method,
|x| {
async move {
unsafe { await!(unsafe_async_fn(x)) }

View file

@ -1,14 +0,0 @@
warning: struct is never constructed: `Foo`
--> $DIR/async-await.rs:122:1
|
LL | struct Foo;
| ^^^^^^^^^^^
|
= note: #[warn(dead_code)] on by default
warning: method is never used: `async_method`
--> $DIR/async-await.rs:129:5
|
LL | async fn async_method(x: u8) -> u8 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^