Report opaque type mismatches directly during borrowck of the function instead of within the type_of
query.
This allows us to only store a single hidden type per opaque type instead of having to store one per set of substitutions.
This commit is contained in:
parent
ed6c958ee4
commit
25876b3541
4 changed files with 30 additions and 19 deletions
|
@ -9,7 +9,6 @@ use rustc_hir as hir;
|
|||
use rustc_hir::def_id::{DefId, LocalDefId};
|
||||
use rustc_index::bit_set::BitMatrix;
|
||||
use rustc_index::vec::IndexVec;
|
||||
use rustc_middle::ty::OpaqueTypeKey;
|
||||
use rustc_span::Span;
|
||||
use rustc_target::abi::VariantIdx;
|
||||
use smallvec::SmallVec;
|
||||
|
@ -242,7 +241,7 @@ pub struct BorrowCheckResult<'tcx> {
|
|||
/// All the opaque types that are restricted to concrete types
|
||||
/// by this function. Unlike the value in `TypeckResults`, this has
|
||||
/// unerased regions.
|
||||
pub concrete_opaque_types: VecMap<OpaqueTypeKey<'tcx>, OpaqueHiddenType<'tcx>>,
|
||||
pub concrete_opaque_types: VecMap<DefId, OpaqueHiddenType<'tcx>>,
|
||||
pub closure_requirements: Option<ClosureRegionRequirements<'tcx>>,
|
||||
pub used_mut_upvars: SmallVec<[Field; 8]>,
|
||||
pub tainted_by_errors: Option<ErrorGuaranteed>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue