From 29eb550ee6a9fd6961bb00e2680a5735aab95de1 Mon Sep 17 00:00:00 2001 From: Sean Patrick Santos Date: Wed, 25 Mar 2015 10:53:28 -0600 Subject: Get associated consts working in match patterns. --- src/libsyntax/ast.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/libsyntax/ast.rs') 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>>), + /// An associated const named using the qualified path `::CONST` or + /// `::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>, bool), -- cgit 1.4.1-3-g733a5