diff options
| author | Michael Goulet <michael@errs.io> | 2022-11-26 21:09:39 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2022-12-13 17:29:26 +0000 |
| commit | 7f3af726065d9eaabf93d87f22d97f60cca7a5f1 (patch) | |
| tree | d3501a3fc742f5e786697c99c7e230a497551e1a /compiler/rustc_hir_analysis/src | |
| parent | 918ede64740b3610dfd8b43ff0d995261a236ac5 (diff) | |
| download | rust-7f3af726065d9eaabf93d87f22d97f60cca7a5f1.tar.gz rust-7f3af726065d9eaabf93d87f22d97f60cca7a5f1.zip | |
Use ty::OpaqueTy everywhere
Diffstat (limited to 'compiler/rustc_hir_analysis/src')
| -rw-r--r-- | compiler/rustc_hir_analysis/src/check/check.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_hir_analysis/src/collect/type_of.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_hir_analysis/src/variance/constraints.rs | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_hir_analysis/src/check/check.rs b/compiler/rustc_hir_analysis/src/check/check.rs index fc0ca62090d..c696f93897c 100644 --- a/compiler/rustc_hir_analysis/src/check/check.rs +++ b/compiler/rustc_hir_analysis/src/check/check.rs @@ -1440,7 +1440,7 @@ fn opaque_type_cycle_error(tcx: TyCtxt<'_>, def_id: LocalDefId, span: Span) -> E impl<'tcx> ty::visit::TypeVisitor<'tcx> for OpaqueTypeCollector { fn visit_ty(&mut self, t: Ty<'tcx>) -> ControlFlow<Self::BreakTy> { match *t.kind() { - ty::Opaque(def, _) => { + ty::Opaque(ty::OpaqueTy { def_id: def, substs: _ }) => { self.0.push(def); ControlFlow::CONTINUE } diff --git a/compiler/rustc_hir_analysis/src/collect/type_of.rs b/compiler/rustc_hir_analysis/src/collect/type_of.rs index 9bd1715ce39..f838ec7025f 100644 --- a/compiler/rustc_hir_analysis/src/collect/type_of.rs +++ b/compiler/rustc_hir_analysis/src/collect/type_of.rs @@ -666,7 +666,7 @@ fn find_opaque_ty_constraints_for_tait(tcx: TyCtxt<'_>, def_id: LocalDefId) -> T let hir_id = tcx.hir().local_def_id_to_hir_id(def_id); let scope = tcx.hir().get_defining_scope(hir_id); - let mut locator = ConstraintLocator { def_id: def_id, tcx, found: None, typeck_types: vec![] }; + let mut locator = ConstraintLocator { def_id, tcx, found: None, typeck_types: vec![] }; debug!(?scope); @@ -803,7 +803,7 @@ fn find_opaque_ty_constraints_for_rpit( if let Some(concrete) = concrete { let scope = tcx.hir().local_def_id_to_hir_id(owner_def_id); debug!(?scope); - let mut locator = ConstraintChecker { def_id: def_id, tcx, found: concrete }; + let mut locator = ConstraintChecker { def_id, tcx, found: concrete }; match tcx.hir().get(scope) { Node::Item(it) => intravisit::walk_item(&mut locator, it), diff --git a/compiler/rustc_hir_analysis/src/variance/constraints.rs b/compiler/rustc_hir_analysis/src/variance/constraints.rs index 6ce0c18bf45..31806ff6766 100644 --- a/compiler/rustc_hir_analysis/src/variance/constraints.rs +++ b/compiler/rustc_hir_analysis/src/variance/constraints.rs @@ -253,7 +253,7 @@ impl<'a, 'tcx> ConstraintContext<'a, 'tcx> { self.add_constraints_from_invariant_substs(current, data.substs, variance); } - ty::Opaque(_, substs) => { + ty::Opaque(ty::OpaqueTy { def_id: _, substs }) => { self.add_constraints_from_invariant_substs(current, substs, variance); } |
