Skip to content

Commit fd7f244

Browse files
authored
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``
2 parents 6fb7924 + 7bc22e9 commit fd7f244

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/rustc_passes/src/check_attr.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ impl CheckAttrVisitor<'tcx> {
359359
return false;
360360
}
361361
let item_name = self.tcx.hir().name(hir_id);
362-
if item_name.to_string() == doc_alias {
362+
if &*item_name.as_str() == doc_alias {
363363
self.tcx
364364
.sess
365365
.struct_span_err(

0 commit comments

Comments
 (0)