File tree Expand file tree Collapse file tree 3 files changed +7
-5
lines changed
rustc_mir/src/borrow_check Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 2
2
3
3
use crate :: mir:: { abstract_const, Body , Promoted } ;
4
4
use crate :: ty:: { self , Ty , TyCtxt } ;
5
- use rustc_data_structures:: fx:: FxHashMap ;
6
5
use rustc_data_structures:: sync:: Lrc ;
6
+ use rustc_data_structures:: vec_map:: VecMap ;
7
7
use rustc_errors:: ErrorReported ;
8
8
use rustc_hir as hir;
9
9
use rustc_hir:: def_id:: { DefId , LocalDefId } ;
@@ -210,7 +210,7 @@ pub struct BorrowCheckResult<'tcx> {
210
210
/// All the opaque types that are restricted to concrete types
211
211
/// by this function. Unlike the value in `TypeckResults`, this has
212
212
/// unerased regions.
213
- pub concrete_opaque_types : FxHashMap < DefId , ty:: ResolvedOpaqueTy < ' tcx > > ,
213
+ pub concrete_opaque_types : VecMap < DefId , ty:: ResolvedOpaqueTy < ' tcx > > ,
214
214
pub closure_requirements : Option < ClosureRegionRequirements < ' tcx > > ,
215
215
pub used_mut_upvars : SmallVec < [ Field ; 8 ] > ,
216
216
}
Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ use rustc_data_structures::sharded::{IntoPointer, ShardedHashMap};
34
34
use rustc_data_structures:: stable_hasher:: { HashStable , StableHasher } ;
35
35
use rustc_data_structures:: steal:: Steal ;
36
36
use rustc_data_structures:: sync:: { self , Lock , Lrc , WorkerLocal } ;
37
+ use rustc_data_structures:: vec_map:: VecMap ;
37
38
use rustc_errors:: ErrorReported ;
38
39
use rustc_hir as hir;
39
40
use rustc_hir:: def:: { DefKind , Res } ;
@@ -424,7 +425,7 @@ pub struct TypeckResults<'tcx> {
424
425
425
426
/// All the opaque types that are restricted to concrete types
426
427
/// by this function.
427
- pub concrete_opaque_types : FxHashMap < DefId , ResolvedOpaqueTy < ' tcx > > ,
428
+ pub concrete_opaque_types : VecMap < DefId , ResolvedOpaqueTy < ' tcx > > ,
428
429
429
430
/// Tracks the minimum captures required for a closure;
430
431
/// see `MinCaptureInformationMap` for more details.
Original file line number Diff line number Diff line change 2
2
3
3
use rustc_data_structures:: fx:: { FxHashMap , FxHashSet } ;
4
4
use rustc_data_structures:: graph:: dominators:: Dominators ;
5
+ use rustc_data_structures:: vec_map:: VecMap ;
5
6
use rustc_errors:: { Applicability , Diagnostic , DiagnosticBuilder , ErrorReported } ;
6
7
use rustc_hir as hir;
7
8
use rustc_hir:: def_id:: LocalDefId ;
@@ -25,7 +26,7 @@ use either::Either;
25
26
use smallvec:: SmallVec ;
26
27
use std:: cell:: RefCell ;
27
28
use std:: collections:: BTreeMap ;
28
- use std:: iter;
29
+ use std:: iter:: { self , FromIterator } ;
29
30
use std:: mem;
30
31
use std:: rc:: Rc ;
31
32
@@ -441,7 +442,7 @@ fn do_mir_borrowck<'a, 'tcx>(
441
442
}
442
443
443
444
let result = BorrowCheckResult {
444
- concrete_opaque_types : opaque_type_values,
445
+ concrete_opaque_types : VecMap :: from_iter ( opaque_type_values. into_iter ( ) ) ,
445
446
closure_requirements : opt_closure_req,
446
447
used_mut_upvars : mbcx. used_mut_upvars ,
447
448
} ;
You can’t perform that action at this time.
0 commit comments