mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-10 23:24:24 +00:00
Auto merge of #5926 - giraffate:improve_lint_message_in_to_string_in_display, r=yaahc
Improve lint message in `to_string_in_display` This is a follow-up of https://github.com/rust-lang/rust-clippy/pull/5831. changelog: none
This commit is contained in:
commit
b57ef14290
3 changed files with 4 additions and 4 deletions
|
@ -39,7 +39,7 @@ declare_clippy_lint! {
|
|||
/// ```
|
||||
pub TO_STRING_IN_DISPLAY,
|
||||
correctness,
|
||||
"to_string method used while implementing Display trait"
|
||||
"`to_string` method used while implementing `Display` trait"
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
|
@ -80,7 +80,7 @@ impl LateLintPass<'_> for ToStringInDisplay {
|
|||
cx,
|
||||
TO_STRING_IN_DISPLAY,
|
||||
expr.span,
|
||||
"Using to_string in fmt::Display implementation might lead to infinite recursion",
|
||||
"using `to_string` in `fmt::Display` implementation might lead to infinite recursion",
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2183,7 +2183,7 @@ pub static ref ALL_LINTS: Vec<Lint> = vec![
|
|||
Lint {
|
||||
name: "to_string_in_display",
|
||||
group: "correctness",
|
||||
desc: "to_string method used while implementing Display trait",
|
||||
desc: "`to_string` method used while implementing `Display` trait",
|
||||
deprecation: None,
|
||||
module: "to_string_in_display",
|
||||
},
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
error: Using to_string in fmt::Display implementation might lead to infinite recursion
|
||||
error: using `to_string` in `fmt::Display` implementation might lead to infinite recursion
|
||||
--> $DIR/to_string_in_display.rs:25:25
|
||||
|
|
||||
LL | write!(f, "{}", self.to_string())
|
||||
|
|
Loading…
Reference in a new issue