From 31f259ce5a400801daecd76760a7665aaf130643 Mon Sep 17 00:00:00 2001 From: Deadbeef Date: Sat, 10 Sep 2022 07:44:56 +0000 Subject: Add `const_trait` to `Allocator` --- library/core/src/ops/function.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'library/core/src/ops/function.rs') diff --git a/library/core/src/ops/function.rs b/library/core/src/ops/function.rs index 8fdf22cf6f2..2e0a752c815 100644 --- a/library/core/src/ops/function.rs +++ b/library/core/src/ops/function.rs @@ -71,6 +71,7 @@ )] #[fundamental] // so that regex can rely that `&str: !FnMut` #[must_use = "closures are lazy and do nothing unless called"] +#[cfg_attr(not(bootstrap), const_trait)] pub trait Fn: FnMut { /// Performs the call operation. #[unstable(feature = "fn_traits", issue = "29625")] @@ -158,6 +159,7 @@ pub trait Fn: FnMut { )] #[fundamental] // so that regex can rely that `&str: !FnMut` #[must_use = "closures are lazy and do nothing unless called"] +#[cfg_attr(not(bootstrap), const_trait)] pub trait FnMut: FnOnce { /// Performs the call operation. #[unstable(feature = "fn_traits", issue = "29625")] @@ -237,6 +239,7 @@ pub trait FnMut: FnOnce { )] #[fundamental] // so that regex can rely that `&str: !FnMut` #[must_use = "closures are lazy and do nothing unless called"] +#[cfg_attr(not(bootstrap), const_trait)] pub trait FnOnce { /// The returned type after the call operator is used. #[lang = "fn_once_output"] -- cgit 1.4.1-3-g733a5