mirror of
https://github.com/rust-lang/rust-clippy
synced 2025-02-17 06:28:42 +00:00
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...
This commit is contained in:
parent
7ddd321ecd
commit
8a2d0f255d
1 changed files with 6 additions and 6 deletions
|
@ -199,12 +199,12 @@ pub fn first_node_in_macro(cx: &LateContext<'_>, node: &impl HirNode) -> Option<
|
|||
pub fn is_panic(cx: &LateContext<'_>, def_id: DefId) -> bool {
|
||||
let Some(name) = cx.tcx.get_diagnostic_name(def_id) else { return false };
|
||||
matches!(
|
||||
name.as_str(),
|
||||
"core_panic_macro"
|
||||
| "std_panic_macro"
|
||||
| "core_panic_2015_macro"
|
||||
| "std_panic_2015_macro"
|
||||
| "core_panic_2021_macro"
|
||||
name,
|
||||
sym::core_panic_macro
|
||||
| sym::std_panic_macro
|
||||
| sym::core_panic_2015_macro
|
||||
| sym::std_panic_2015_macro
|
||||
| sym::core_panic_2021_macro
|
||||
)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue