rustc_codegen_llvm: deny(unused_lifetimes)
.
This commit is contained in:
parent
fff08cb043
commit
87b6b86468
@ -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> {
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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 |
|
||||
|
Loading…
Reference in New Issue
Block a user