diff options
| author | Takayuki Maeda <takoyaki0316@gmail.com> | 2022-07-20 18:19:57 +0900 |
|---|---|---|
| committer | Takayuki Maeda <takoyaki0316@gmail.com> | 2022-07-20 18:19:57 +0900 |
| commit | 56e7777755945041da1f898d1bd1887e554adce1 (patch) | |
| tree | a12ed09d37a2b6fcc95d41ad416625548d26b24b /compiler/rustc_resolve/src | |
| parent | 57a155b9faf480ae0d1cc46ffc4b5e1a468bc65c (diff) | |
| download | rust-56e7777755945041da1f898d1bd1887e554adce1.tar.gz rust-56e7777755945041da1f898d1bd1887e554adce1.zip | |
avoid `&str` to String conversions
Diffstat (limited to 'compiler/rustc_resolve/src')
| -rw-r--r-- | compiler/rustc_resolve/src/diagnostics.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_resolve/src/diagnostics.rs b/compiler/rustc_resolve/src/diagnostics.rs index 7a1695fc862..df13136dcce 100644 --- a/compiler/rustc_resolve/src/diagnostics.rs +++ b/compiler/rustc_resolve/src/diagnostics.rs @@ -2603,9 +2603,9 @@ fn show_candidates( .skip(1) .all(|(_, descr, _, _)| descr == descr_first) { - descr_first.to_string() + descr_first } else { - "item".to_string() + "item" }; let plural_descr = if descr.ends_with("s") { format!("{}es", descr) } else { format!("{}s", descr) }; |
