From d3c4142880e525e7e222edf4f2707e1a72087f9b Mon Sep 17 00:00:00 2001 From: Maik Klein Date: Fri, 27 Oct 2017 10:55:31 +0200 Subject: [PATCH] Fix some comments to refer to `MonoItem` --- src/librustc_mir/monomorphize/collector.rs | 2 +- src/librustc_mir/monomorphize/item.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/librustc_mir/monomorphize/collector.rs b/src/librustc_mir/monomorphize/collector.rs index 18dd19b4d9e..d6321c7577c 100644 --- a/src/librustc_mir/monomorphize/collector.rs +++ b/src/librustc_mir/monomorphize/collector.rs @@ -842,7 +842,7 @@ fn create_fn_trans_item<'a, 'tcx>(instance: Instance<'tcx>) -> MonoItem<'tcx> { MonoItem::Fn(instance) } -/// Creates a `TransItem` for each method that is referenced by the vtable for +/// Creates a `MonoItem` for each method that is referenced by the vtable for /// the given trait/impl pair. fn create_mono_items_for_vtable_methods<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, trait_ty: Ty<'tcx>, diff --git a/src/librustc_mir/monomorphize/item.rs b/src/librustc_mir/monomorphize/item.rs index ddc1becfd7c..a81808d8afc 100644 --- a/src/librustc_mir/monomorphize/item.rs +++ b/src/librustc_mir/monomorphize/item.rs @@ -58,7 +58,7 @@ pub fn linkage_by_name(name: &str) -> Option { /// Describes how a translation item will be instantiated in object files. #[derive(PartialEq, Eq, Clone, Copy, Debug, Hash)] pub enum InstantiationMode { - /// There will be exactly one instance of the given TransItem. It will have + /// There will be exactly one instance of the given MonoItem. It will have /// external linkage so that it can be linked to from other codegen units. GloballyShared { /// In some compilation scenarios we may decide to take functions that @@ -75,7 +75,7 @@ pub enum InstantiationMode { may_conflict: bool, }, - /// Each codegen unit containing a reference to the given TransItem will + /// Each codegen unit containing a reference to the given MonoItem will /// have its own private copy of the function (with internal linkage). LocalCopy, } @@ -229,7 +229,7 @@ impl<'a, 'tcx> MonoItemExt<'a, 'tcx> for MonoItem<'tcx> { } //=----------------------------------------------------------------------------- -// TransItem String Keys +// MonoItem String Keys //=----------------------------------------------------------------------------- // The code below allows for producing a unique string key for a trans item.