Rollup merge of #22632 - nagisa:kill-show-string-with-fire!, r=alexcrichton
Toss the tomatoes! r? @aturon Fixes #22478. The underlying bug(?) behind that issue still exists though and there’s another issue that reports it.
This commit is contained in:
@@ -246,16 +246,6 @@ impl<'a> Display for Arguments<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
/// Format trait for the `:?` format. Useful for debugging, all types
|
||||
/// should implement this.
|
||||
#[deprecated(since = "1.0.0", reason = "renamed to Debug")]
|
||||
#[unstable(feature = "old_fmt")]
|
||||
pub trait Show {
|
||||
/// Formats the value using the given formatter.
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
fn fmt(&self, &mut Formatter) -> Result;
|
||||
}
|
||||
|
||||
/// Format trait for the `:?` format. Useful for debugging, all types
|
||||
/// should implement this.
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
@@ -269,22 +259,6 @@ pub trait Debug {
|
||||
fn fmt(&self, &mut Formatter) -> Result;
|
||||
}
|
||||
|
||||
#[allow(deprecated)]
|
||||
impl<T: Show + ?Sized> Debug for T {
|
||||
#[allow(deprecated)]
|
||||
fn fmt(&self, f: &mut Formatter) -> Result { Show::fmt(self, f) }
|
||||
}
|
||||
|
||||
/// When a value can be semantically expressed as a String, this trait may be
|
||||
/// used. It corresponds to the default format, `{}`.
|
||||
#[deprecated(since = "1.0.0", reason = "renamed to Display")]
|
||||
#[unstable(feature = "old_fmt")]
|
||||
pub trait String {
|
||||
/// Formats the value using the given formatter.
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
fn fmt(&self, &mut Formatter) -> Result;
|
||||
}
|
||||
|
||||
/// When a value can be semantically expressed as a String, this trait may be
|
||||
/// used. It corresponds to the default format, `{}`.
|
||||
#[rustc_on_unimplemented = "`{Self}` cannot be formatted with the default \
|
||||
@@ -297,12 +271,6 @@ pub trait Display {
|
||||
fn fmt(&self, &mut Formatter) -> Result;
|
||||
}
|
||||
|
||||
#[allow(deprecated)]
|
||||
impl<T: String + ?Sized> Display for T {
|
||||
#[allow(deprecated)]
|
||||
fn fmt(&self, f: &mut Formatter) -> Result { String::fmt(self, f) }
|
||||
}
|
||||
|
||||
/// Format trait for the `o` character
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub trait Octal {
|
||||
|
||||
Reference in New Issue
Block a user