about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorNell Shamrell <nellshamrell@gmail.com>2020-06-18 10:30:47 -0700
committerNell Shamrell <nellshamrell@gmail.com>2020-06-25 16:01:45 -0700
commit5e28eb580ff48a84fe6f49bff31c4c022f243ac9 (patch)
tree4f2722dbe8db97973ec8e71583c4918bddbc75c2 /src/libcore
parent50fc24d8a172a853b5dfe40702d6550e3b8562ba (diff)
downloadrust-5e28eb580ff48a84fe6f49bff31c4c022f243ac9.tar.gz
rust-5e28eb580ff48a84fe6f49bff31c4c022f243ac9.zip
Adds a clearer message for when the async keyword is missing from a function
Signed-off-by: Nell Shamrell <nellshamrell@gmail.com>
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/future/future.rs1
1 files changed, 1 insertions, 0 deletions
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")]