Skip to content

Commit 5182c69

Browse files
committed
Auto merge of rust-lang#130767 - compiler-errors:rollup-rblilly, r=compiler-errors
Rollup of 8 pull requests Successful merges: - rust-lang#129545 (rustdoc: redesign toolbar and disclosure widgets) - rust-lang#130618 (Skip query in get_parent_item when possible.) - rust-lang#130727 (Check vtable projections for validity in miri) - rust-lang#130739 (Pass bootstrap cargo when `--stage 0` and `COMPILETEST_FORCE_STAGE0`) - rust-lang#130750 (Add new Tier-3 target: `loongarch64-unknown-linux-ohos`) - rust-lang#130758 (Revert "Add recursion limit to FFI safety lint") - rust-lang#130759 (Update books) - rust-lang#130762 (stabilize const_intrinsic_copy) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 35daf8b + 548f11a commit 5182c69

File tree

100 files changed

+853
-579
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+853
-579
lines changed

compiler/rustc_codegen_cranelift/src/constant.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -161,13 +161,13 @@ pub(crate) fn codegen_const_value<'tcx>(
161161
fx.module.declare_func_in_func(func_id, &mut fx.bcx.func);
162162
fx.bcx.ins().func_addr(fx.pointer_type, local_func_id)
163163
}
164-
GlobalAlloc::VTable(ty, trait_ref) => {
164+
GlobalAlloc::VTable(ty, dyn_ty) => {
165165
let data_id = data_id_for_vtable(
166166
fx.tcx,
167167
&mut fx.constants_cx,
168168
fx.module,
169169
ty,
170-
trait_ref,
170+
dyn_ty.principal(),
171171
);
172172
let local_data_id =
173173
fx.module.declare_data_in_func(data_id, &mut fx.bcx.func);
@@ -456,8 +456,8 @@ fn define_all_allocs(tcx: TyCtxt<'_>, module: &mut dyn Module, cx: &mut Constant
456456
GlobalAlloc::Memory(target_alloc) => {
457457
data_id_for_alloc_id(cx, module, alloc_id, target_alloc.inner().mutability)
458458
}
459-
GlobalAlloc::VTable(ty, trait_ref) => {
460-
data_id_for_vtable(tcx, cx, module, ty, trait_ref)
459+
GlobalAlloc::VTable(ty, dyn_ty) => {
460+
data_id_for_vtable(tcx, cx, module, ty, dyn_ty.principal())
461461
}
462462
GlobalAlloc::Static(def_id) => {
463463
if tcx.codegen_fn_attrs(def_id).flags.contains(CodegenFnAttrFlags::THREAD_LOCAL)

compiler/rustc_codegen_gcc/src/common.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -224,10 +224,10 @@ impl<'gcc, 'tcx> ConstCodegenMethods<'tcx> for CodegenCx<'gcc, 'tcx> {
224224
value
225225
}
226226
GlobalAlloc::Function { instance, .. } => self.get_fn_addr(instance),
227-
GlobalAlloc::VTable(ty, trait_ref) => {
227+
GlobalAlloc::VTable(ty, dyn_ty) => {
228228
let alloc = self
229229
.tcx
230-
.global_alloc(self.tcx.vtable_allocation((ty, trait_ref)))
230+
.global_alloc(self.tcx.vtable_allocation((ty, dyn_ty.principal())))
231231
.unwrap_memory();
232232
let init = const_alloc_to_gcc(self, alloc);
233233
self.static_addr_of(init, alloc.inner().align, None)

compiler/rustc_codegen_llvm/src/common.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -290,10 +290,10 @@ impl<'ll, 'tcx> ConstCodegenMethods<'tcx> for CodegenCx<'ll, 'tcx> {
290290
self.get_fn_addr(instance.polymorphize(self.tcx)),
291291
self.data_layout().instruction_address_space,
292292
),
293-
GlobalAlloc::VTable(ty, trait_ref) => {
293+
GlobalAlloc::VTable(ty, dyn_ty) => {
294294
let alloc = self
295295
.tcx
296-
.global_alloc(self.tcx.vtable_allocation((ty, trait_ref)))
296+
.global_alloc(self.tcx.vtable_allocation((ty, dyn_ty.principal())))
297297
.unwrap_memory();
298298
let init = const_alloc_to_llvm(self, alloc, /*static*/ false);
299299
let value = self.static_addr_of(init, alloc.inner().align, None);

compiler/rustc_const_eval/messages.ftl

+2-2
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ const_eval_invalid_vtable_pointer =
198198
using {$pointer} as vtable pointer but it does not point to a vtable
199199
200200
const_eval_invalid_vtable_trait =
201-
using vtable for trait `{$vtable_trait}` but trait `{$expected_trait}` was expected
201+
using vtable for `{$vtable_dyn_type}` but `{$expected_dyn_type}` was expected
202202
203203
const_eval_lazy_lock =
204204
consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
@@ -459,7 +459,7 @@ const_eval_validation_invalid_fn_ptr = {$front_matter}: encountered {$value}, bu
459459
const_eval_validation_invalid_ref_meta = {$front_matter}: encountered invalid reference metadata: total size is bigger than largest supported object
460460
const_eval_validation_invalid_ref_slice_meta = {$front_matter}: encountered invalid reference metadata: slice is bigger than largest supported object
461461
const_eval_validation_invalid_vtable_ptr = {$front_matter}: encountered {$value}, but expected a vtable pointer
462-
const_eval_validation_invalid_vtable_trait = {$front_matter}: wrong trait in wide pointer vtable: expected `{$ref_trait}`, but encountered `{$vtable_trait}`
462+
const_eval_validation_invalid_vtable_trait = {$front_matter}: wrong trait in wide pointer vtable: expected `{$expected_dyn_type}`, but encountered `{$vtable_dyn_type}`
463463
const_eval_validation_mutable_ref_to_immutable = {$front_matter}: encountered mutable reference or box pointing to read-only memory
464464
const_eval_validation_never_val = {$front_matter}: encountered a value of the never type `!`
465465
const_eval_validation_null_box = {$front_matter}: encountered a null box

compiler/rustc_const_eval/src/errors.rs

+6-12
Original file line numberDiff line numberDiff line change
@@ -522,12 +522,9 @@ impl<'a> ReportErrorExt for UndefinedBehaviorInfo<'a> {
522522
UnterminatedCString(ptr) | InvalidFunctionPointer(ptr) | InvalidVTablePointer(ptr) => {
523523
diag.arg("pointer", ptr);
524524
}
525-
InvalidVTableTrait { expected_trait, vtable_trait } => {
526-
diag.arg("expected_trait", expected_trait.to_string());
527-
diag.arg(
528-
"vtable_trait",
529-
vtable_trait.map(|t| t.to_string()).unwrap_or_else(|| format!("<trivial>")),
530-
);
525+
InvalidVTableTrait { expected_dyn_type, vtable_dyn_type } => {
526+
diag.arg("expected_dyn_type", expected_dyn_type.to_string());
527+
diag.arg("vtable_dyn_type", vtable_dyn_type.to_string());
531528
}
532529
PointerUseAfterFree(alloc_id, msg) => {
533530
diag.arg("alloc_id", alloc_id)
@@ -777,12 +774,9 @@ impl<'tcx> ReportErrorExt for ValidationErrorInfo<'tcx> {
777774
DanglingPtrNoProvenance { pointer, .. } => {
778775
err.arg("pointer", pointer);
779776
}
780-
InvalidMetaWrongTrait { expected_trait: ref_trait, vtable_trait } => {
781-
err.arg("ref_trait", ref_trait.to_string());
782-
err.arg(
783-
"vtable_trait",
784-
vtable_trait.map(|t| t.to_string()).unwrap_or_else(|| format!("<trivial>")),
785-
);
777+
InvalidMetaWrongTrait { vtable_dyn_type, expected_dyn_type } => {
778+
err.arg("vtable_dyn_type", vtable_dyn_type.to_string());
779+
err.arg("expected_dyn_type", expected_dyn_type.to_string());
786780
}
787781
NullPtr { .. }
788782
| ConstRefToMutable

compiler/rustc_const_eval/src/interpret/cast.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
128128
CastKind::DynStar => {
129129
if let ty::Dynamic(data, _, ty::DynStar) = cast_ty.kind() {
130130
// Initial cast from sized to dyn trait
131-
let vtable = self.get_vtable_ptr(src.layout.ty, data.principal())?;
131+
let vtable = self.get_vtable_ptr(src.layout.ty, data)?;
132132
let vtable = Scalar::from_maybe_pointer(vtable, self);
133133
let data = self.read_immediate(src)?.to_scalar();
134134
let _assert_pointer_like = data.to_pointer(self)?;
@@ -446,12 +446,12 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
446446
}
447447

448448
// Get the destination trait vtable and return that.
449-
let new_vptr = self.get_vtable_ptr(ty, data_b.principal())?;
449+
let new_vptr = self.get_vtable_ptr(ty, data_b)?;
450450
self.write_immediate(Immediate::new_dyn_trait(old_data, new_vptr, self), dest)
451451
}
452452
(_, &ty::Dynamic(data, _, ty::Dyn)) => {
453453
// Initial cast from sized to dyn trait
454-
let vtable = self.get_vtable_ptr(src_pointee_ty, data.principal())?;
454+
let vtable = self.get_vtable_ptr(src_pointee_ty, data)?;
455455
let ptr = self.read_pointer(src)?;
456456
let val = Immediate::new_dyn_trait(ptr, vtable, &*self.tcx);
457457
self.write_immediate(val, dest)

compiler/rustc_const_eval/src/interpret/memory.rs

+6-8
Original file line numberDiff line numberDiff line change
@@ -943,12 +943,13 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
943943
if offset.bytes() != 0 {
944944
throw_ub!(InvalidVTablePointer(Pointer::new(alloc_id, offset)))
945945
}
946-
let Some(GlobalAlloc::VTable(ty, vtable_trait)) = self.tcx.try_get_global_alloc(alloc_id)
946+
let Some(GlobalAlloc::VTable(ty, vtable_dyn_type)) =
947+
self.tcx.try_get_global_alloc(alloc_id)
947948
else {
948949
throw_ub!(InvalidVTablePointer(Pointer::new(alloc_id, offset)))
949950
};
950-
if let Some(expected_trait) = expected_trait {
951-
self.check_vtable_for_type(vtable_trait, expected_trait)?;
951+
if let Some(expected_dyn_type) = expected_trait {
952+
self.check_vtable_for_type(vtable_dyn_type, expected_dyn_type)?;
952953
}
953954
Ok(ty)
954955
}
@@ -1113,11 +1114,8 @@ impl<'a, 'tcx, M: Machine<'tcx>> std::fmt::Debug for DumpAllocs<'a, 'tcx, M> {
11131114
Some(GlobalAlloc::Function { instance, .. }) => {
11141115
write!(fmt, " (fn: {instance})")?;
11151116
}
1116-
Some(GlobalAlloc::VTable(ty, Some(trait_ref))) => {
1117-
write!(fmt, " (vtable: impl {trait_ref} for {ty})")?;
1118-
}
1119-
Some(GlobalAlloc::VTable(ty, None)) => {
1120-
write!(fmt, " (vtable: impl <auto trait> for {ty})")?;
1117+
Some(GlobalAlloc::VTable(ty, dyn_ty)) => {
1118+
write!(fmt, " (vtable: impl {dyn_ty} for {ty})")?;
11211119
}
11221120
Some(GlobalAlloc::Static(did)) => {
11231121
write!(fmt, " (static: {})", self.ecx.tcx.def_path_str(did))?;

compiler/rustc_const_eval/src/interpret/traits.rs

+47-20
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use rustc_middle::mir::interpret::{InterpResult, Pointer};
22
use rustc_middle::ty::layout::LayoutOf;
3-
use rustc_middle::ty::{self, Ty, TyCtxt, VtblEntry};
3+
use rustc_middle::ty::{self, ExistentialPredicateStableCmpExt, Ty, TyCtxt, VtblEntry};
44
use rustc_target::abi::{Align, Size};
55
use tracing::trace;
66

@@ -11,26 +11,25 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
1111
/// Creates a dynamic vtable for the given type and vtable origin. This is used only for
1212
/// objects.
1313
///
14-
/// The `trait_ref` encodes the erased self type. Hence, if we are making an object `Foo<Trait>`
15-
/// from a value of type `Foo<T>`, then `trait_ref` would map `T: Trait`. `None` here means that
16-
/// this is an auto trait without any methods, so we only need the basic vtable (drop, size,
17-
/// align).
14+
/// The `dyn_ty` encodes the erased self type. Hence, if we are making an object
15+
/// `Foo<dyn Trait<Assoc = A> + Send>` from a value of type `Foo<T>`, then `dyn_ty`
16+
/// would be `Trait<Assoc = A> + Send`. If this list doesn't have a principal trait ref,
17+
/// we only need the basic vtable prefix (drop, size, align).
1818
pub fn get_vtable_ptr(
1919
&self,
2020
ty: Ty<'tcx>,
21-
poly_trait_ref: Option<ty::PolyExistentialTraitRef<'tcx>>,
21+
dyn_ty: &'tcx ty::List<ty::PolyExistentialPredicate<'tcx>>,
2222
) -> InterpResult<'tcx, Pointer<Option<M::Provenance>>> {
23-
trace!("get_vtable(trait_ref={:?})", poly_trait_ref);
23+
trace!("get_vtable(ty={ty:?}, dyn_ty={dyn_ty:?})");
2424

25-
let (ty, poly_trait_ref) = self.tcx.erase_regions((ty, poly_trait_ref));
25+
let (ty, dyn_ty) = self.tcx.erase_regions((ty, dyn_ty));
2626

2727
// All vtables must be monomorphic, bail out otherwise.
2828
ensure_monomorphic_enough(*self.tcx, ty)?;
29-
ensure_monomorphic_enough(*self.tcx, poly_trait_ref)?;
29+
ensure_monomorphic_enough(*self.tcx, dyn_ty)?;
3030

3131
let salt = M::get_global_alloc_salt(self, None);
32-
let vtable_symbolic_allocation =
33-
self.tcx.reserve_and_set_vtable_alloc(ty, poly_trait_ref, salt);
32+
let vtable_symbolic_allocation = self.tcx.reserve_and_set_vtable_alloc(ty, dyn_ty, salt);
3433
let vtable_ptr = self.global_root_pointer(Pointer::from(vtable_symbolic_allocation))?;
3534
Ok(vtable_ptr.into())
3635
}
@@ -64,17 +63,45 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
6463
/// expected trait type.
6564
pub(super) fn check_vtable_for_type(
6665
&self,
67-
vtable_trait: Option<ty::PolyExistentialTraitRef<'tcx>>,
68-
expected_trait: &'tcx ty::List<ty::PolyExistentialPredicate<'tcx>>,
66+
vtable_dyn_type: &'tcx ty::List<ty::PolyExistentialPredicate<'tcx>>,
67+
expected_dyn_type: &'tcx ty::List<ty::PolyExistentialPredicate<'tcx>>,
6968
) -> InterpResult<'tcx> {
70-
let eq = match (expected_trait.principal(), vtable_trait) {
71-
(Some(a), Some(b)) => self.eq_in_param_env(a, b),
72-
(None, None) => true,
73-
_ => false,
74-
};
75-
if !eq {
76-
throw_ub!(InvalidVTableTrait { expected_trait, vtable_trait });
69+
// We check validity by comparing the lists of predicates for equality. We *could* instead
70+
// check that the dynamic type to which the vtable belongs satisfies all the expected
71+
// predicates, but that would likely be a lot slower and seems unnecessarily permissive.
72+
73+
// FIXME: we are skipping auto traits for now, but might revisit this in the future.
74+
let mut sorted_vtable: Vec<_> = vtable_dyn_type.without_auto_traits().collect();
75+
let mut sorted_expected: Vec<_> = expected_dyn_type.without_auto_traits().collect();
76+
// `skip_binder` here is okay because `stable_cmp` doesn't look at binders
77+
sorted_vtable.sort_by(|a, b| a.skip_binder().stable_cmp(*self.tcx, &b.skip_binder()));
78+
sorted_vtable.dedup();
79+
sorted_expected.sort_by(|a, b| a.skip_binder().stable_cmp(*self.tcx, &b.skip_binder()));
80+
sorted_expected.dedup();
81+
82+
if sorted_vtable.len() != sorted_expected.len() {
83+
throw_ub!(InvalidVTableTrait { vtable_dyn_type, expected_dyn_type });
84+
}
85+
86+
for (a_pred, b_pred) in std::iter::zip(sorted_vtable, sorted_expected) {
87+
let is_eq = match (a_pred.skip_binder(), b_pred.skip_binder()) {
88+
(
89+
ty::ExistentialPredicate::Trait(a_data),
90+
ty::ExistentialPredicate::Trait(b_data),
91+
) => self.eq_in_param_env(a_pred.rebind(a_data), b_pred.rebind(b_data)),
92+
93+
(
94+
ty::ExistentialPredicate::Projection(a_data),
95+
ty::ExistentialPredicate::Projection(b_data),
96+
) => self.eq_in_param_env(a_pred.rebind(a_data), b_pred.rebind(b_data)),
97+
98+
_ => false,
99+
};
100+
if !is_eq {
101+
throw_ub!(InvalidVTableTrait { vtable_dyn_type, expected_dyn_type });
102+
}
77103
}
104+
78105
Ok(())
79106
}
80107

compiler/rustc_const_eval/src/interpret/validity.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -452,8 +452,8 @@ impl<'rt, 'tcx, M: Machine<'tcx>> ValidityVisitor<'rt, 'tcx, M> {
452452
self.path,
453453
Ub(DanglingIntPointer{ .. } | InvalidVTablePointer(..)) =>
454454
InvalidVTablePtr { value: format!("{vtable}") },
455-
Ub(InvalidVTableTrait { expected_trait, vtable_trait }) => {
456-
InvalidMetaWrongTrait { expected_trait, vtable_trait: *vtable_trait }
455+
Ub(InvalidVTableTrait { vtable_dyn_type, expected_dyn_type }) => {
456+
InvalidMetaWrongTrait { vtable_dyn_type, expected_dyn_type }
457457
},
458458
);
459459
}
@@ -1281,8 +1281,8 @@ impl<'rt, 'tcx, M: Machine<'tcx>> ValueVisitor<'tcx, M> for ValidityVisitor<'rt,
12811281
self.path,
12821282
// It's not great to catch errors here, since we can't give a very good path,
12831283
// but it's better than ICEing.
1284-
Ub(InvalidVTableTrait { expected_trait, vtable_trait }) => {
1285-
InvalidMetaWrongTrait { expected_trait, vtable_trait: *vtable_trait }
1284+
Ub(InvalidVTableTrait { vtable_dyn_type, expected_dyn_type }) => {
1285+
InvalidMetaWrongTrait { vtable_dyn_type, expected_dyn_type: *expected_dyn_type }
12861286
},
12871287
);
12881288
}

compiler/rustc_lint/messages.ftl

-2
Original file line numberDiff line numberDiff line change
@@ -395,8 +395,6 @@ lint_improper_ctypes_opaque = opaque types have no C equivalent
395395
lint_improper_ctypes_pat_help = consider using the base type instead
396396
397397
lint_improper_ctypes_pat_reason = pattern types have no C equivalent
398-
399-
lint_improper_ctypes_recursion_limit_reached = type is infinitely recursive
400398
lint_improper_ctypes_slice_help = consider using a raw pointer instead
401399
402400
lint_improper_ctypes_slice_reason = slices have no C equivalent

compiler/rustc_lint/src/types.rs

+3-17
Original file line numberDiff line numberDiff line change
@@ -592,8 +592,6 @@ struct CTypesVisitorState<'tcx> {
592592
/// The original type being checked, before we recursed
593593
/// to any other types it contains.
594594
base_ty: Ty<'tcx>,
595-
/// Number of times we recursed while checking the type
596-
recursion_depth: usize,
597595
}
598596

599597
enum FfiResult<'tcx> {
@@ -899,23 +897,12 @@ impl<'a, 'tcx> ImproperCTypesVisitor<'a, 'tcx> {
899897

900898
// Protect against infinite recursion, for example
901899
// `struct S(*mut S);`.
900+
// FIXME: A recursion limit is necessary as well, for irregular
901+
// recursive types.
902902
if !acc.cache.insert(ty) {
903903
return FfiSafe;
904904
}
905905

906-
// Additional recursion check for more complex types like
907-
// `struct A<T> { v: *const A<A<T>>, ... }` for which the
908-
// cache check above won't be enough (fixes #130310)
909-
if !tcx.recursion_limit().value_within_limit(acc.recursion_depth) {
910-
return FfiUnsafe {
911-
ty: acc.base_ty,
912-
reason: fluent::lint_improper_ctypes_recursion_limit_reached,
913-
help: None,
914-
};
915-
}
916-
917-
acc.recursion_depth += 1;
918-
919906
match *ty.kind() {
920907
ty::Adt(def, args) => {
921908
if let Some(boxed) = ty.boxed_ty()
@@ -1261,8 +1248,7 @@ impl<'a, 'tcx> ImproperCTypesVisitor<'a, 'tcx> {
12611248
return;
12621249
}
12631250

1264-
let mut acc =
1265-
CTypesVisitorState { cache: FxHashSet::default(), base_ty: ty, recursion_depth: 0 };
1251+
let mut acc = CTypesVisitorState { cache: FxHashSet::default(), base_ty: ty };
12661252
match self.check_type_for_ffi(&mut acc, ty) {
12671253
FfiResult::FfiSafe => {}
12681254
FfiResult::FfiPhantom(ty) => {

compiler/rustc_middle/src/hir/map/mod.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,10 @@ impl<'hir> Map<'hir> {
598598
/// in the HIR which is recorded by the map and is an item, either an item
599599
/// in a module, trait, or impl.
600600
pub fn get_parent_item(self, hir_id: HirId) -> OwnerId {
601-
if let Some((def_id, _node)) = self.parent_owner_iter(hir_id).next() {
601+
if hir_id.local_id != ItemLocalId::ZERO {
602+
// If this is a child of a HIR owner, return the owner.
603+
hir_id.owner
604+
} else if let Some((def_id, _node)) = self.parent_owner_iter(hir_id).next() {
602605
def_id
603606
} else {
604607
CRATE_OWNER_ID

compiler/rustc_middle/src/mir/interpret/error.rs

+8-4
Original file line numberDiff line numberDiff line change
@@ -365,8 +365,10 @@ pub enum UndefinedBehaviorInfo<'tcx> {
365365
InvalidVTablePointer(Pointer<AllocId>),
366366
/// Using a vtable for the wrong trait.
367367
InvalidVTableTrait {
368-
expected_trait: &'tcx ty::List<ty::PolyExistentialPredicate<'tcx>>,
369-
vtable_trait: Option<ty::PolyExistentialTraitRef<'tcx>>,
368+
/// The vtable that was actually referenced by the wide pointer metadata.
369+
vtable_dyn_type: &'tcx ty::List<ty::PolyExistentialPredicate<'tcx>>,
370+
/// The vtable that was expected at the point in MIR that it was accessed.
371+
expected_dyn_type: &'tcx ty::List<ty::PolyExistentialPredicate<'tcx>>,
370372
},
371373
/// Using a string that is not valid UTF-8,
372374
InvalidStr(std::str::Utf8Error),
@@ -479,8 +481,10 @@ pub enum ValidationErrorKind<'tcx> {
479481
value: String,
480482
},
481483
InvalidMetaWrongTrait {
482-
expected_trait: &'tcx ty::List<ty::PolyExistentialPredicate<'tcx>>,
483-
vtable_trait: Option<ty::PolyExistentialTraitRef<'tcx>>,
484+
/// The vtable that was actually referenced by the wide pointer metadata.
485+
vtable_dyn_type: &'tcx ty::List<ty::PolyExistentialPredicate<'tcx>>,
486+
/// The vtable that was expected at the point in MIR that it was accessed.
487+
expected_dyn_type: &'tcx ty::List<ty::PolyExistentialPredicate<'tcx>>,
484488
},
485489
InvalidMetaSliceTooLarge {
486490
ptr_kind: PointerKind,

0 commit comments

Comments
 (0)