diff options
| author | Sean Patrick Santos <SeanPatrickSantos@gmail.com> | 2015-03-25 10:53:28 -0600 |
|---|---|---|
| committer | Sean Patrick Santos <SeanPatrickSantos@gmail.com> | 2015-04-23 21:02:29 -0600 |
| commit | 29eb550ee6a9fd6961bb00e2680a5735aab95de1 (patch) | |
| tree | 05443f6ba31ac17d54592e96317bca1166230dea /src/libsyntax/ast.rs | |
| parent | 91ae5e31ab57de15ef2855c700ad4b012ea00234 (diff) | |
| download | rust-29eb550ee6a9fd6961bb00e2680a5735aab95de1.tar.gz rust-29eb550ee6a9fd6961bb00e2680a5735aab95de1.zip | |
Get associated consts working in match patterns.
Diffstat (limited to 'src/libsyntax/ast.rs')
| -rw-r--r-- | src/libsyntax/ast.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs index 3f2e7c765a5..4307abe4174 100644 --- a/src/libsyntax/ast.rs +++ b/src/libsyntax/ast.rs @@ -599,6 +599,12 @@ pub enum Pat_ { /// "None" means a * pattern where we don't bind the fields to names. PatEnum(Path, Option<Vec<P<Pat>>>), + /// An associated const named using the qualified path `<T>::CONST` or + /// `<T as Trait>::CONST`. Associated consts from inherent impls can be + /// refered to as simply `T::CONST`, in which case they will end up as + /// PatEnum, and the resolver will have to sort that out. + PatQPath(QSelf, Path), + /// Destructuring of a struct, e.g. `Foo {x, y, ..}` /// The `bool` is `true` in the presence of a `..` PatStruct(Path, Vec<Spanned<FieldPat>>, bool), |
