]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc/middle/ty/mod.rs
fallout from removing hir::ExprRange
[rust.git] / src / librustc / middle / ty / mod.rs
index 0fd443239f8b578c2503a9d11a44004ac721a854..84b57585c6fab73ba73b435ace98c30f3deb5093 100644 (file)
@@ -52,7 +52,7 @@
 use syntax::parse::token::InternedString;
 
 use rustc_front::hir;
-use rustc_front::hir::{ItemImpl, ItemTrait};
+use rustc_front::hir::{ItemImpl, ItemTrait, PatKind};
 use rustc_front::intravisit::Visitor;
 
 pub use self::sty::{Binder, DebruijnIndex};
@@ -1945,7 +1945,7 @@ pub fn local_var_name_str(&self, id: NodeId) -> InternedString {
         match self.map.find(id) {
             Some(ast_map::NodeLocal(pat)) => {
                 match pat.node {
-                    hir::PatIdent(_, ref path1, _) => path1.node.name.as_str(),
+                    PatKind::Ident(_, ref path1, _) => path1.node.name.as_str(),
                     _ => {
                         self.sess.bug(&format!("Variable id {} maps to {:?}, not local", id, pat));
                     },
@@ -2002,7 +2002,6 @@ pub fn expr_is_lval(&self, expr: &hir::Expr) -> bool {
             hir::ExprCall(..) |
             hir::ExprMethodCall(..) |
             hir::ExprStruct(..) |
-            hir::ExprRange(..) |
             hir::ExprTup(..) |
             hir::ExprIf(..) |
             hir::ExprMatch(..) |