Introduce const Trait (always-const trait bounds)
This commit is contained in:
parent
2fe50cd72c
commit
3eb48a35c8
69 changed files with 505 additions and 223 deletions
|
|
@ -449,8 +449,8 @@ impl clean::GenericBound {
|
|||
hir::TraitBoundModifier::None => "",
|
||||
hir::TraitBoundModifier::Maybe => "?",
|
||||
hir::TraitBoundModifier::Negative => "!",
|
||||
// ~const is experimental; do not display those bounds in rustdoc
|
||||
hir::TraitBoundModifier::MaybeConst => "",
|
||||
// `const` and `~const` trait bounds are experimental; don't render them.
|
||||
hir::TraitBoundModifier::Const | hir::TraitBoundModifier::MaybeConst => "",
|
||||
};
|
||||
if f.alternate() {
|
||||
write!(f, "{modifier_str}{ty:#}", ty = ty.print(cx))
|
||||
|
|
|
|||
|
|
@ -547,6 +547,9 @@ pub(crate) fn from_trait_bound_modifier(
|
|||
None => TraitBoundModifier::None,
|
||||
Maybe => TraitBoundModifier::Maybe,
|
||||
MaybeConst => TraitBoundModifier::MaybeConst,
|
||||
// FIXME(const_trait_impl): Create rjt::TBM::Const and map to it once always-const bounds
|
||||
// are less experimental.
|
||||
Const => TraitBoundModifier::None,
|
||||
// FIXME(negative-bounds): This bound should be rendered negative, but
|
||||
// since that's experimental, maybe let's not add it to the rustdoc json
|
||||
// API just now...
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue