mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-02 11:44:28 +00:00
rustc: Fold over the paths in tag patterns so that we can resolve type variables in them
This commit is contained in:
parent
5b7c3b8b5d
commit
e64085b0a2
@ -452,11 +452,14 @@ fn fold_pat[ENV](&ENV env, ast_fold[ENV] fld, @ast.pat p) -> @ast.pat {
|
||||
ret fld.fold_pat_bind(env_, p.span, id, did, t);
|
||||
}
|
||||
case (ast.pat_tag(?path, ?pats, ?d, ?t)) {
|
||||
auto ppath = fold_path(env, fld, path);
|
||||
|
||||
let vec[@ast.pat] ppats = vec();
|
||||
for (@ast.pat pat in pats) {
|
||||
ppats += vec(fold_pat(env_, fld, pat));
|
||||
}
|
||||
ret fld.fold_pat_tag(env_, p.span, path, ppats, d, t);
|
||||
|
||||
ret fld.fold_pat_tag(env_, p.span, ppath, ppats, d, t);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user