Rollup merge of #80750 - GuillaumeGomez:cleanup-to_string, r=lzutao
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``

aidancully/rust,graydon/rust,graydon/rust,graydon/rust,aidancully/rust,graydon/rust,aidancully/rust,aidancully/rust,aidancully/rust,aidancully/rust,graydon/rust,graydon/rust