From 7bc22e96d38828070ac7bf60dbc41e2455422af4 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Wed, 6 Jan 2021 10:59:50 +0100 Subject: [PATCH] Don't use to_string on Symbol --- compiler/rustc_passes/src/check_attr.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/rustc_passes/src/check_attr.rs b/compiler/rustc_passes/src/check_attr.rs index 420c002c5fc46..a6a61ffc5dae5 100644 --- a/compiler/rustc_passes/src/check_attr.rs +++ b/compiler/rustc_passes/src/check_attr.rs @@ -359,7 +359,7 @@ impl CheckAttrVisitor<'tcx> { return false; } let item_name = self.tcx.hir().name(hir_id); - if item_name.to_string() == doc_alias { + if &*item_name.as_str() == doc_alias { self.tcx .sess .struct_span_err(