Rollup merge of #91895 - pitaj:91867-monomorphize, r=Aaron1011

Remove `in_band_lifetimes` for `rustc_monomorphize`

#91867
This commit is contained in:
Matthias Krüger 2021-12-19 17:38:34 +01:00 committed by GitHub
commit fba0d04d30
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 7 deletions

View File

@ -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,
@ -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(..)
@ -1225,7 +1225,7 @@ fn visit_impl_item(&mut self, ii: &'v hir::ImplItem<'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 {

View File

@ -3,7 +3,6 @@
#![feature(crate_visibility_modifier)]
#![feature(control_flow_enum)]
#![feature(let_else)]
#![feature(in_band_lifetimes)]
#![recursion_limit = "256"]
#[macro_use]

View File

@ -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,
@ -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,

View File

@ -7,7 +7,7 @@
///
/// 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)