File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: 2361b655261ad48d0eefdaf706ecac6af819e9ad
2
+ refs/heads/master: 9ab9bd9cc2dc97c2acc26849dd24b8989b76ea32
Original file line number Diff line number Diff line change @@ -2484,17 +2484,17 @@ fn lookup_item_type(session.session sess,
2484
2484
if ( did. _0 == sess. get_targ_crate_num( ) ) {
2485
2485
// The item is in this crate. The caller should have added it to the
2486
2486
// type cache already; we simply return it.
2487
- check ( cache. contains_key( did) ) ;
2488
2487
ret cache. get( did) ;
2489
2488
}
2490
2489
2491
- if ( cache. contains_key( did) ) {
2492
- ret cache. get( did) ;
2490
+ alt ( cache. find( did) ) {
2491
+ case ( some[ ty_param_count_and_ty] ( ?tpt) ) { ret tpt; }
2492
+ case ( none[ ty_param_count_and_ty] ) {
2493
+ auto tyt = creader. get_type( sess, tystore, did) ;
2494
+ cache. insert( did, tyt) ;
2495
+ ret tyt;
2496
+ }
2493
2497
}
2494
-
2495
- auto tyt = creader. get_type( sess, tystore, did) ;
2496
- cache. insert( did, tyt) ;
2497
- ret tyt;
2498
2498
}
2499
2499
2500
2500
You can’t perform that action at this time.
0 commit comments