@@ -12,7 +12,7 @@ use std::cmp::PartialOrd;
12
12
use std:: hash:: { Hash , Hasher } ;
13
13
use std:: mem;
14
14
use std:: rc:: Rc ;
15
- use syntax:: ast:: { FloatTy , LitKind , StrStyle , NodeId } ;
15
+ use syntax:: ast:: { FloatTy , LitKind , StrStyle } ;
16
16
use syntax:: ptr:: P ;
17
17
18
18
#[ derive( Debug , Copy , Clone ) ]
@@ -249,7 +249,7 @@ impl<'c, 'cc> ConstEvalLateContext<'c, 'cc> {
249
249
/// simple constant folding: Insert an expression, get a constant or none.
250
250
fn expr ( & mut self , e : & Expr ) -> Option < Constant > {
251
251
match e. node {
252
- ExprPath ( ref qpath) => self . fetch_path ( qpath, e. id ) ,
252
+ ExprPath ( ref qpath) => self . fetch_path ( qpath, e. hir_id ) ,
253
253
ExprBlock ( ref block) => self . block ( block) ,
254
254
ExprIf ( ref cond, ref then, ref otherwise) => self . ifthenelse ( cond, then, otherwise) ,
255
255
ExprLit ( ref lit) => Some ( lit_to_constant ( & lit. node , self . tcx , self . tables . expr_ty ( e) ) ) ,
@@ -284,7 +284,7 @@ impl<'c, 'cc> ConstEvalLateContext<'c, 'cc> {
284
284
}
285
285
286
286
/// lookup a possibly constant expression from a ExprPath
287
- fn fetch_path ( & mut self , qpath : & QPath , id : NodeId ) -> Option < Constant > {
287
+ fn fetch_path ( & mut self , qpath : & QPath , id : HirId ) -> Option < Constant > {
288
288
let def = self . tables . qpath_def ( qpath, id) ;
289
289
match def {
290
290
Def :: Const ( def_id) |
0 commit comments