未验证 提交 a6ababb1 编写于 作者: Y Yuki Okushi 提交者: GitHub

Rollup merge of #83041 - guswynn:stable_debug_struct, r=m-ou-se

stabilize debug_non_exhaustive

tracking issue: https://github.com/rust-lang/rust/issues/67364

but it is still an open question whether the other `Debug*` struct's should have a similar method. I would guess that would best be put underneath a new feature gate, as this one seems uncontroversial enough to stabilize as is
......@@ -165,7 +165,6 @@ pub fn field(&mut self, name: &str, value: &dyn fmt::Debug) -> &mut Self {
/// # Examples
///
/// ```
/// # #![feature(debug_non_exhaustive)]
/// use std::fmt;
///
/// struct Bar {
......@@ -186,7 +185,7 @@ pub fn field(&mut self, name: &str, value: &dyn fmt::Debug) -> &mut Self {
/// "Bar { bar: 10, .. }",
/// );
/// ```
#[unstable(feature = "debug_non_exhaustive", issue = "67364")]
#[stable(feature = "debug_non_exhaustive", since = "1.53.0")]
pub fn finish_non_exhaustive(&mut self) -> fmt::Result {
self.result = self.result.and_then(|_| {
// Draw non-exhaustive dots (`..`), and open brace if necessary (no fields).
......
......@@ -20,7 +20,6 @@
#![feature(core_intrinsics)]
#![feature(core_private_bignum)]
#![feature(core_private_diy_float)]
#![feature(debug_non_exhaustive)]
#![feature(dec2flt)]
#![feature(div_duration)]
#![feature(duration_consts_2)]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册