diff --git a/compiler/rustc_middle/src/lib.rs b/compiler/rustc_middle/src/lib.rs index 72786931ff8a0..d94ed59b018ff 100644 --- a/compiler/rustc_middle/src/lib.rs +++ b/compiler/rustc_middle/src/lib.rs @@ -29,6 +29,7 @@ #![allow(rustc::diagnostic_outside_of_impl)] #![allow(rustc::direct_use_of_rustc_type_ir)] #![allow(rustc::untranslatable_diagnostic)] +#![cfg_attr(bootstrap, feature(debug_closure_helpers))] #![feature(allocator_api)] #![feature(array_windows)] #![feature(assert_matches)] @@ -37,7 +38,6 @@ #![feature(box_patterns)] #![feature(closure_track_caller)] #![feature(core_intrinsics)] -#![feature(debug_closure_helpers)] #![feature(decl_macro)] #![feature(discriminant_kind)] #![feature(extern_types)] diff --git a/compiler/rustc_parse/src/lib.rs b/compiler/rustc_parse/src/lib.rs index edec44ca95019..e8d548ce1ed1c 100644 --- a/compiler/rustc_parse/src/lib.rs +++ b/compiler/rustc_parse/src/lib.rs @@ -3,9 +3,9 @@ // tidy-alphabetical-start #![allow(rustc::diagnostic_outside_of_impl)] #![allow(rustc::untranslatable_diagnostic)] +#![cfg_attr(bootstrap, feature(debug_closure_helpers))] #![feature(assert_matches)] #![feature(box_patterns)] -#![feature(debug_closure_helpers)] #![feature(default_field_values)] #![feature(if_let_guard)] #![feature(iter_intersperse)] diff --git a/library/core/src/fmt/builders.rs b/library/core/src/fmt/builders.rs index 4ea6c6ba8fb9c..953887f783f52 100644 --- a/library/core/src/fmt/builders.rs +++ b/library/core/src/fmt/builders.rs @@ -137,7 +137,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, @@ -334,7 +334,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, @@ -554,7 +554,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, @@ -746,7 +746,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, @@ -976,7 +976,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, @@ -1052,7 +1052,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 80b62038c40ec..7634123cbabf3 100644 --- a/library/coretests/tests/lib.rs +++ b/library/coretests/tests/lib.rs @@ -37,7 +37,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)]