about summary refs log tree commit diff
path: root/src/libcore/task
diff options
context:
space:
mode:
authorOliver Scherer <github35764891676564198441@oli-obk.de>2019-12-08 01:43:10 +0100
committerOliver Scherer <github35764891676564198441@oli-obk.de>2019-12-13 11:27:02 +0100
commit5e17e3988165d3245e38af0b1c40cde47699f6a7 (patch)
tree306b98ec54bf16d1327e0264b51d356bdba02d9b /src/libcore/task
parentd75c7530f38b56c4d916195570cdcd18c12ce273 (diff)
downloadrust-5e17e3988165d3245e38af0b1c40cde47699f6a7.tar.gz
rust-5e17e3988165d3245e38af0b1c40cde47699f6a7.zip
Require stable/unstable annotations for the constness of all stable functions with a `const` modifier
Diffstat (limited to 'src/libcore/task')
-rw-r--r--src/libcore/task/wake.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libcore/task/wake.rs b/src/libcore/task/wake.rs
index 0759ff93ea8..c1e45f189b7 100644
--- a/src/libcore/task/wake.rs
+++ b/src/libcore/task/wake.rs
@@ -39,6 +39,7 @@ impl RawWaker {
     /// function in the `vtable` of the underlying `RawWaker` will be called.
     #[rustc_promotable]
     #[stable(feature = "futures_api", since = "1.36.0")]
+    #[cfg_attr(not(bootstrap), rustc_const_stable(feature = "futures_api", since = "1.36.0"))]
     pub const fn new(data: *const (), vtable: &'static RawWakerVTable) -> RawWaker {
         RawWaker { data, vtable }
     }
@@ -151,6 +152,7 @@ impl RawWakerVTable {
     // FIXME: remove whenever we have a stable way to accept fn pointers from const fn
     // (see https://github.com/rust-rfcs/const-eval/issues/19#issuecomment-472799062)
     #[rustc_allow_const_fn_ptr]
+    #[cfg_attr(not(bootstrap), rustc_const_stable(feature = "futures_api", since = "1.36.0"))]
     pub const fn new(
         clone: unsafe fn(*const ()) -> RawWaker,
         wake: unsafe fn(*const ()),