Skip to content

Commit

Permalink
Rollup merge of #80750 - GuillaumeGomez:cleanup-to_string, r=lzutao
Browse files Browse the repository at this point in the history
Don't use to_string on Symbol in rustc_passes/check_attr.rs

Improve code from #80686.

r? ``@lzutao``
  • Loading branch information
JohnTitor authored Jan 7, 2021
2 parents 6fb7924 + 7bc22e9 commit fd7f244
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 fd7f244

Please sign in to comment.