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 22
33use crate :: mir:: { abstract_const, Body , Promoted } ;
44use crate :: ty:: { self , Ty , TyCtxt } ;
5- use rustc_data_structures:: fx:: FxHashMap ;
65use rustc_data_structures:: sync:: Lrc ;
6+ use rustc_data_structures:: vec_map:: VecMap ;
77use rustc_errors:: ErrorReported ;
88use rustc_hir as hir;
99use rustc_hir:: def_id:: { DefId , LocalDefId } ;
@@ -210,7 +210,7 @@ pub struct BorrowCheckResult<'tcx> {
210210 /// All the opaque types that are restricted to concrete types
211211 /// by this function. Unlike the value in `TypeckResults`, this has
212212 /// unerased regions.
213- pub concrete_opaque_types : FxHashMap < DefId , ty:: ResolvedOpaqueTy < ' tcx > > ,
213+ pub concrete_opaque_types : VecMap < DefId , ty:: ResolvedOpaqueTy < ' tcx > > ,
214214 pub closure_requirements : Option < ClosureRegionRequirements < ' tcx > > ,
215215 pub used_mut_upvars : SmallVec < [ Field ; 8 ] > ,
216216}
Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ use rustc_data_structures::sharded::{IntoPointer, ShardedHashMap};
3434use rustc_data_structures:: stable_hasher:: { HashStable , StableHasher } ;
3535use rustc_data_structures:: steal:: Steal ;
3636use rustc_data_structures:: sync:: { self , Lock , Lrc , WorkerLocal } ;
37+ use rustc_data_structures:: vec_map:: VecMap ;
3738use rustc_errors:: ErrorReported ;
3839use rustc_hir as hir;
3940use rustc_hir:: def:: { DefKind , Res } ;
@@ -424,7 +425,7 @@ pub struct TypeckResults<'tcx> {
424425
425426 /// All the opaque types that are restricted to concrete types
426427 /// by this function.
427- pub concrete_opaque_types : FxHashMap < DefId , ResolvedOpaqueTy < ' tcx > > ,
428+ pub concrete_opaque_types : VecMap < DefId , ResolvedOpaqueTy < ' tcx > > ,
428429
429430 /// Tracks the minimum captures required for a closure;
430431 /// see `MinCaptureInformationMap` for more details.
Original file line number Diff line number Diff line change 22
33use rustc_data_structures:: fx:: { FxHashMap , FxHashSet } ;
44use rustc_data_structures:: graph:: dominators:: Dominators ;
5+ use rustc_data_structures:: vec_map:: VecMap ;
56use rustc_errors:: { Applicability , Diagnostic , DiagnosticBuilder , ErrorReported } ;
67use rustc_hir as hir;
78use rustc_hir:: def_id:: LocalDefId ;
@@ -25,7 +26,7 @@ use either::Either;
2526use smallvec:: SmallVec ;
2627use std:: cell:: RefCell ;
2728use std:: collections:: BTreeMap ;
28- use std:: iter;
29+ use std:: iter:: { self , FromIterator } ;
2930use std:: mem;
3031use std:: rc:: Rc ;
3132
@@ -441,7 +442,7 @@ fn do_mir_borrowck<'a, 'tcx>(
441442 }
442443
443444 let result = BorrowCheckResult {
444- concrete_opaque_types : opaque_type_values,
445+ concrete_opaque_types : VecMap :: from_iter ( opaque_type_values. into_iter ( ) ) ,
445446 closure_requirements : opt_closure_req,
446447 used_mut_upvars : mbcx. used_mut_upvars ,
447448 } ;
You can’t perform that action at this time.
0 commit comments