Skip to content

Commit

Permalink
Remove in_band_lifetimes for rustc_monomorphize
Browse files Browse the repository at this point in the history
  • Loading branch information
pitaj committed Dec 14, 2021
1 parent 8f117a7 commit f0b7142
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
6 changes: 3 additions & 3 deletions compiler/rustc_monomorphize/src/collector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ fn record_accesses<'a, 'tcx: 'a>(
/// the user's terminal with thousands of lines of type-name.
///
/// If the type name is longer than before+after, it will be written to a file.
fn shrunk_instance_name(
fn shrunk_instance_name<'tcx>(
tcx: TyCtxt<'tcx>,
instance: &Instance<'tcx>,
before: usize,
Expand Down Expand Up @@ -1145,7 +1145,7 @@ struct RootCollector<'a, 'tcx> {
entry_fn: Option<(DefId, EntryFnType)>,
}

impl ItemLikeVisitor<'v> for RootCollector<'_, 'v> {
impl<'v> ItemLikeVisitor<'v> for RootCollector<'_, 'v> {
fn visit_item(&mut self, item: &'v hir::Item<'v>) {
match item.kind {
hir::ItemKind::ExternCrate(..)
Expand Down Expand Up @@ -1225,7 +1225,7 @@ impl ItemLikeVisitor<'v> for RootCollector<'_, 'v> {
fn visit_foreign_item(&mut self, _foreign_item: &'v hir::ForeignItem<'v>) {}
}

impl RootCollector<'_, 'v> {
impl<'v> RootCollector<'_, 'v> {
fn is_root(&self, def_id: LocalDefId) -> bool {
!item_requires_monomorphization(self.tcx, def_id)
&& match self.mode {
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_monomorphize/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#![feature(crate_visibility_modifier)]
#![feature(control_flow_enum)]
#![feature(let_else)]
#![feature(in_band_lifetimes)]
#![recursion_limit = "256"]

#[macro_use]
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_monomorphize/src/partitioning/default.rs
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ fn fallback_cgu_name(name_builder: &mut CodegenUnitNameBuilder<'_>) -> Symbol {
name_builder.build_cgu_name(LOCAL_CRATE, &["fallback"], Some("cgu"))
}

fn mono_item_linkage_and_visibility(
fn mono_item_linkage_and_visibility<'tcx>(
tcx: TyCtxt<'tcx>,
mono_item: &MonoItem<'tcx>,
can_be_internalized: &mut bool,
Expand All @@ -393,7 +393,7 @@ fn mono_item_linkage_and_visibility(

type CguNameCache = FxHashMap<(DefId, bool), Symbol>;

fn mono_item_visibility(
fn mono_item_visibility<'tcx>(
tcx: TyCtxt<'tcx>,
mono_item: &MonoItem<'tcx>,
can_be_internalized: &mut bool,
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_monomorphize/src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use std::io::prelude::*;
///
/// During the same compile all closures dump the information in the same file
/// "closure_profile_XXXXX.csv", which is created in the directory where the compiler is invoked.
crate fn dump_closure_profile(tcx: TyCtxt<'tcx>, closure_instance: Instance<'tcx>) {
crate fn dump_closure_profile<'tcx>(tcx: TyCtxt<'tcx>, closure_instance: Instance<'tcx>) {
let mut file = if let Ok(file) = OpenOptions::new()
.create(true)
.append(true)
Expand Down

0 comments on commit f0b7142

Please sign in to comment.