diff options
| author | F001 <changchun.fan@qq.com> | 2018-08-30 12:18:11 +0800 |
|---|---|---|
| committer | F001 <changchun.fan@qq.com> | 2018-08-30 12:18:11 +0800 |
| commit | 7a083ca25f14833d704d2efba5ca9b431f6c65ad (patch) | |
| tree | 18316f05e3f40a5e45df0da4561021ef131a0092 /src/librustc_resolve | |
| parent | 70c33bb8e2649a019e48515128a0b447dfe66f6b (diff) | |
| download | rust-7a083ca25f14833d704d2efba5ca9b431f6c65ad.tar.gz rust-7a083ca25f14833d704d2efba5ca9b431f6c65ad.zip | |
introduce Guard enum
Diffstat (limited to 'src/librustc_resolve')
| -rw-r--r-- | src/librustc_resolve/lib.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/librustc_resolve/lib.rs b/src/librustc_resolve/lib.rs index 71a7fde2029..96df0cbfc07 100644 --- a/src/librustc_resolve/lib.rs +++ b/src/librustc_resolve/lib.rs @@ -2691,7 +2691,10 @@ impl<'a, 'crateloader: 'a> Resolver<'a, 'crateloader> { // This has to happen *after* we determine which pat_idents are variants self.check_consistent_bindings(&arm.pats); - walk_list!(self, visit_expr, &arm.guard); + match arm.guard { + Some(ast::Guard::If(ref expr)) => self.visit_expr(expr), + _ => {} + } self.visit_expr(&arm.body); self.ribs[ValueNS].pop(); |
