diff --git a/compiler/rustc_codegen_cranelift/src/constant.rs b/compiler/rustc_codegen_cranelift/src/constant.rs index b5a143485893..94a2fb2fbddc 100644 --- a/compiler/rustc_codegen_cranelift/src/constant.rs +++ b/compiler/rustc_codegen_cranelift/src/constant.rs @@ -369,7 +369,6 @@ fn define_all_allocs(tcx: TyCtxt<'_>, module: &mut dyn Module, cx: &mut Constant while let Some(todo_item) = cx.todo.pop() { let (data_id, alloc, section_name) = match todo_item { TodoItem::Alloc(alloc_id) => { - //println!("alloc_id {}", alloc_id); let alloc = match tcx.global_alloc(alloc_id) { GlobalAlloc::Memory(alloc) => alloc, GlobalAlloc::Function(_) | GlobalAlloc::Static(_) | GlobalAlloc::VTable(..) => { diff --git a/compiler/rustc_codegen_ssa/src/mir/intrinsic.rs b/compiler/rustc_codegen_ssa/src/mir/intrinsic.rs index 0a8bd9148231..94ac71a4dd26 100644 --- a/compiler/rustc_codegen_ssa/src/mir/intrinsic.rs +++ b/compiler/rustc_codegen_ssa/src/mir/intrinsic.rs @@ -9,7 +9,10 @@ use crate::MemFlags; use rustc_middle::ty::{self, Ty, TyCtxt}; use rustc_span::{sym, Span}; -use rustc_target::abi::{WrappingRange, call::{FnAbi, PassMode}}; +use rustc_target::abi::{ + call::{FnAbi, PassMode}, + WrappingRange, +}; fn copy_intrinsic<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>( bx: &mut Bx, diff --git a/compiler/rustc_middle/src/mir/interpret/mod.rs b/compiler/rustc_middle/src/mir/interpret/mod.rs index 7ef4dfe7c0dd..967f8ece16cf 100644 --- a/compiler/rustc_middle/src/mir/interpret/mod.rs +++ b/compiler/rustc_middle/src/mir/interpret/mod.rs @@ -366,7 +366,7 @@ impl<'s> AllocDecodingSession<'s> { } AllocDiscriminant::VTable => { assert!(alloc_id.is_none()); - trace!("creating static alloc ID"); + trace!("creating vtable alloc ID"); let ty = as Decodable>::decode(decoder); let poly_trait_ref = > as Decodable>::decode(decoder); diff --git a/compiler/rustc_monomorphize/src/collector.rs b/compiler/rustc_monomorphize/src/collector.rs index 86331056d444..68b65658c72b 100644 --- a/compiler/rustc_monomorphize/src/collector.rs +++ b/compiler/rustc_monomorphize/src/collector.rs @@ -1428,9 +1428,6 @@ fn collect_miri<'tcx>(tcx: TyCtxt<'tcx>, alloc_id: AllocId, output: &mut MonoIte } } GlobalAlloc::VTable(ty, trait_ref) => { - // FIXME(RJ) no ideas if this is correct. There is this nice - // `create_mono_items_for_vtable_methods` method but I wouldn't know how to call it from - // here. So instead we just generate the actual vtable and recurse. let alloc_id = tcx.vtable_allocation((ty, trait_ref)); collect_miri(tcx, alloc_id, output) } diff --git a/library/core/src/ptr/metadata.rs b/library/core/src/ptr/metadata.rs index 2becaa833625..cd5edee0460a 100644 --- a/library/core/src/ptr/metadata.rs +++ b/library/core/src/ptr/metadata.rs @@ -185,8 +185,7 @@ extern "C" { /// Opaque type for accessing vtables. /// /// Private implementation detail of `DynMetadata::size_of` etc. - /// Must be zero-sized since there is conceptually not actually any Abstract Machine memory behind this pointer. - /// However, we can require pointer alignment. + /// There is conceptually not actually any Abstract Machine memory behind this pointer. type VTable; }