Skip to content

Commit 223055c

Browse files
authored
Rollup merge of rust-lang#75699 - notriddle:drop-bounds-lint, r=petrochenkov
Uplift drop-bounds lint from clippy Bounds on `T: Drop` do nothing, so they should warn.
2 parents 99afbfc + 239f20e commit 223055c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

core/src/mem/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -568,6 +568,7 @@ pub unsafe fn align_of_val_raw<T: ?Sized>(val: *const T) -> usize {
568568
#[inline]
569569
#[stable(feature = "needs_drop", since = "1.21.0")]
570570
#[rustc_const_stable(feature = "const_needs_drop", since = "1.36.0")]
571+
#[rustc_diagnostic_item = "needs_drop"]
571572
pub const fn needs_drop<T>() -> bool {
572573
intrinsics::needs_drop::<T>()
573574
}

0 commit comments

Comments
 (0)