Get associated consts working in match patterns.

This commit is contained in:
Sean Patrick Santos
2015-03-25 10:53:28 -06:00
parent 91ae5e31ab
commit 29eb550ee6
25 changed files with 611 additions and 199 deletions

View File

@@ -1134,6 +1134,10 @@ pub fn noop_fold_pat<T: Folder>(p: P<Pat>, folder: &mut T) -> P<Pat> {
PatEnum(folder.fold_path(pth),
pats.map(|pats| pats.move_map(|x| folder.fold_pat(x))))
}
PatQPath(qself, pth) => {
let qself = QSelf {ty: folder.fold_ty(qself.ty), .. qself};
PatQPath(qself, folder.fold_path(pth))
}
PatStruct(pth, fields, etc) => {
let pth = folder.fold_path(pth);
let fs = fields.move_map(|f| {