Skip to content

Commit d3c4142

Browse files
MaikKleinarielb1
authored andcommitted
Fix some comments to refer to MonoItem
1 parent c06e3aa commit d3c4142

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/librustc_mir/monomorphize/collector.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,7 @@ fn create_fn_trans_item<'a, 'tcx>(instance: Instance<'tcx>) -> MonoItem<'tcx> {
842842
MonoItem::Fn(instance)
843843
}
844844

845-
/// Creates a `TransItem` for each method that is referenced by the vtable for
845+
/// Creates a `MonoItem` for each method that is referenced by the vtable for
846846
/// the given trait/impl pair.
847847
fn create_mono_items_for_vtable_methods<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
848848
trait_ty: Ty<'tcx>,

src/librustc_mir/monomorphize/item.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ pub fn linkage_by_name(name: &str) -> Option<Linkage> {
5858
/// Describes how a translation item will be instantiated in object files.
5959
#[derive(PartialEq, Eq, Clone, Copy, Debug, Hash)]
6060
pub enum InstantiationMode {
61-
/// There will be exactly one instance of the given TransItem. It will have
61+
/// There will be exactly one instance of the given MonoItem. It will have
6262
/// external linkage so that it can be linked to from other codegen units.
6363
GloballyShared {
6464
/// In some compilation scenarios we may decide to take functions that
@@ -75,7 +75,7 @@ pub enum InstantiationMode {
7575
may_conflict: bool,
7676
},
7777

78-
/// Each codegen unit containing a reference to the given TransItem will
78+
/// Each codegen unit containing a reference to the given MonoItem will
7979
/// have its own private copy of the function (with internal linkage).
8080
LocalCopy,
8181
}
@@ -229,7 +229,7 @@ impl<'a, 'tcx> MonoItemExt<'a, 'tcx> for MonoItem<'tcx> {
229229
}
230230

231231
//=-----------------------------------------------------------------------------
232-
// TransItem String Keys
232+
// MonoItem String Keys
233233
//=-----------------------------------------------------------------------------
234234

235235
// The code below allows for producing a unique string key for a trans item.

0 commit comments

Comments
 (0)