Use ty::OpaqueTy everywhere
This commit is contained in:
parent
918ede6474
commit
7f3af72606
55 changed files with 156 additions and 118 deletions
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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),
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue