Rollup merge of #80750 - GuillaumeGomez:cleanup-to_string, r=lzutao

Don't use to_string on Symbol in rustc_passes/check_attr.rs

Improve code from #80686.

r? ``@lzutao``
This commit is contained in:
Yuki Okushi 2021-01-08 02:06:14 +09:00 committed by GitHub
commit fd7f2443f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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(