about summary refs log tree commit diff
path: root/library/core/src/ops/function.rs
diff options
context:
space:
mode:
authorDeadbeef <ent3rm4n@gmail.com>2022-09-10 07:44:56 +0000
committerDeadbeef <ent3rm4n@gmail.com>2022-09-16 12:08:45 +0800
commit31f259ce5a400801daecd76760a7665aaf130643 (patch)
tree27dff5243ba4b41c2e814c97c31935ff6bdab78e /library/core/src/ops/function.rs
parentf937a10c4ef9448abdea6e6d4fa63472723bc779 (diff)
downloadrust-31f259ce5a400801daecd76760a7665aaf130643.tar.gz
rust-31f259ce5a400801daecd76760a7665aaf130643.zip
Add `const_trait` to `Allocator`
Diffstat (limited to 'library/core/src/ops/function.rs')
-rw-r--r--library/core/src/ops/function.rs3
1 files changed, 3 insertions, 0 deletions
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<Args>: FnMut<Args> {
     /// Performs the call operation.
     #[unstable(feature = "fn_traits", issue = "29625")]
@@ -158,6 +159,7 @@ pub trait Fn<Args>: FnMut<Args> {
 )]
 #[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<Args>: FnOnce<Args> {
     /// Performs the call operation.
     #[unstable(feature = "fn_traits", issue = "29625")]
@@ -237,6 +239,7 @@ pub trait FnMut<Args>: FnOnce<Args> {
 )]
 #[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<Args> {
     /// The returned type after the call operator is used.
     #[lang = "fn_once_output"]