From de710c37029c56f3b58693b50750bc46d1b370e8 Mon Sep 17 00:00:00 2001 From: Aleksandr Pak Date: Tue, 24 Dec 2024 15:29:56 +1100 Subject: [PATCH] temporarily lint RefCell late drops --- clippy_lints/src/significant_drop_tightening.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/clippy_lints/src/significant_drop_tightening.rs b/clippy_lints/src/significant_drop_tightening.rs index c690696aefc1..f54516290b3a 100644 --- a/clippy_lints/src/significant_drop_tightening.rs +++ b/clippy_lints/src/significant_drop_tightening.rs @@ -163,6 +163,13 @@ impl<'cx, 'others, 'tcx> AttrChecker<'cx, 'others, 'tcx> { fn has_sig_drop_attr_uncached(&mut self, ty: Ty<'tcx>) -> bool { if let Some(adt) = ty.ty_adt_def() { + if matches!( + self.cx.tcx.get_diagnostic_name(adt.did()), + Some(sym::RefCellRef | sym::RefCellRefMut) + ) { + return true; + } + let mut iter = get_attr( self.cx.sess(), self.cx.tcx.get_attrs_unchecked(adt.did()),