diff options
| author | Dylan MacKenzie <ecstaticmorse@gmail.com> | 2020-01-13 20:30:27 -0800 |
|---|---|---|
| committer | Dylan MacKenzie <ecstaticmorse@gmail.com> | 2020-01-20 00:00:08 -0800 |
| commit | eb60346cc99bde574708fe2e419898044868c1f8 (patch) | |
| tree | 49f87e9ea50aca2ffb0895a31b3818317d6af9bd /src/libsyntax | |
| parent | 958b0bc8d22633927796502b13a7ce944100dec5 (diff) | |
| download | rust-eb60346cc99bde574708fe2e419898044868c1f8.tar.gz rust-eb60346cc99bde574708fe2e419898044868c1f8.zip | |
Add `MaybeConst` variant to `{ast,hir}::TraitBoundModifier`
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/ast.rs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs index 6b54893075e..ce4d9cca81e 100644 --- a/src/libsyntax/ast.rs +++ b/src/libsyntax/ast.rs @@ -266,12 +266,19 @@ pub const CRATE_NODE_ID: NodeId = NodeId::from_u32_const(0); /// small, positive ids. pub const DUMMY_NODE_ID: NodeId = NodeId::MAX; -/// A modifier on a bound, currently this is only used for `?Sized`, where the -/// modifier is `Maybe`. Negative bounds should also be handled here. +/// A modifier on a bound, e.g., `?Sized` or `?const Trait`. +/// +/// Negative bounds should also be handled here. #[derive(Copy, Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Debug)] pub enum TraitBoundModifier { + /// No modifiers None, + + /// `?Trait` Maybe, + + /// `?const Trait` + MaybeConst, } /// The AST represents all type param bounds as types. |
