about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/base.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2021-12-18 14:49:40 +0100
committerGitHub <noreply@github.com>2021-12-18 14:49:40 +0100
commitca3d129ee38fc73085f7ad5b525e5245f7ad59f1 (patch)
tree27f70cb97692ac327d9bfbb21212e4049fde5270 /compiler/rustc_codegen_llvm/src/base.rs
parent9e720a8aae2d895fd7b7bffe65a5d2c305ea114f (diff)
parent4937a55dfb19e804c3c974e5341b70dcd76192d4 (diff)
downloadrust-ca3d129ee38fc73085f7ad5b525e5245f7ad59f1.tar.gz
rust-ca3d129ee38fc73085f7ad5b525e5245f7ad59f1.zip
Rollup merge of #91931 - LegionMammal978:less-inband-codegen_llvm, r=davidtwco
Remove `in_band_lifetimes` from `rustc_codegen_llvm`

See #91867 for more information.

This one took a while. This crate has dozens of functions not associated with any type, and most of them were using in-band lifetimes for `'ll` and `'tcx`.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/base.rs')
-rw-r--r--compiler/rustc_codegen_llvm/src/base.rs9
1 files changed, 3 insertions, 6 deletions
diff --git a/compiler/rustc_codegen_llvm/src/base.rs b/compiler/rustc_codegen_llvm/src/base.rs
index 7a3e11e32bc..483b81d23bc 100644
--- a/compiler/rustc_codegen_llvm/src/base.rs
+++ b/compiler/rustc_codegen_llvm/src/base.rs
@@ -39,7 +39,7 @@ pub struct ValueIter<'ll> {
     step: unsafe extern "C" fn(&'ll Value) -> Option<&'ll Value>,
 }
 
-impl Iterator for ValueIter<'ll> {
+impl<'ll> Iterator for ValueIter<'ll> {
     type Item = &'ll Value;
 
     fn next(&mut self) -> Option<&'ll Value> {
@@ -51,14 +51,11 @@ impl Iterator for ValueIter<'ll> {
     }
 }
 
-pub fn iter_globals(llmod: &'ll llvm::Module) -> ValueIter<'ll> {
+pub fn iter_globals(llmod: &llvm::Module) -> ValueIter<'_> {
     unsafe { ValueIter { cur: llvm::LLVMGetFirstGlobal(llmod), step: llvm::LLVMGetNextGlobal } }
 }
 
-pub fn compile_codegen_unit(
-    tcx: TyCtxt<'tcx>,
-    cgu_name: Symbol,
-) -> (ModuleCodegen<ModuleLlvm>, u64) {
+pub fn compile_codegen_unit(tcx: TyCtxt<'_>, cgu_name: Symbol) -> (ModuleCodegen<ModuleLlvm>, u64) {
     let start_time = Instant::now();
 
     let dep_node = tcx.codegen_unit(cgu_name).codegen_dep_node(tcx);