From 9f70a7b111a47976522ccf7d06ecae9ee527f418 Mon Sep 17 00:00:00 2001 From: Pietro Albini Date: Tue, 5 Apr 2022 15:11:13 +0200 Subject: [PATCH] rustdoc changes for ~const Drop --- src/librustdoc/clean/mod.rs | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs index 37c24738a2a..e6ef3c26e29 100644 --- a/src/librustdoc/clean/mod.rs +++ b/src/librustdoc/clean/mod.rs @@ -116,22 +116,14 @@ fn clean(&self, cx: &mut DocContext<'_>) -> Option { ) } hir::GenericBound::Trait(ref t, modifier) => { - // `T: ~const Drop` is not equivalent to `T: Drop`, and we don't currently document `~const` bounds - // because of its experimental status, so just don't show these. // `T: ~const Destruct` is hidden because `T: Destruct` is a no-op. if modifier == hir::TraitBoundModifier::MaybeConst - && [cx.tcx.lang_items().drop_trait(), cx.tcx.lang_items().destruct_trait()] - .iter() - .any(|tr| *tr == Some(t.trait_ref.trait_def_id().unwrap())) + && cx.tcx.lang_items().destruct_trait() + == Some(t.trait_ref.trait_def_id().unwrap()) { return None; } - #[cfg(bootstrap)] - { - // FIXME: remove `lang_items().drop_trait()` from above logic, - // as well as the comment about `~const Drop` because it was renamed to `Destruct`. - } GenericBound::TraitBound(t.clean(cx), modifier) } }) -- 2.44.0