Skip to content

Commit 87c66a8

Browse files
committed
Add note to TyS::needs_drop about union dependency on it
For now, part of unstable feature untagged_unions.
1 parent f4b2d71 commit 87c66a8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/librustc/ty/util.rs

+2
Original file line numberDiff line numberDiff line change
@@ -740,6 +740,8 @@ impl<'a, 'tcx> ty::TyS<'tcx> {
740740
///
741741
/// (Note that this implies that if `ty` has a destructor attached,
742742
/// then `needs_drop` will definitely return `true` for `ty`.)
743+
///
744+
/// Note that this method is used to check eligible types in unions.
743745
#[inline]
744746
pub fn needs_drop(&'tcx self,
745747
tcx: TyCtxt<'a, 'tcx, 'tcx>,

0 commit comments

Comments
 (0)