Use is_lang_item more aggressively

This commit is contained in:
Michael Goulet
2024-06-14 14:46:32 -04:00
parent d5c48ebc71
commit 93ff86ed7c
44 changed files with 171 additions and 166 deletions

View File

@@ -55,7 +55,7 @@ pub fn trivial_dropck_outlives<'tcx>(tcx: TyCtxt<'tcx>, ty: Ty<'tcx>) -> bool {
}
ty::Adt(def, _) => {
if Some(def.did()) == tcx.lang_items().manually_drop() {
if def.is_manually_drop() {
// `ManuallyDrop` never has a dtor.
true
} else {