Skip to content

Commit 0318f07

Browse files
committed
various nits from review
1 parent 9cbd106 commit 0318f07

File tree

5 files changed

+6
-8
lines changed

5 files changed

+6
-8
lines changed

compiler/rustc_codegen_cranelift/src/constant.rs

-1
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,6 @@ fn define_all_allocs(tcx: TyCtxt<'_>, module: &mut dyn Module, cx: &mut Constant
369369
while let Some(todo_item) = cx.todo.pop() {
370370
let (data_id, alloc, section_name) = match todo_item {
371371
TodoItem::Alloc(alloc_id) => {
372-
//println!("alloc_id {}", alloc_id);
373372
let alloc = match tcx.global_alloc(alloc_id) {
374373
GlobalAlloc::Memory(alloc) => alloc,
375374
GlobalAlloc::Function(_) | GlobalAlloc::Static(_) | GlobalAlloc::VTable(..) => {

compiler/rustc_codegen_ssa/src/mir/intrinsic.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ use crate::MemFlags;
99

1010
use rustc_middle::ty::{self, Ty, TyCtxt};
1111
use rustc_span::{sym, Span};
12-
use rustc_target::abi::{WrappingRange, call::{FnAbi, PassMode}};
12+
use rustc_target::abi::{
13+
call::{FnAbi, PassMode},
14+
WrappingRange,
15+
};
1316

1417
fn copy_intrinsic<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>(
1518
bx: &mut Bx,

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ impl<'s> AllocDecodingSession<'s> {
366366
}
367367
AllocDiscriminant::VTable => {
368368
assert!(alloc_id.is_none());
369-
trace!("creating static alloc ID");
369+
trace!("creating vtable alloc ID");
370370
let ty = <Ty<'_> as Decodable<D>>::decode(decoder);
371371
let poly_trait_ref =
372372
<Option<ty::PolyExistentialTraitRef<'_>> as Decodable<D>>::decode(decoder);

compiler/rustc_monomorphize/src/collector.rs

-3
Original file line numberDiff line numberDiff line change
@@ -1428,9 +1428,6 @@ fn collect_miri<'tcx>(tcx: TyCtxt<'tcx>, alloc_id: AllocId, output: &mut MonoIte
14281428
}
14291429
}
14301430
GlobalAlloc::VTable(ty, trait_ref) => {
1431-
// FIXME(RJ) no ideas if this is correct. There is this nice
1432-
// `create_mono_items_for_vtable_methods` method but I wouldn't know how to call it from
1433-
// here. So instead we just generate the actual vtable and recurse.
14341431
let alloc_id = tcx.vtable_allocation((ty, trait_ref));
14351432
collect_miri(tcx, alloc_id, output)
14361433
}

library/core/src/ptr/metadata.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,7 @@ extern "C" {
185185
/// Opaque type for accessing vtables.
186186
///
187187
/// Private implementation detail of `DynMetadata::size_of` etc.
188-
/// Must be zero-sized since there is conceptually not actually any Abstract Machine memory behind this pointer.
189-
/// However, we can require pointer alignment.
188+
/// There is conceptually not actually any Abstract Machine memory behind this pointer.
190189
type VTable;
191190
}
192191

0 commit comments

Comments
 (0)