mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 16:24:46 +00:00
Comments should start capitalized and end in a period
This commit is contained in:
parent
41d58185dd
commit
8a88ff1006
@ -187,15 +187,15 @@ impl<'rt, 'mir, 'tcx, M: CompileTimeMachine<'mir, 'tcx>> ValueVisitor<'mir, 'tcx
|
||||
if let ty::Ref(_, referenced_ty, mutability) = ty.kind {
|
||||
let value = self.ecx.read_immediate(mplace.into())?;
|
||||
let mplace = self.ecx.ref_to_mplace(value)?;
|
||||
// Handle trait object vtables
|
||||
// Handle trait object vtables.
|
||||
if let ty::Dynamic(..) =
|
||||
self.ecx.tcx.struct_tail_erasing_lifetimes(referenced_ty, self.ecx.param_env).kind
|
||||
{
|
||||
// Validation has already errored on an invalid vtable pointer so we can safely not
|
||||
// do anything if this is not a real pointer
|
||||
// do anything if this is not a real pointer.
|
||||
if let Scalar::Ptr(vtable) = mplace.meta.unwrap() {
|
||||
// explitly choose `Immutable` here, since vtables are immutable, even
|
||||
// if the reference of the fat pointer is mutable
|
||||
// Explitly choose `Immutable` here, since vtables are immutable, even
|
||||
// if the reference of the fat pointer is mutable.
|
||||
self.intern_shallow(vtable.alloc_id, Mutability::Not, None)?;
|
||||
} else {
|
||||
self.ecx().tcx.sess.delay_span_bug(
|
||||
|
Loading…
Reference in New Issue
Block a user