Skip to content

Commit

Permalink
Rollup merge of rust-lang#80750 - GuillaumeGomez:cleanup-to_string, r…
Browse files Browse the repository at this point in the history
…=lzutao

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

Improve code from rust-lang#80686.

r? `@lzutao`
  • Loading branch information
Dylan-DPC authored Jan 7, 2021
2 parents cc1238f + 7bc22e9 commit 9558447
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/rustc_passes/src/check_attr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 9558447

Please sign in to comment.