about summary refs log tree commit diff
path: root/library/core/src
diff options
context:
space:
mode:
authorDeadbeef <ent3rm4n@gmail.com>2023-08-13 09:02:31 +0000
committerDeadbeef <ent3rm4n@gmail.com>2023-09-20 03:02:14 +0000
commit04eec37dc2cababaecffd423e330d3c19d3c6169 (patch)
tree55b68f8b57e28c6dd1fda1657cd14f4e8a3b7306 /library/core/src
parent3b9e0feff480b8df3254e7a828f50a1a55b88885 (diff)
downloadrust-04eec37dc2cababaecffd423e330d3c19d3c6169.tar.gz
rust-04eec37dc2cababaecffd423e330d3c19d3c6169.zip
Enable effects for libcore
Diffstat (limited to 'library/core/src')
-rw-r--r--library/core/src/lib.rs1
-rw-r--r--library/core/src/marker.rs2
-rw-r--r--library/core/src/ops/drop.rs2
-rw-r--r--library/core/src/ops/function.rs6
4 files changed, 6 insertions, 5 deletions
diff --git a/library/core/src/lib.rs b/library/core/src/lib.rs
index b5458e667ed..8b04bafcda5 100644
--- a/library/core/src/lib.rs
+++ b/library/core/src/lib.rs
@@ -195,6 +195,7 @@
 //
 // Language features:
 // tidy-alphabetical-start
+#![cfg_attr(not(bootstrap), feature(effects))]
 #![feature(abi_unadjusted)]
 #![feature(adt_const_params)]
 #![feature(allow_internal_unsafe)]
diff --git a/library/core/src/marker.rs b/library/core/src/marker.rs
index 5ec751e5168..d25a5821911 100644
--- a/library/core/src/marker.rs
+++ b/library/core/src/marker.rs
@@ -960,7 +960,7 @@ marker_impls! {
 #[lang = "destruct"]
 #[rustc_on_unimplemented(message = "can't drop `{Self}`", append_const_msg)]
 #[rustc_deny_explicit_impl(implement_via_object = false)]
-#[const_trait]
+// FIXME(effects) #[const_trait]
 pub trait Destruct {}
 
 /// A marker for tuple types.
diff --git a/library/core/src/ops/drop.rs b/library/core/src/ops/drop.rs
index 21c23dabfc2..34dfa9e4c51 100644
--- a/library/core/src/ops/drop.rs
+++ b/library/core/src/ops/drop.rs
@@ -202,7 +202,7 @@
 /// [nomicon]: ../../nomicon/phantom-data.html#an-exception-the-special-case-of-the-standard-library-and-its-unstable-may_dangle
 #[lang = "drop"]
 #[stable(feature = "rust1", since = "1.0.0")]
-#[const_trait]
+// FIXME(effects) #[const_trait]
 pub trait Drop {
     /// Executes the destructor for this type.
     ///
diff --git a/library/core/src/ops/function.rs b/library/core/src/ops/function.rs
index 67c8245f0bf..20f0bba4c13 100644
--- a/library/core/src/ops/function.rs
+++ b/library/core/src/ops/function.rs
@@ -72,7 +72,7 @@ use crate::marker::Tuple;
 )]
 #[fundamental] // so that regex can rely that `&str: !FnMut`
 #[must_use = "closures are lazy and do nothing unless called"]
-#[const_trait]
+// FIXME(effects) #[const_trait]
 pub trait Fn<Args: Tuple>: FnMut<Args> {
     /// Performs the call operation.
     #[unstable(feature = "fn_traits", issue = "29625")]
@@ -159,7 +159,7 @@ pub trait Fn<Args: Tuple>: FnMut<Args> {
 )]
 #[fundamental] // so that regex can rely that `&str: !FnMut`
 #[must_use = "closures are lazy and do nothing unless called"]
-#[const_trait]
+// FIXME(effects) #[const_trait]
 pub trait FnMut<Args: Tuple>: FnOnce<Args> {
     /// Performs the call operation.
     #[unstable(feature = "fn_traits", issue = "29625")]
@@ -238,7 +238,7 @@ pub trait FnMut<Args: Tuple>: FnOnce<Args> {
 )]
 #[fundamental] // so that regex can rely that `&str: !FnMut`
 #[must_use = "closures are lazy and do nothing unless called"]
-#[const_trait]
+// FIXME(effects) #[const_trait]
 pub trait FnOnce<Args: Tuple> {
     /// The returned type after the call operator is used.
     #[lang = "fn_once_output"]