diff options
| author | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2019-06-12 15:59:10 +0300 |
|---|---|---|
| committer | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2019-06-12 16:02:03 +0300 |
| commit | 87b6b864686eecd3c6ee7b6b3bba04f7d1f67be5 (patch) | |
| tree | 649274056381d5d465ee5aa7117b91f5f97b2e92 /src | |
| parent | fff08cb04389497d254fb40948674cbbee402908 (diff) | |
| download | rust-87b6b864686eecd3c6ee7b6b3bba04f7d1f67be5.tar.gz rust-87b6b864686eecd3c6ee7b6b3bba04f7d1f67be5.zip | |
rustc_codegen_llvm: `deny(unused_lifetimes)`.
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustc_codegen_llvm/base.rs | 4 | ||||
| -rw-r--r-- | src/librustc_codegen_llvm/builder.rs | 4 | ||||
| -rw-r--r-- | src/librustc_codegen_llvm/debuginfo/metadata.rs | 3 | ||||
| -rw-r--r-- | src/librustc_codegen_llvm/lib.rs | 7 | ||||
| -rw-r--r-- | src/librustc_codegen_llvm/type_.rs | 2 | ||||
| -rw-r--r-- | src/librustc_codegen_llvm/type_of.rs | 4 |
6 files changed, 11 insertions, 13 deletions
diff --git a/src/librustc_codegen_llvm/base.rs b/src/librustc_codegen_llvm/base.rs index c552cc92238..9d2cd861887 100644 --- a/src/librustc_codegen_llvm/base.rs +++ b/src/librustc_codegen_llvm/base.rs @@ -41,7 +41,7 @@ use rustc::hir::CodegenFnAttrs; use crate::value::Value; -pub fn write_compressed_metadata<'a, 'gcx>( +pub fn write_compressed_metadata<'gcx>( tcx: TyCtxt<'gcx, 'gcx>, metadata: &EncodedMetadata, llvm_module: &mut ModuleLlvm, @@ -123,7 +123,7 @@ pub fn compile_codegen_unit(tcx: TyCtxt<'tcx, 'tcx>, cgu_name: InternedString) { submit_codegened_module_to_llvm(&LlvmCodegenBackend(()), tcx, module, cost); - fn module_codegen<'ll, 'tcx>( + fn module_codegen<'tcx>( tcx: TyCtxt<'tcx, 'tcx>, cgu_name: InternedString, ) -> ModuleCodegen<ModuleLlvm> { diff --git a/src/librustc_codegen_llvm/builder.rs b/src/librustc_codegen_llvm/builder.rs index 3d5f00a0692..2febba6766d 100644 --- a/src/librustc_codegen_llvm/builder.rs +++ b/src/librustc_codegen_llvm/builder.rs @@ -1228,9 +1228,7 @@ impl Builder<'a, 'll, 'tcx> { ret.expect("LLVM does not have support for catchret") } - fn check_store<'b>(&mut self, - val: &'ll Value, - ptr: &'ll Value) -> &'ll Value { + fn check_store(&mut self, val: &'ll Value, ptr: &'ll Value) -> &'ll Value { let dest_ptr_ty = self.cx.val_ty(ptr); let stored_ty = self.cx.val_ty(val); let stored_ptr_ty = self.cx.type_ptr_to(stored_ty); diff --git a/src/librustc_codegen_llvm/debuginfo/metadata.rs b/src/librustc_codegen_llvm/debuginfo/metadata.rs index c4d9f79e8d3..ac798143c00 100644 --- a/src/librustc_codegen_llvm/debuginfo/metadata.rs +++ b/src/librustc_codegen_llvm/debuginfo/metadata.rs @@ -222,8 +222,7 @@ impl TypeMap<'ll, 'tcx> { // Get the unique type id string for an enum variant part. // Variant parts are not types and shouldn't really have their own id, // but it makes set_members_of_composite_type() simpler. - fn get_unique_type_id_str_of_enum_variant_part<'a>(&mut self, - enum_type_id: UniqueTypeId) -> &str { + fn get_unique_type_id_str_of_enum_variant_part(&mut self, enum_type_id: UniqueTypeId) -> &str { let variant_part_type_id = format!("{}_variant_part", self.get_unique_type_id_as_string(enum_type_id)); let interner_key = self.unique_id_interner.intern(&variant_part_type_id); diff --git a/src/librustc_codegen_llvm/lib.rs b/src/librustc_codegen_llvm/lib.rs index 2e922ad5fcd..7820e9fa494 100644 --- a/src/librustc_codegen_llvm/lib.rs +++ b/src/librustc_codegen_llvm/lib.rs @@ -22,6 +22,7 @@ #![feature(static_nobundle)] #![feature(trusted_len)] #![deny(rust_2018_idioms)] +#![deny(unused_lifetimes)] #![allow(explicit_outlives_requirements)] use back::write::{create_target_machine, create_informational_target_machine}; @@ -107,7 +108,7 @@ impl ExtraBackendMethods for LlvmCodegenBackend { ModuleLlvm::new_metadata(tcx, mod_name) } - fn write_compressed_metadata<'b, 'gcx>( + fn write_compressed_metadata<'gcx>( &self, tcx: TyCtxt<'gcx, 'gcx>, metadata: &EncodedMetadata, @@ -115,7 +116,7 @@ impl ExtraBackendMethods for LlvmCodegenBackend { ) { base::write_compressed_metadata(tcx, metadata, llvm_module) } - fn codegen_allocator<'b, 'gcx>( + fn codegen_allocator<'gcx>( &self, tcx: TyCtxt<'gcx, 'gcx>, mods: &mut ModuleLlvm, @@ -284,7 +285,7 @@ impl CodegenBackend for LlvmCodegenBackend { attributes::provide_extern(providers); } - fn codegen_crate<'b, 'tcx>( + fn codegen_crate<'tcx>( &self, tcx: TyCtxt<'tcx, 'tcx>, metadata: EncodedMetadata, diff --git a/src/librustc_codegen_llvm/type_.rs b/src/librustc_codegen_llvm/type_.rs index a3d3f0756a5..2c167256ad5 100644 --- a/src/librustc_codegen_llvm/type_.rs +++ b/src/librustc_codegen_llvm/type_.rs @@ -327,7 +327,7 @@ impl LayoutTypeMethods<'tcx> for CodegenCx<'ll, 'tcx> { fn backend_field_index(&self, layout: TyLayout<'tcx>, index: usize) -> u64 { layout.llvm_field_index(index) } - fn scalar_pair_element_backend_type<'a>( + fn scalar_pair_element_backend_type( &self, layout: TyLayout<'tcx>, index: usize, diff --git a/src/librustc_codegen_llvm/type_of.rs b/src/librustc_codegen_llvm/type_of.rs index 7a82fd731f6..36a9ff0a2d2 100644 --- a/src/librustc_codegen_llvm/type_of.rs +++ b/src/librustc_codegen_llvm/type_of.rs @@ -175,7 +175,7 @@ impl<'a, 'tcx> CodegenCx<'a, 'tcx> { pub trait LayoutLlvmExt<'tcx> { fn is_llvm_immediate(&self) -> bool; - fn is_llvm_scalar_pair<'a>(&self) -> bool; + fn is_llvm_scalar_pair(&self) -> bool; fn llvm_type<'a>(&self, cx: &CodegenCx<'a, 'tcx>) -> &'a Type; fn immediate_llvm_type<'a>(&self, cx: &CodegenCx<'a, 'tcx>) -> &'a Type; fn scalar_llvm_type_at<'a>(&self, cx: &CodegenCx<'a, 'tcx>, @@ -198,7 +198,7 @@ impl<'tcx> LayoutLlvmExt<'tcx> for TyLayout<'tcx> { } } - fn is_llvm_scalar_pair<'a>(&self) -> bool { + fn is_llvm_scalar_pair(&self) -> bool { match self.abi { layout::Abi::ScalarPair(..) => true, layout::Abi::Uninhabited | |
