Skip to content

Commit 9f70a7b

Browse files
committed
rustdoc changes for ~const Drop
1 parent b744bb6 commit 9f70a7b

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

src/librustdoc/clean/mod.rs

+2-10
Original file line numberDiff line numberDiff line change
@@ -116,22 +116,14 @@ impl Clean<Option<GenericBound>> for hir::GenericBound<'_> {
116116
)
117117
}
118118
hir::GenericBound::Trait(ref t, modifier) => {
119-
// `T: ~const Drop` is not equivalent to `T: Drop`, and we don't currently document `~const` bounds
120-
// because of its experimental status, so just don't show these.
121119
// `T: ~const Destruct` is hidden because `T: Destruct` is a no-op.
122120
if modifier == hir::TraitBoundModifier::MaybeConst
123-
&& [cx.tcx.lang_items().drop_trait(), cx.tcx.lang_items().destruct_trait()]
124-
.iter()
125-
.any(|tr| *tr == Some(t.trait_ref.trait_def_id().unwrap()))
121+
&& cx.tcx.lang_items().destruct_trait()
122+
== Some(t.trait_ref.trait_def_id().unwrap())
126123
{
127124
return None;
128125
}
129126

130-
#[cfg(bootstrap)]
131-
{
132-
// FIXME: remove `lang_items().drop_trait()` from above logic,
133-
// as well as the comment about `~const Drop` because it was renamed to `Destruct`.
134-
}
135127
GenericBound::TraitBound(t.clean(cx), modifier)
136128
}
137129
})

0 commit comments

Comments
 (0)