From 87c66a88e5cc8714da49a98db21d7f014e06db09 Mon Sep 17 00:00:00 2001 From: Ulrik Sverdrup Date: Sun, 13 Jan 2019 16:32:04 +0100 Subject: [PATCH] Add note to TyS::needs_drop about union dependency on it For now, part of unstable feature untagged_unions. --- src/librustc/ty/util.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/librustc/ty/util.rs b/src/librustc/ty/util.rs index e989ef823e979..3fbf5a757c6ff 100644 --- a/src/librustc/ty/util.rs +++ b/src/librustc/ty/util.rs @@ -740,6 +740,8 @@ impl<'a, 'tcx> ty::TyS<'tcx> { /// /// (Note that this implies that if `ty` has a destructor attached, /// then `needs_drop` will definitely return `true` for `ty`.) + /// + /// Note that this method is used to check eligible types in unions. #[inline] pub fn needs_drop(&'tcx self, tcx: TyCtxt<'a, 'tcx, 'tcx>,