6 use rustc_data_structures::sync::Lrc;
7 use rustc_hir::def_id::DefId;
10 /// Requires that `region` must be equal to one of the regions in `choice_regions`.
11 /// We often denote this using the syntax:
14 /// R0 member of [O1..On]
16 #[derive(Debug, Clone, HashStable, TypeFoldable, Lift)]
17 pub struct MemberConstraint<'tcx> {
18 /// The `DefId` of the opaque type causing this constraint: used for error reporting.
19 pub opaque_type_def_id: DefId,
21 /// The span where the hidden type was instantiated.
22 pub definition_span: Span,
24 /// The hidden type in which `member_region` appears: used for error reporting.
25 pub hidden_ty: Ty<'tcx>,
28 pub member_region: Region<'tcx>,
30 /// The options `O1..On`.
31 pub choice_regions: Lrc<Vec<Region<'tcx>>>,