about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2021-01-06 10:59:50 +0100
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2021-01-06 10:59:50 +0100
commit7bc22e96d38828070ac7bf60dbc41e2455422af4 (patch)
tree38b67829aa258a921901104b599418b89cf43d18
parentf4b9d32ef53c0629732ee131b640920ae12d1edb (diff)
downloadrust-7bc22e96d38828070ac7bf60dbc41e2455422af4.tar.gz
rust-7bc22e96d38828070ac7bf60dbc41e2455422af4.zip
Don't use to_string on Symbol
-rw-r--r--compiler/rustc_passes/src/check_attr.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_passes/src/check_attr.rs b/compiler/rustc_passes/src/check_attr.rs
index 420c002c5fc..a6a61ffc5da 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(