From 04eec37dc2cababaecffd423e330d3c19d3c6169 Mon Sep 17 00:00:00 2001 From: Deadbeef Date: Sun, 13 Aug 2023 09:02:31 +0000 Subject: Enable effects for libcore --- library/core/src/lib.rs | 1 + library/core/src/marker.rs | 2 +- library/core/src/ops/drop.rs | 2 +- library/core/src/ops/function.rs | 6 +++--- 4 files changed, 6 insertions(+), 5 deletions(-) (limited to 'library') 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: FnMut { /// Performs the call operation. #[unstable(feature = "fn_traits", issue = "29625")] @@ -159,7 +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"] -#[const_trait] +// FIXME(effects) #[const_trait] pub trait FnMut: FnOnce { /// Performs the call operation. #[unstable(feature = "fn_traits", issue = "29625")] @@ -238,7 +238,7 @@ pub trait FnMut: FnOnce { )] #[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 { /// The returned type after the call operator is used. #[lang = "fn_once_output"] -- cgit 1.4.1-3-g733a5