diff options
| author | Maybe Waffle <waffle.lapkin@gmail.com> | 2022-11-13 22:58:20 +0000 |
|---|---|---|
| committer | Maybe Waffle <waffle.lapkin@gmail.com> | 2022-11-13 22:58:20 +0000 |
| commit | 8a2d0f255d623390c9495dec1c9e5d22bc895e5d (patch) | |
| tree | 263fb2d3423fd9b1fbdcdb33ac4eef31965c21d4 | |
| parent | 7ddd321ecd41d8b074d06d21393fed43a85fa150 (diff) | |
| download | rust-8a2d0f255d623390c9495dec1c9e5d22bc895e5d.tar.gz rust-8a2d0f255d623390c9495dec1c9e5d22bc895e5d.zip | |
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...
| -rw-r--r-- | clippy_utils/src/macros.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/clippy_utils/src/macros.rs b/clippy_utils/src/macros.rs index 9a682fbe604..d13b34a66cc 100644 --- a/clippy_utils/src/macros.rs +++ b/clippy_utils/src/macros.rs @@ -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 ) } |
