mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-08 01:28:18 +03:00
Auto merge of #4627 - kerhong:fix-typo-in-inherent-to-string, r=phansch
Fix typo in inherent_to_string documentation A simple typo fix in `inherent_to_string` and `inherent_to_string_shadow_display` documentation changelog: none
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
};
|
||||
|
||||
declare_clippy_lint! {
|
||||
/// **What id does:** Checks for the definition of inherent methods with a signature of `to_string(&self) -> String`.
|
||||
/// **What it does:** Checks for the definition of inherent methods with a signature of `to_string(&self) -> String`.
|
||||
///
|
||||
/// **Why is this bad?** This method is also implicitly defined if a type implements the `Display` trait. As the functionality of `Display` is much more versatile, it should be preferred.
|
||||
///
|
||||
@@ -46,7 +46,7 @@
|
||||
}
|
||||
|
||||
declare_clippy_lint! {
|
||||
/// **What id does:** Checks for the definition of inherent methods with a signature of `to_string(&self) -> String` and if the type implementing this method also implements the `Display` trait.
|
||||
/// **What it does:** Checks for the definition of inherent methods with a signature of `to_string(&self) -> String` and if the type implementing this method also implements the `Display` trait.
|
||||
///
|
||||
/// **Why is this bad?** This method is also implicitly defined if a type implements the `Display` trait. The less versatile inherent method will then shadow the implementation introduced by `Display`.
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user