s/abstract_type_generics/opaque_type_generics/
This commit is contained in:
parent
6234aed6c7
commit
0c8ebea227
@ -333,7 +333,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
|
|||||||
|
|
||||||
debug!("constrain_opaque_type: concrete_ty={:?}", concrete_ty);
|
debug!("constrain_opaque_type: concrete_ty={:?}", concrete_ty);
|
||||||
|
|
||||||
let abstract_type_generics = tcx.generics_of(def_id);
|
let opaque_type_generics = tcx.generics_of(def_id);
|
||||||
|
|
||||||
let span = tcx.def_span(def_id);
|
let span = tcx.def_span(def_id);
|
||||||
|
|
||||||
@ -365,7 +365,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
|
|||||||
// `['a]` for the first impl trait and `'b` for the
|
// `['a]` for the first impl trait and `'b` for the
|
||||||
// second.
|
// second.
|
||||||
let mut least_region = None;
|
let mut least_region = None;
|
||||||
for param in &abstract_type_generics.params {
|
for param in &opaque_type_generics.params {
|
||||||
match param.kind {
|
match param.kind {
|
||||||
GenericParamDefKind::Lifetime => {}
|
GenericParamDefKind::Lifetime => {}
|
||||||
_ => continue,
|
_ => continue,
|
||||||
@ -396,7 +396,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
|
|||||||
// regions that appear in the impl trait.
|
// regions that appear in the impl trait.
|
||||||
return self.generate_member_constraint(
|
return self.generate_member_constraint(
|
||||||
concrete_ty,
|
concrete_ty,
|
||||||
abstract_type_generics,
|
opaque_type_generics,
|
||||||
opaque_defn,
|
opaque_defn,
|
||||||
def_id,
|
def_id,
|
||||||
lr,
|
lr,
|
||||||
@ -427,7 +427,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
|
|||||||
fn generate_member_constraint(
|
fn generate_member_constraint(
|
||||||
&self,
|
&self,
|
||||||
concrete_ty: Ty<'tcx>,
|
concrete_ty: Ty<'tcx>,
|
||||||
abstract_type_generics: &ty::Generics,
|
opaque_type_generics: &ty::Generics,
|
||||||
opaque_defn: &OpaqueTypeDecl<'tcx>,
|
opaque_defn: &OpaqueTypeDecl<'tcx>,
|
||||||
opaque_type_def_id: DefId,
|
opaque_type_def_id: DefId,
|
||||||
conflict1: ty::Region<'tcx>,
|
conflict1: ty::Region<'tcx>,
|
||||||
@ -447,7 +447,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
|
|||||||
// type can be equal to any of the region parameters of the
|
// type can be equal to any of the region parameters of the
|
||||||
// opaque type definition.
|
// opaque type definition.
|
||||||
let choice_regions: Lrc<Vec<ty::Region<'tcx>>> = Lrc::new(
|
let choice_regions: Lrc<Vec<ty::Region<'tcx>>> = Lrc::new(
|
||||||
abstract_type_generics
|
opaque_type_generics
|
||||||
.params
|
.params
|
||||||
.iter()
|
.iter()
|
||||||
.filter(|param| match param.kind {
|
.filter(|param| match param.kind {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user