remove recursive 'Display' implementations

This commit is contained in:
Daniel Eades 2023-01-12 11:53:45 +00:00
parent 80e616e00b
commit c4b36b64aa
2 changed files with 24 additions and 24 deletions

View file

@ -123,8 +123,8 @@ impl FromStr for TokenStream {
/// into the same token stream (modulo spans), except for possibly `TokenTree::Group`s /// into the same token stream (modulo spans), except for possibly `TokenTree::Group`s
/// with `Delimiter::None` delimiters and negative numeric literals. /// with `Delimiter::None` delimiters and negative numeric literals.
impl fmt::Display for TokenStream { impl fmt::Display for TokenStream {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { fn fmt(&self, _f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.write_str(&self.to_string()) unimplemented!()
} }
} }
@ -522,8 +522,8 @@ impl From<Literal> for TokenTree {
/// into the same token tree (modulo spans), except for possibly `TokenTree::Group`s /// into the same token tree (modulo spans), except for possibly `TokenTree::Group`s
/// with `Delimiter::None` delimiters and negative numeric literals. /// with `Delimiter::None` delimiters and negative numeric literals.
impl fmt::Display for TokenTree { impl fmt::Display for TokenTree {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { fn fmt(&self, _f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.write_str(&self.to_string()) unimplemented!()
} }
} }
@ -619,8 +619,8 @@ impl Group {
/// into the same group (modulo spans), except for possibly `TokenTree::Group`s /// into the same group (modulo spans), except for possibly `TokenTree::Group`s
/// with `Delimiter::None` delimiters. /// with `Delimiter::None` delimiters.
impl fmt::Display for Group { impl fmt::Display for Group {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { fn fmt(&self, _f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.write_str(&self.to_string()) unimplemented!()
} }
} }
@ -693,8 +693,8 @@ impl Punct {
/// Prints the punctuation character as a string that should be losslessly convertible /// Prints the punctuation character as a string that should be losslessly convertible
/// back into the same character. /// back into the same character.
impl fmt::Display for Punct { impl fmt::Display for Punct {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { fn fmt(&self, _f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.write_str(&self.to_string()) unimplemented!()
} }
} }
@ -771,8 +771,8 @@ impl Ident {
/// Prints the identifier as a string that should be losslessly convertible /// Prints the identifier as a string that should be losslessly convertible
/// back into the same identifier. /// back into the same identifier.
impl fmt::Display for Ident { impl fmt::Display for Ident {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { fn fmt(&self, _f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.write_str(&self.to_string()) unimplemented!()
} }
} }
@ -1014,8 +1014,8 @@ impl FromStr for Literal {
/// Prints the literal as a string that should be losslessly convertible /// Prints the literal as a string that should be losslessly convertible
/// back into the same literal (except for possible rounding for floating point literals). /// back into the same literal (except for possible rounding for floating point literals).
impl fmt::Display for Literal { impl fmt::Display for Literal {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { fn fmt(&self, _f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.write_str(&self.to_string()) unimplemented!()
} }
} }

View file

@ -124,8 +124,8 @@ impl FromStr for TokenStream {
/// into the same token stream (modulo spans), except for possibly `TokenTree::Group`s /// into the same token stream (modulo spans), except for possibly `TokenTree::Group`s
/// with `Delimiter::None` delimiters and negative numeric literals. /// with `Delimiter::None` delimiters and negative numeric literals.
impl fmt::Display for TokenStream { impl fmt::Display for TokenStream {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { fn fmt(&self, _f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.write_str(&self.to_string()) unimplemented!()
} }
} }
@ -572,8 +572,8 @@ impl From<Literal> for TokenTree {
/// into the same token tree (modulo spans), except for possibly `TokenTree::Group`s /// into the same token tree (modulo spans), except for possibly `TokenTree::Group`s
/// with `Delimiter::None` delimiters and negative numeric literals. /// with `Delimiter::None` delimiters and negative numeric literals.
impl fmt::Display for TokenTree { impl fmt::Display for TokenTree {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { fn fmt(&self, _f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.write_str(&self.to_string()) unimplemented!()
} }
} }
@ -669,8 +669,8 @@ impl Group {
/// into the same group (modulo spans), except for possibly `TokenTree::Group`s /// into the same group (modulo spans), except for possibly `TokenTree::Group`s
/// with `Delimiter::None` delimiters. /// with `Delimiter::None` delimiters.
impl fmt::Display for Group { impl fmt::Display for Group {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { fn fmt(&self, _f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.write_str(&self.to_string()) unimplemented!()
} }
} }
@ -743,8 +743,8 @@ impl Punct {
/// Prints the punctuation character as a string that should be losslessly convertible /// Prints the punctuation character as a string that should be losslessly convertible
/// back into the same character. /// back into the same character.
impl fmt::Display for Punct { impl fmt::Display for Punct {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { fn fmt(&self, _f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.write_str(&self.to_string()) unimplemented!()
} }
} }
@ -821,8 +821,8 @@ impl Ident {
/// Prints the identifier as a string that should be losslessly convertible /// Prints the identifier as a string that should be losslessly convertible
/// back into the same identifier. /// back into the same identifier.
impl fmt::Display for Ident { impl fmt::Display for Ident {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { fn fmt(&self, _f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.write_str(&self.to_string()) unimplemented!()
} }
} }
@ -1064,8 +1064,8 @@ impl FromStr for Literal {
/// Prints the literal as a string that should be losslessly convertible /// Prints the literal as a string that should be losslessly convertible
/// back into the same literal (except for possible rounding for floating point literals). /// back into the same literal (except for possible rounding for floating point literals).
impl fmt::Display for Literal { impl fmt::Display for Literal {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { fn fmt(&self, _f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.write_str(&self.to_string()) unimplemented!()
} }
} }