diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2012-07-10 12:29:30 -0700 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2012-07-10 12:30:02 -0700 |
| commit | a6ee46db0be868730bd9a9129f54210343ff408e (patch) | |
| tree | c0e4191e521011d26e107f5c6087490bdf3848a2 /src/rustc | |
| parent | 71fd542f260f3398ee5c4967b481222e2e66021a (diff) | |
| download | rust-a6ee46db0be868730bd9a9129f54210343ff408e.tar.gz rust-a6ee46db0be868730bd9a9129f54210343ff408e.zip | |
rustc: Resolve expressions in literal and range patterns
Diffstat (limited to 'src/rustc')
| -rw-r--r-- | src/rustc/middle/resolve3.rs | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/rustc/middle/resolve3.rs b/src/rustc/middle/resolve3.rs index 6c29ef759ca..3ea829fe9ef 100644 --- a/src/rustc/middle/resolve3.rs +++ b/src/rustc/middle/resolve3.rs @@ -17,7 +17,8 @@ import syntax::ast::{ident, trait_ref, impure_fn, instance_var, item}; import syntax::ast::{item_class, item_const, item_enum, item_fn, item_mac}; import syntax::ast::{item_foreign_mod, item_trait, item_impl, item_mod}; import syntax::ast::{item_ty, local, local_crate, method, node_id, pat}; -import syntax::ast::{pat_enum, pat_ident, path, prim_ty, stmt_decl, ty}; +import syntax::ast::{pat_enum, pat_ident, pat_lit, pat_range, path, prim_ty}; +import syntax::ast::{stmt_decl, ty}; import syntax::ast::{ty_bool, ty_char, ty_constr, ty_f, ty_f32, ty_f64}; import syntax::ast::{ty_float, ty_i, ty_i16, ty_i32, ty_i64, ty_i8, ty_int}; import syntax::ast::{ty_param, ty_path, ty_str, ty_u, ty_u16, ty_u32, ty_u64}; @@ -3640,6 +3641,15 @@ class Resolver { } } + pat_lit(expr) { + self.resolve_expr(expr, visitor); + } + + pat_range(first_expr, last_expr) { + self.resolve_expr(first_expr, visitor); + self.resolve_expr(last_expr, visitor); + } + _ { // Nothing to do. } |
