2 #![deny(unused_must_use)]
6 async fn foo() -> i32 {
11 fn bar() -> impl std::future::Future<Output=i32> {
17 async fn baz() -> i32 {
25 async fn test_method() -> i32 {
31 foo(); //~ ERROR unused return value of `foo` that must be used
32 //~^ ERROR unused implementer of `Future` that must be used
33 foo().await; //~ ERROR unused output of future returned by `foo` that must be used
34 bar(); //~ ERROR unused return value of `bar` that must be used
35 //~^ ERROR unused implementer of `Future` that must be used
36 bar().await; //~ ERROR unused output of future returned by `bar` that must be used
37 baz(); //~ ERROR unused implementer of `Future` that must be used
41 /* FIXME(guswynn) update this test when async-fn-in-traits works
44 async fn test_trait_method() -> i32;
46 async fn test_other_trait() -> i32;
50 async fn test_trait_method() -> i32 {
54 async fn test_other_trait() -> i32 {