Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions compiler/rustc_borrowck/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1913,7 +1913,7 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, '_, 'tcx> {
));
return;
}
ty::Adt(adt, _) => {
ty::Adt(adt, _) | ty::View(adt, _, _) | ty::ViewInfer(adt, _, _) => {
if !adt.is_box() {
bug!("Adt should be a box type when Place is deref");
}
Expand Down Expand Up @@ -1948,7 +1948,7 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, '_, 'tcx> {
}
},
ProjectionElem::Field(_, _) => match place_ty.ty.kind() {
ty::Adt(adt, _) => {
ty::Adt(adt, _) | ty::View(adt, _, _) | ty::ViewInfer(adt, _, _) => {
if adt.has_dtor(tcx) {
self.move_errors.push(MoveError::new(
place,
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ pub(crate) fn spanned_type_di_node<'ll, 'tcx>(
// Some `Box` are newtyped pointers, make debuginfo aware of that.
// Only works if the allocator argument is a 1-ZST and hence irrelevant for layout
// (or if there is no allocator argument).
ty::Adt(def, args)
ty::Adt(def, args) | ty::View(def, args, _) | ty::ViewInfer(def, args, _)
if def.is_box()
&& args.get(1).is_none_or(|arg| cx.layout_of(arg.expect_ty()).is_1zst()) =>
{
Expand All @@ -484,7 +484,7 @@ pub(crate) fn spanned_type_di_node<'ll, 'tcx>(
ty::Closure(..) => build_closure_env_di_node(cx, unique_type_id),
ty::CoroutineClosure(..) => build_closure_env_di_node(cx, unique_type_id),
ty::Coroutine(..) => enums::build_coroutine_di_node(cx, unique_type_id),
ty::Adt(def, ..) => match def.adt_kind() {
ty::Adt(def, ..) | ty::View(def, ..) | ty::ViewInfer(def, ..) => match def.adt_kind() {
AdtKind::Struct => build_struct_type_di_node(cx, unique_type_id, span),
AdtKind::Union => build_union_type_di_node(cx, unique_type_id, span),
AdtKind::Enum => enums::build_enum_type_di_node(cx, unique_type_id, span),
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ fn push_debuginfo_type_name<'tcx>(
ty::Uint(uint_ty) => output.push_str(uint_ty.name_str()),
ty::Float(float_ty) => output.push_str(float_ty.name_str()),
ty::Foreign(def_id) => push_item_name(tcx, def_id, qualified, output),
ty::Adt(def, args) => {
ty::Adt(def, args) | ty::View(def, args, _) | ty::ViewInfer(def, args, _) => {
// `layout_for_cpp_like_fallback` will be `Some` if we want to use the fallback encoding.
let layout_for_cpp_like_fallback = if cpp_like_debuginfo && def.is_enum() {
match tcx.layout_of(ty::TypingEnv::fully_monomorphized().as_query_input(t)) {
Expand Down
4 changes: 3 additions & 1 deletion compiler/rustc_const_eval/src/const_eval/type_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@ impl<'tcx> InterpCx<'tcx, CompileTimeMachine<'tcx>> {

variant
}
ty::Adt(adt_def, generics) => {
ty::Adt(adt_def, generics)
| ty::View(adt_def, generics, _)
| ty::ViewInfer(adt_def, generics, _) => {
self.write_adt_type_info(&field_dest, (ty, *adt_def), generics)?
}
ty::Bool => {
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_const_eval/src/const_eval/valtrees.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ fn const_to_valtree_inner<'tcx>(
branches(ecx, place, elem_tys.len(), None, num_nodes, visited, settled)
}

ty::Adt(def, _) => {
ty::Adt(def, _) | ty::View(def, _, _) | ty::ViewInfer(def, _, _) => {
if def.is_union() {
Err(ValTreeCreationError::NonSupportedType(ty))
} else if def.variants().is_empty() {
Expand Down Expand Up @@ -326,7 +326,7 @@ pub fn valtree_to_const_value<'tcx>(
);
op_to_const(&ecx, &imm.into(), /* for diagnostics */ false)
}
ty::Tuple(_) | ty::Array(_, _) | ty::Adt(..) => {
ty::Tuple(_) | ty::Array(_, _) | ty::Adt(..) | ty::View(..) | ty::ViewInfer(..) => {
let layout = tcx.layout_of(typing_env.as_query_input(cv.ty)).unwrap();
if layout.is_zst() {
// Fast path to avoid some allocations.
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_const_eval/src/interpret/intrinsics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
};
let val = match ty.kind() {
// Correctly handles non-monomorphic calls, so there is no need for ensure_monomorphic_enough.
ty::Adt(adt, _) => {
ty::Adt(adt, _) | ty::View(adt, _, _) | ty::ViewInfer(adt, _, _) => {
ConstValue::from_target_usize(adt.variants().len() as u64, &tcx)
}
ty::Alias(..) | ty::Param(_) | ty::Placeholder(_) | ty::Infer(_) => {
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_const_eval/src/interpret/stack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
ty::Pat(ty, ..) => is_very_trivially_sized(*ty),

// We don't want to do any queries, so there is not much we can do with ADTs.
ty::Adt(..) => false,
ty::Adt(..) | ty::View(..) | ty::ViewInfer(..) => false,

ty::UnsafeBinder(ty) => is_very_trivially_sized(ty.skip_binder()),

Expand Down
4 changes: 3 additions & 1 deletion compiler/rustc_const_eval/src/interpret/validity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -959,7 +959,9 @@ impl<'rt, 'tcx, M: Machine<'tcx>> ValidityVisitor<'rt, 'tcx, M> {
| ty::Closure(..)
| ty::Pat(..)
| ty::CoroutineClosure(..)
| ty::Coroutine(..) => interp_ok(false),
| ty::Coroutine(..)
| ty::View(..)
| ty::ViewInfer(..) => interp_ok(false),
// Some types only occur during typechecking, they have no layout.
// We should not see them here and we could not check them anyway.
ty::Error(_)
Expand Down
8 changes: 7 additions & 1 deletion compiler/rustc_const_eval/src/util/type_name.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,13 @@ impl<'tcx> Printer<'tcx> for TypeNamePrinter<'tcx> {
)
| ty::Closure(def_id, args)
| ty::CoroutineClosure(def_id, args)
| ty::Coroutine(def_id, args) => self.print_def_path(def_id, args),
| ty::Coroutine(def_id, args)
| ty::View(ty::AdtDef(Interned(&ty::AdtDefData { did: def_id, .. }, _)), args, _)
| ty::ViewInfer(
ty::AdtDef(Interned(&ty::AdtDefData { did: def_id, .. }, _)),
args,
_,
) => self.print_def_path(def_id, args),
ty::Foreign(def_id) => self.print_def_path(def_id, &[]),

ty::FnDef(def_id, args) => self.print_def_path(def_id, args.no_bound_vars().unwrap()),
Expand Down
4 changes: 3 additions & 1 deletion compiler/rustc_hir_analysis/src/coherence/inherent_impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,9 @@ impl<'tcx> InherentCollect<'tcx> {
self_ty = base;
}
match *self_ty.kind() {
ty::Adt(def, _) => self.check_def_id(id, self_ty, def.did()),
ty::Adt(def, _) | ty::View(def, _, _) | ty::ViewInfer(def, _, _) => {
self.check_def_id(id, self_ty, def.did())
}
ty::Foreign(did) => self.check_def_id(id, self_ty, did),
ty::Dynamic(data, ..) if data.principal_def_id().is_some() => {
self.check_def_id(id, self_ty, data.principal_def_id().unwrap())
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_hir_analysis/src/coherence/orphan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ pub(crate) fn orphan_check_impl(
let (local_impl, nonlocal_impl) = match self_ty.kind() {
// struct Struct<T>;
// impl AutoTrait for Struct<Foo> {}
ty::Adt(self_def, _) => (
ty::Adt(self_def, _) | ty::View(self_def, _, _) | ty::ViewInfer(self_def, _, _) => (
LocalImpl::Allow,
if self_def.did().is_local() {
NonlocalImpl::Allow
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3474,7 +3474,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
let dcx = self.dcx();
let tcx = self.tcx();
match ty.kind() {
ty::Adt(def, _) => {
ty::Adt(def, _) | ty::View(def, _, _) | ty::ViewInfer(def, _, _) => {
let base_did = def.did();
let kind_name = tcx.def_descr(base_did);
let (variant_idx, variant) = if def.is_enum() {
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_hir_analysis/src/variance/constraints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ impl<'a, 'tcx> ConstraintContext<'a, 'tcx> {
}
}

ty::Adt(def, args) => {
ty::Adt(def, args) | ty::View(def, args, _) | ty::ViewInfer(def, args, _) => {
self.add_constraints_from_args(current, def.did(), args, variance);
}

Expand Down
18 changes: 12 additions & 6 deletions compiler/rustc_hir_typeck/src/cast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,17 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
Ok(match *t.kind() {
ty::Slice(_) | ty::Str => Some(PointerKind::Length),
ty::Dynamic(tty, _) => Some(PointerKind::VTable(tty)),
ty::Adt(def, args) if def.is_struct() => match def.non_enum_variant().tail_opt() {
None => Some(PointerKind::Thin),
Some(f) => {
let field_ty = self.field_ty(span, f, args);
self.pointer_kind(field_ty, span)?
ty::Adt(def, args) | ty::View(def, args, _) | ty::ViewInfer(def, args, _)
if def.is_struct() =>
{
match def.non_enum_variant().tail_opt() {
None => Some(PointerKind::Thin),
Some(f) => {
let field_ty = self.field_ty(span, f, args);
self.pointer_kind(field_ty, span)?
}
}
},
}
ty::Tuple(fields) => match fields.last() {
None => Some(PointerKind::Thin),
Some(&f) => self.pointer_kind(f, span)?,
Expand Down Expand Up @@ -144,6 +148,8 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
| ty::CoroutineClosure(..)
| ty::Coroutine(..)
| ty::Adt(..)
| ty::View(..)
| ty::ViewInfer(..)
| ty::Never
| ty::Error(_) => {
let guar = self
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_hir_typeck/src/method/probe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -878,7 +878,7 @@ impl<'a, 'tcx> ProbeContext<'a, 'tcx> {
self.assemble_inherent_impl_candidates_for_type(p.def_id(), receiver_steps);
self.assemble_inherent_candidates_for_incoherent_ty(raw_self_ty, receiver_steps);
}
ty::Adt(def, _) => {
ty::Adt(def, _) | ty::View(def, _, _) | ty::ViewInfer(def, _, _) => {
let def_id = def.did();
self.assemble_inherent_impl_candidates_for_type(def_id, receiver_steps);
self.assemble_inherent_candidates_for_incoherent_ty(raw_self_ty, receiver_steps);
Expand Down
4 changes: 3 additions & 1 deletion compiler/rustc_infer/src/infer/canonical/canonicalizer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,9 @@ impl<'cx, 'tcx> TypeFolder<TyCtxt<'tcx>> for Canonicalizer<'cx, 'tcx> {
| ty::Alias(..)
| ty::Foreign(..)
| ty::Pat(..)
| ty::Param(..) => {
| ty::Param(..)
| ty::View(..)
| ty::ViewInfer(..) => {
if t.flags().intersects(self.needs_canonical_flags) {
t.super_fold_with(self)
} else {
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_lint/src/types/improper_ctypes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@ impl<'a, 'tcx> ImproperCTypesVisitor<'a, 'tcx> {
}

match *ty.kind() {
ty::Adt(def, args) => {
ty::Adt(def, args) | ty::View(def, args, _) | ty::ViewInfer(def, args, _) => {
if let Some(inner_ty) = ty.boxed_ty() {
return self.visit_indirection(state, ty, inner_ty, IndirectionKind::Box);
}
Expand Down
4 changes: 3 additions & 1 deletion compiler/rustc_middle/src/query/keys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,9 @@ impl<'tcx> QueryKey for (ty::Instance<'tcx>, CollectionMode) {
/// deeply nested tuples that have no DefId.
fn def_id_of_type_cached<'a>(ty: Ty<'a>, visited: &mut SsoHashSet<Ty<'a>>) -> Option<DefId> {
match *ty.kind() {
ty::Adt(adt_def, _) => Some(adt_def.did()),
ty::Adt(adt_def, _) | ty::View(adt_def, _, _) | ty::ViewInfer(adt_def, _, _) => {
Some(adt_def.did())
}

ty::Dynamic(data, ..) => data.principal_def_id(),

Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_middle/src/ty/codec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,7 @@ impl_decodable_via_ref! {
&'tcx ty::List<ty::Pattern<'tcx>>,
&'tcx ty::ListWithCachedTypeInfo<ty::Clause<'tcx>>,
&'tcx ty::List<Const<'tcx>>,
&'tcx ty::List<FieldIdx>,
}

#[macro_export]
Expand Down
4 changes: 3 additions & 1 deletion compiler/rustc_middle/src/ty/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1831,7 +1831,9 @@ impl<'tcx> TyCtxt<'tcx> {
Infer,
Alias,
Pat,
Foreign
Foreign,
View,
ViewInfer
)?;

writeln!(fmt, "GenericArgs interner: #{}", self.interners.args.len())?;
Expand Down
5 changes: 5 additions & 0 deletions compiler/rustc_middle/src/ty/context/impl_interner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
use std::ops::ControlFlow;
use std::{debug_assert_matches, fmt};

use rustc_abi::FieldIdx;
use rustc_errors::ErrorGuaranteed;
use rustc_hir as hir;
use rustc_hir::def::{CtorKind, DefKind};
Expand Down Expand Up @@ -107,6 +108,8 @@ impl<'tcx> Interner for TyCtxt<'tcx> {
type Pat = Pattern<'tcx>;
type PatList = &'tcx List<Pattern<'tcx>>;
type Safety = hir::Safety;
type FieldSet = &'tcx List<Self::Field>;
type Field = FieldIdx;
type Const = ty::Const<'tcx>;
type Consts = &'tcx List<Self::Const>;

Expand Down Expand Up @@ -589,6 +592,8 @@ impl<'tcx> Interner for TyCtxt<'tcx> {
| ty::Coroutine(_, _)
| ty::Never
| ty::Tuple(_)
| ty::View(_, _, _)
| ty::ViewInfer(_, _, _)
| ty::UnsafeBinder(_) => {
if let Some(simp) = ty::fast_reject::simplify_type(
tcx,
Expand Down
3 changes: 2 additions & 1 deletion compiler/rustc_middle/src/ty/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,8 @@ impl<'tcx> Ty<'tcx> {
| ty::Str
| ty::Never => "type".into(),
ty::Tuple(tys) if tys.is_empty() => "unit type".into(),
ty::Adt(def, _) => def.descr().into(),
// FIXME(view_types): we can probably do better than that.
ty::Adt(def, _) | ty::View(def, _, _) | ty::ViewInfer(def, _, _) => def.descr().into(),
ty::Foreign(_) => "extern type".into(),
ty::Array(..) => "array".into(),
ty::Pat(..) => "pattern type".into(),
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_middle/src/ty/layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -986,7 +986,7 @@ where
ty::Tuple(tys) => TyMaybeWithLayout::Ty(tys[i]),

// ADTs.
ty::Adt(def, args) => {
ty::Adt(def, args) | ty::View(def, args, _) | ty::ViewInfer(def, args, _) => {
match this.variants {
Variants::Single { index } => {
let field = &def.variant(index).fields[FieldIdx::from_usize(i)];
Expand Down
10 changes: 7 additions & 3 deletions compiler/rustc_middle/src/ty/offload_meta.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,13 @@ impl MappingFlags {
}

// FIXME: This should not treat aliases this way.
ty::Adt(_, _) | ty::Tuple(_) | ty::Array(_, _) | ty::Alias(_, _) | ty::Param(_) => {
MappingFlags::TO
}
ty::Adt(_, _)
| ty::Tuple(_)
| ty::Array(_, _)
| ty::Alias(_, _)
| ty::Param(_)
| ty::View(_, _, _)
| ty::ViewInfer(_, _, _) => MappingFlags::TO,

ty::RawPtr(_, Not) | ty::Ref(_, _, Not) => MappingFlags::TO,

Expand Down
4 changes: 3 additions & 1 deletion compiler/rustc_middle/src/ty/print/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,9 @@ fn characteristic_def_id_of_type_cached<'a>(
visited: &mut SsoHashSet<Ty<'a>>,
) -> Option<DefId> {
match *ty.kind() {
ty::Adt(adt_def, _) => Some(adt_def.did()),
ty::Adt(adt_def, _) | ty::View(adt_def, _, _) | ty::ViewInfer(adt_def, _, _) => {
Some(adt_def.did())
}

ty::Dynamic(data, ..) => data.principal_def_id(),

Expand Down
26 changes: 25 additions & 1 deletion compiler/rustc_middle/src/ty/print/pretty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::fmt::{self, Write as _};
use std::iter;
use std::ops::{Deref, DerefMut};

use rustc_abi::{ExternAbi, Size};
use rustc_abi::{ExternAbi, FIRST_VARIANT, Size};
use rustc_apfloat::Float;
use rustc_apfloat::ieee::{Double, Half, Quad, Single};
use rustc_data_structures::fx::{FxIndexMap, IndexEntry};
Expand Down Expand Up @@ -721,6 +721,30 @@ pub trait PrettyPrinter<'tcx>: Printer<'tcx> + fmt::Write {
ty.print(self)?;
write!(self, ") is {pat:?}")?;
}
ty::View(adt_def, args, fields) => {
self.print_def_path(adt_def.did(), args)?;
write!(self, ".{{")?;
if !fields.is_empty() {
write!(self, " ")?;
let struct_fields = &adt_def.variant(FIRST_VARIANT).fields;
let mut first = false;
for field in fields {
if !first {
write!(self, ", ")?;
} else {
first = false;
}
let ident = struct_fields[field].ident(self.tcx());
write!(self, "{ident}")?;
}
write!(self, " ")?;
}
write!(self, "}}")?;
}
ty::ViewInfer(adt_def, args, fields) => {
self.print_def_path(adt_def.did(), args)?;
write!(self, ".{{ {fields:?} }}")?;
}
ty::RawPtr(ty, mutbl) => {
write!(self, "*{} ", mutbl.ptr_str())?;
ty.print(self)?;
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_middle/src/ty/significant_drop_order.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ pub fn ty_dtor_span<'tcx>(tcx: TyCtxt<'tcx>, ty: Ty<'tcx>) -> Option<Span> {
| ty::Array(_, _)
| ty::UnsafeBinder(_) => None,

ty::Adt(adt_def, _) => {
ty::Adt(adt_def, _) | ty::View(adt_def, _, _) | ty::ViewInfer(adt_def, _, _) => {
if let Some(dtor) = tcx.adt_destructor(adt_def.did()) {
Some(tcx.def_span(tcx.parent(dtor.did)))
} else {
Expand Down
8 changes: 8 additions & 0 deletions compiler/rustc_middle/src/ty/structural_impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,10 @@ impl<'tcx> TypeSuperFoldable<TyCtxt<'tcx>> for Ty<'tcx> {
ty::Array(typ, sz) => ty::Array(typ.try_fold_with(folder)?, sz.try_fold_with(folder)?),
ty::Slice(typ) => ty::Slice(typ.try_fold_with(folder)?),
ty::Adt(tid, args) => ty::Adt(tid, args.try_fold_with(folder)?),
ty::View(tid, args, fields) => ty::View(tid, args.try_fold_with(folder)?, fields),
ty::ViewInfer(tid, args, fields) => {
ty::ViewInfer(tid, args.try_fold_with(folder)?, fields)
}
ty::Dynamic(trait_ty, region) => {
ty::Dynamic(trait_ty.try_fold_with(folder)?, region.try_fold_with(folder)?)
}
Expand Down Expand Up @@ -399,6 +403,8 @@ impl<'tcx> TypeSuperFoldable<TyCtxt<'tcx>> for Ty<'tcx> {
ty::Array(typ, sz) => ty::Array(typ.fold_with(folder), sz.fold_with(folder)),
ty::Slice(typ) => ty::Slice(typ.fold_with(folder)),
ty::Adt(tid, args) => ty::Adt(tid, args.fold_with(folder)),
ty::View(tid, args, fields) => ty::View(tid, args.fold_with(folder), fields),
ty::ViewInfer(tid, args, fields) => ty::ViewInfer(tid, args.fold_with(folder), fields),
ty::Dynamic(trait_ty, region) => {
ty::Dynamic(trait_ty.fold_with(folder), region.fold_with(folder))
}
Expand Down Expand Up @@ -443,6 +449,8 @@ impl<'tcx> TypeSuperVisitable<TyCtxt<'tcx>> for Ty<'tcx> {
}
ty::Slice(typ) => typ.visit_with(visitor),
ty::Adt(_, args) => args.visit_with(visitor),
ty::View(_, args, _) => args.visit_with(visitor),
ty::ViewInfer(_, args, _) => args.visit_with(visitor),
ty::Dynamic(trait_ty, reg) => {
try_visit!(trait_ty.visit_with(visitor));
reg.visit_with(visitor)
Expand Down
Loading
Loading