diff --git a/compiler/rustc_middle/src/lib.rs b/compiler/rustc_middle/src/lib.rs index 993cb6e7769dd..035ca65e84a2c 100644 --- a/compiler/rustc_middle/src/lib.rs +++ b/compiler/rustc_middle/src/lib.rs @@ -27,6 +27,7 @@ // tidy-alphabetical-start #![allow(internal_features)] #![allow(rustc::direct_use_of_rustc_type_ir)] +#![cfg_attr(bootstrap, feature(debug_closure_helpers))] #![cfg_attr(bootstrap, feature(never_type))] #![cfg_attr(doc, feature(intra_doc_pointers))] #![feature(allocator_api)] @@ -35,7 +36,6 @@ #![feature(const_default)] #![feature(const_trait_impl)] #![feature(core_intrinsics)] -#![feature(debug_closure_helpers)] #![feature(decl_macro)] #![feature(default_field_values)] #![feature(deref_patterns)] diff --git a/compiler/rustc_parse/src/lib.rs b/compiler/rustc_parse/src/lib.rs index 539c15f18a9a4..f073e102fcd51 100644 --- a/compiler/rustc_parse/src/lib.rs +++ b/compiler/rustc_parse/src/lib.rs @@ -1,8 +1,8 @@ //! The main parser interface. // tidy-alphabetical-start +#![cfg_attr(bootstrap, feature(debug_closure_helpers))] #![cfg_attr(test, feature(iter_order_by))] -#![feature(debug_closure_helpers)] #![feature(default_field_values)] #![feature(deref_patterns)] #![feature(iter_intersperse)] diff --git a/library/core/src/fmt/builders.rs b/library/core/src/fmt/builders.rs index ceec98c8659fb..6c05564f03b0b 100644 --- a/library/core/src/fmt/builders.rs +++ b/library/core/src/fmt/builders.rs @@ -183,7 +183,7 @@ impl<'a, 'b: 'a> DebugStruct<'a, 'b> { /// /// This method is equivalent to [`DebugStruct::field`], but formats the /// value using a provided closure rather than by calling [`Debug::fmt`]. - #[unstable(feature = "debug_closure_helpers", issue = "117729")] + #[stable(feature = "debug_closure_helpers", since = "CURRENT_RUSTC_VERSION")] pub fn field_with(&mut self, name: &str, value_fmt: F) -> &mut Self where F: FnOnce(&mut fmt::Formatter<'_>) -> fmt::Result, @@ -376,7 +376,7 @@ impl<'a, 'b: 'a> DebugTuple<'a, 'b> { /// /// This method is equivalent to [`DebugTuple::field`], but formats the /// value using a provided closure rather than by calling [`Debug::fmt`]. - #[unstable(feature = "debug_closure_helpers", issue = "117729")] + #[stable(feature = "debug_closure_helpers", since = "CURRENT_RUSTC_VERSION")] pub fn field_with(&mut self, value_fmt: F) -> &mut Self where F: FnOnce(&mut fmt::Formatter<'_>) -> fmt::Result, @@ -582,7 +582,7 @@ impl<'a, 'b: 'a> DebugSet<'a, 'b> { /// /// This method is equivalent to [`DebugSet::entry`], but formats the /// entry using a provided closure rather than by calling [`Debug::fmt`]. - #[unstable(feature = "debug_closure_helpers", issue = "117729")] + #[stable(feature = "debug_closure_helpers", since = "CURRENT_RUSTC_VERSION")] pub fn entry_with(&mut self, entry_fmt: F) -> &mut Self where F: FnOnce(&mut fmt::Formatter<'_>) -> fmt::Result, @@ -774,7 +774,7 @@ impl<'a, 'b: 'a> DebugList<'a, 'b> { /// /// This method is equivalent to [`DebugList::entry`], but formats the /// entry using a provided closure rather than by calling [`Debug::fmt`]. - #[unstable(feature = "debug_closure_helpers", issue = "117729")] + #[stable(feature = "debug_closure_helpers", since = "CURRENT_RUSTC_VERSION")] pub fn entry_with(&mut self, entry_fmt: F) -> &mut Self where F: FnOnce(&mut fmt::Formatter<'_>) -> fmt::Result, @@ -1032,7 +1032,7 @@ impl<'a, 'b: 'a> DebugMap<'a, 'b> { /// /// This method is equivalent to [`DebugMap::key`], but formats the /// key using a provided closure rather than by calling [`Debug::fmt`]. - #[unstable(feature = "debug_closure_helpers", issue = "117729")] + #[stable(feature = "debug_closure_helpers", since = "CURRENT_RUSTC_VERSION")] pub fn key_with(&mut self, key_fmt: F) -> &mut Self where F: FnOnce(&mut fmt::Formatter<'_>) -> fmt::Result, @@ -1097,7 +1097,7 @@ impl<'a, 'b: 'a> DebugMap<'a, 'b> { /// /// This method is equivalent to [`DebugMap::value`], but formats the /// value using a provided closure rather than by calling [`Debug::fmt`]. - #[unstable(feature = "debug_closure_helpers", issue = "117729")] + #[stable(feature = "debug_closure_helpers", since = "CURRENT_RUSTC_VERSION")] pub fn value_with(&mut self, value_fmt: F) -> &mut Self where F: FnOnce(&mut fmt::Formatter<'_>) -> fmt::Result, diff --git a/library/coretests/tests/lib.rs b/library/coretests/tests/lib.rs index 142df37c2b7fe..ee8570272364c 100644 --- a/library/coretests/tests/lib.rs +++ b/library/coretests/tests/lib.rs @@ -46,7 +46,6 @@ #![feature(core_private_bignum)] #![feature(core_private_diy_float)] #![feature(cstr_display)] -#![feature(debug_closure_helpers)] #![feature(dec2flt)] #![feature(drop_guard)] #![feature(duration_constants)]