Call Foo::async_method in the async-await test
This commit is contained in:
parent
3c46da8c82
commit
2e1ac08cb3
2 changed files with 1 additions and 14 deletions
|
|
@ -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)) }
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue