about summary refs log tree commit diff
path: root/clippy_utils/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-05-08 00:57:08 +0000
committerbors <bors@rust-lang.org>2022-05-08 00:57:08 +0000
commit6d0378953eebdfafd7ff150fe2ab46bc6c645b3f (patch)
tree931de41cd4ece04668af917b34a326eb9cf7b976 /clippy_utils/src
parentdd6ee7f2b4d476119f183641acdf955889dc0d5f (diff)
parent41c7e4d3822c1a4d3d93fe64cb2d70d13d0687b5 (diff)
Auto merge of #94206 - PrestonFrom:significant_drop, r=flip1995
Create clippy lint against unexpectedly late drop for temporaries in match scrutinee expressions

A new clippy lint for issue 93883 (https://github.com/rust-lang/rust/issues/93883). Relies on a new trait in `marker` (called `SignificantDrop` to enable linting), which is why this PR is for the rust-lang repo and not the clippy repo.

changelog: new lint [`significant_drop_in_scrutinee`]
Diffstat (limited to 'clippy_utils/src')
-rw-r--r--clippy_utils/src/attrs.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/clippy_utils/src/attrs.rs b/clippy_utils/src/attrs.rs
index 25a84d16650..7f448175e32 100644
--- a/clippy_utils/src/attrs.rs
+++ b/clippy_utils/src/attrs.rs
@@ -22,6 +22,7 @@ pub const BUILTIN_ATTRIBUTES: &[(&str, DeprecationStatus)] = &[
     ("cyclomatic_complexity", DeprecationStatus::Replaced("cognitive_complexity")),
     ("dump",                  DeprecationStatus::None),
     ("msrv",                  DeprecationStatus::None),
+    ("has_significant_drop",  DeprecationStatus::None),
 ];
 
 pub struct LimitStack {