Introduce const Trait (always-const trait bounds)

This commit is contained in:
León Orell Valerian Liehr
2023-12-18 17:55:55 +01:00
parent 2fe50cd72c
commit 3eb48a35c8
69 changed files with 505 additions and 223 deletions

View File

@@ -420,9 +420,15 @@ pub enum GenericArgsParentheses {
/// A modifier on a trait bound.
#[derive(Copy, Clone, PartialEq, Eq, Hash, Debug, HashStable_Generic)]
pub enum TraitBoundModifier {
/// `Type: Trait`
None,
/// `Type: !Trait`
Negative,
/// `Type: ?Trait`
Maybe,
/// `Type: const Trait`
Const,
/// `Type: ~const Trait`
MaybeConst,
}