Skip to content

Commit 8a2d0f2

Browse files
committed
Fix clippy and rustdoc
please, please, don't match on `Symbol::as_str`s, every time you do, somewhere in the world another waffle becomes sad...
1 parent 7ddd321 commit 8a2d0f2

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

clippy_utils/src/macros.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -199,12 +199,12 @@ pub fn first_node_in_macro(cx: &LateContext<'_>, node: &impl HirNode) -> Option<
199199
pub fn is_panic(cx: &LateContext<'_>, def_id: DefId) -> bool {
200200
let Some(name) = cx.tcx.get_diagnostic_name(def_id) else { return false };
201201
matches!(
202-
name.as_str(),
203-
"core_panic_macro"
204-
| "std_panic_macro"
205-
| "core_panic_2015_macro"
206-
| "std_panic_2015_macro"
207-
| "core_panic_2021_macro"
202+
name,
203+
sym::core_panic_macro
204+
| sym::std_panic_macro
205+
| sym::core_panic_2015_macro
206+
| sym::std_panic_2015_macro
207+
| sym::core_panic_2021_macro
208208
)
209209
}
210210

0 commit comments

Comments
 (0)