about summary refs log tree commit diff
path: root/compiler/rustc_macros/src/diagnostics/utils.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-11-18 10:30:47 +0100
committerMatthias Krüger <matthias.krueger@famsik.de>2022-11-18 10:30:47 +0100
commite3036df0032bb6726408a9f6705acaf38e55d59f (patch)
treee8038b599a8a02930643f8d84275c23f16d4982e /compiler/rustc_macros/src/diagnostics/utils.rs
parent83356b78c4ff3e7d84e977aa6143793545967301 (diff)
downloadrust-e3036df0032bb6726408a9f6705acaf38e55d59f.tar.gz
rust-e3036df0032bb6726408a9f6705acaf38e55d59f.zip
couple of clippy::perf fixes
Diffstat (limited to 'compiler/rustc_macros/src/diagnostics/utils.rs')
-rw-r--r--compiler/rustc_macros/src/diagnostics/utils.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_macros/src/diagnostics/utils.rs b/compiler/rustc_macros/src/diagnostics/utils.rs
index ba06f61299f..dff088b9bdf 100644
--- a/compiler/rustc_macros/src/diagnostics/utils.rs
+++ b/compiler/rustc_macros/src/diagnostics/utils.rs
@@ -830,5 +830,5 @@ pub(super) fn should_generate_set_arg(field: &Field) -> bool {
 }
 
 pub(super) fn is_doc_comment(attr: &Attribute) -> bool {
-    attr.path.segments.last().unwrap().ident.to_string() == "doc"
+    attr.path.segments.last().unwrap().ident == "doc"
 }