@@ -1229,16 +1229,15 @@ fn resolve_type(path: Path, tpbs: Option<Vec<TyParamBound> >,
12291229 core:: NotTyped ( _) => return Bool
12301230 } ;
12311231 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,
12351234 None => {
12361235 debug!( "could not find { : ?} in defmap ( `{ } `) ", id, tycx. map. node_to_str( id) ) ;
12371236 fail!( "Unexpected failure: unresolved id not in defmap ( this is a bug!) ")
12381237 }
12391238 } ;
12401239
1241- let ( def_id, kind) = match * d {
1240+ let ( def_id, kind) = match d {
12421241 ast:: DefFn ( i, _) => ( i, TypeFunction ) ,
12431242 ast:: DefSelfTy ( i) => return Self ( i) ,
12441243 ast:: DefTy ( i) => ( i, TypeEnum ) ,
@@ -1285,8 +1284,7 @@ fn resolve_def(id: ast::NodeId) -> Option<ast::DefId> {
12851284 let cx = local_data:: get( super :: ctxtkey, |x| * x. unwrap( ) ) ;
12861285 match cx. maybe_typed {
12871286 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) )
12901288 }
12911289 core:: NotTyped ( _) => None
12921290 }
0 commit comments