@@ -1229,16 +1229,15 @@ fn resolve_type(path: Path, tpbs: Option<Vec<TyParamBound> >,
1229
1229
core:: NotTyped ( _) => return Bool
1230
1230
} ;
1231
1231
debug!( "searching for { : ?} in defmap", id) ;
1232
- let def_map = tycx. def_map. borrow( ) ;
1233
- let d = match def_map. get( ) . find( & id) {
1234
- Some ( k) => k,
1232
+ let d = match tycx. def_map. borrow( ) . find( & id) {
1233
+ Some ( & k) => k,
1235
1234
None => {
1236
1235
debug!( "could not find { : ?} in defmap ( `{ } `) ", id, tycx. map. node_to_str( id) ) ;
1237
1236
fail!( "Unexpected failure: unresolved id not in defmap ( this is a bug!) ")
1238
1237
}
1239
1238
} ;
1240
1239
1241
- let ( def_id, kind) = match * d {
1240
+ let ( def_id, kind) = match d {
1242
1241
ast:: DefFn ( i, _) => ( i, TypeFunction ) ,
1243
1242
ast:: DefSelfTy ( i) => return Self ( i) ,
1244
1243
ast:: DefTy ( i) => ( i, TypeEnum ) ,
@@ -1285,8 +1284,7 @@ fn resolve_def(id: ast::NodeId) -> Option<ast::DefId> {
1285
1284
let cx = local_data:: get( super :: ctxtkey, |x| * x. unwrap( ) ) ;
1286
1285
match cx. maybe_typed {
1287
1286
core:: Typed ( ref tcx) => {
1288
- let def_map = tcx. def_map. borrow( ) ;
1289
- def_map. get( ) . find( & id) . map( |& d| ast_util:: def_id_of_def( d) )
1287
+ tcx. def_map. borrow( ) . find( & id) . map( |& d| ast_util:: def_id_of_def( d) )
1290
1288
}
1291
1289
core:: NotTyped ( _) => None
1292
1290
}
0 commit comments