diff options
| author | Yuki Okushi <jtitor@2k36.org> | 2021-10-20 04:35:14 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-20 04:35:14 +0900 |
| commit | 30cc96efce9a379de48db7eb0b2d9cca16353f8d (patch) | |
| tree | bef9f0ffb609adea04adc4d63c4e1e068a26fad7 | |
| parent | e84537bcdd84e43bd6a296ede94e227e35c1ab4b (diff) | |
| parent | ebf4f03f7d4c1fa53ab7da166d6bf0becabb584c (diff) | |
| download | rust-30cc96efce9a379de48db7eb0b2d9cca16353f8d.tar.gz rust-30cc96efce9a379de48db7eb0b2d9cca16353f8d.zip | |
Rollup merge of #88860 - nbdd0121:panic, r=m-ou-se
Deduplicate panic_fmt std's begin_panic_fmt and core's panic_fmt are duplicates. Merge them to declutter code and remove a lang item.
| -rw-r--r-- | clippy_utils/src/higher.rs | 1 | ||||
| -rw-r--r-- | clippy_utils/src/lib.rs | 1 | ||||
| -rw-r--r-- | clippy_utils/src/paths.rs | 1 |
3 files changed, 0 insertions, 3 deletions
diff --git a/clippy_utils/src/higher.rs b/clippy_utils/src/higher.rs index ba4d50bf744..74cf323720c 100644 --- a/clippy_utils/src/higher.rs +++ b/clippy_utils/src/higher.rs @@ -619,7 +619,6 @@ impl PanicExpn<'tcx> { if let Some(init) = block.expr; if let ExprKind::Call(_, [format_args]) = init.kind; let expn_data = expr.span.ctxt().outer_expn_data(); - if let ExprKind::AddrOf(_, _, format_args) = format_args.kind; if let Some(format_args) = FormatArgsExpn::parse(format_args); then { Some(PanicExpn { diff --git a/clippy_utils/src/lib.rs b/clippy_utils/src/lib.rs index c47aa9170e5..8e94d16a33a 100644 --- a/clippy_utils/src/lib.rs +++ b/clippy_utils/src/lib.rs @@ -1646,7 +1646,6 @@ pub fn match_panic_def_id(cx: &LateContext<'_>, did: DefId) -> bool { did, &[ &paths::BEGIN_PANIC, - &paths::BEGIN_PANIC_FMT, &paths::PANIC_ANY, &paths::PANICKING_PANIC, &paths::PANICKING_PANIC_FMT, diff --git a/clippy_utils/src/paths.rs b/clippy_utils/src/paths.rs index e43c5756021..81aff585ded 100644 --- a/clippy_utils/src/paths.rs +++ b/clippy_utils/src/paths.rs @@ -20,7 +20,6 @@ pub const ARC_PTR_EQ: [&str; 4] = ["alloc", "sync", "Arc", "ptr_eq"]; pub const ASMUT_TRAIT: [&str; 3] = ["core", "convert", "AsMut"]; pub const ASREF_TRAIT: [&str; 3] = ["core", "convert", "AsRef"]; pub(super) const BEGIN_PANIC: [&str; 3] = ["std", "panicking", "begin_panic"]; -pub(super) const BEGIN_PANIC_FMT: [&str; 3] = ["std", "panicking", "begin_panic_fmt"]; /// Preferably use the diagnostic item `sym::Borrow` where possible pub const BORROW_TRAIT: [&str; 3] = ["core", "borrow", "Borrow"]; pub const BTREEMAP_CONTAINS_KEY: [&str; 6] = ["alloc", "collections", "btree", "map", "BTreeMap", "contains_key"]; |
