From 5e28eb580ff48a84fe6f49bff31c4c022f243ac9 Mon Sep 17 00:00:00 2001 From: Nell Shamrell Date: Thu, 18 Jun 2020 10:30:47 -0700 Subject: Adds a clearer message for when the async keyword is missing from a function Signed-off-by: Nell Shamrell --- src/libcore/future/future.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'src/libcore') diff --git a/src/libcore/future/future.rs b/src/libcore/future/future.rs index 00a171e6b5f..abf461338d8 100644 --- a/src/libcore/future/future.rs +++ b/src/libcore/future/future.rs @@ -27,6 +27,7 @@ use crate::task::{Context, Poll}; #[must_use = "futures do nothing unless you `.await` or poll them"] #[stable(feature = "futures_api", since = "1.36.0")] #[lang = "future_trait"] +#[rustc_on_unimplemented(label = "`{Self}` is not a future", message = "`{Self}` is not a future")] pub trait Future { /// The type of value produced on completion. #[stable(feature = "futures_api", since = "1.36.0")] -- cgit 1.4.1-3-g733a5