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;
|
use crate::value::Value;
|
||||||
|
|
||||||
pub fn write_compressed_metadata<'a, 'gcx>(
|
pub fn write_compressed_metadata<'gcx>(
|
||||||
tcx: TyCtxt<'gcx, 'gcx>,
|
tcx: TyCtxt<'gcx, 'gcx>,
|
||||||
metadata: &EncodedMetadata,
|
metadata: &EncodedMetadata,
|
||||||
llvm_module: &mut ModuleLlvm,
|
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);
|
submit_codegened_module_to_llvm(&LlvmCodegenBackend(()), tcx, module, cost);
|
||||||
|
|
||||||
fn module_codegen<'ll, 'tcx>(
|
fn module_codegen<'tcx>(
|
||||||
tcx: TyCtxt<'tcx, 'tcx>,
|
tcx: TyCtxt<'tcx, 'tcx>,
|
||||||
cgu_name: InternedString,
|
cgu_name: InternedString,
|
||||||
) -> ModuleCodegen<ModuleLlvm> {
|
) -> ModuleCodegen<ModuleLlvm> {
|
||||||
|
@ -1228,9 +1228,7 @@ impl Builder<'a, 'll, 'tcx> {
|
|||||||
ret.expect("LLVM does not have support for catchret")
|
ret.expect("LLVM does not have support for catchret")
|
||||||
}
|
}
|
||||||
|
|
||||||
fn check_store<'b>(&mut self,
|
fn check_store(&mut self, val: &'ll Value, ptr: &'ll Value) -> &'ll Value {
|
||||||
val: &'ll Value,
|
|
||||||
ptr: &'ll Value) -> &'ll Value {
|
|
||||||
let dest_ptr_ty = self.cx.val_ty(ptr);
|
let dest_ptr_ty = self.cx.val_ty(ptr);
|
||||||
let stored_ty = self.cx.val_ty(val);
|
let stored_ty = self.cx.val_ty(val);
|
||||||
let stored_ptr_ty = self.cx.type_ptr_to(stored_ty);
|
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.
|
// Get the unique type id string for an enum variant part.
|
||||||
// Variant parts are not types and shouldn't really have their own id,
|
// Variant parts are not types and shouldn't really have their own id,
|
||||||
// but it makes set_members_of_composite_type() simpler.
|
// but it makes set_members_of_composite_type() simpler.
|
||||||
fn get_unique_type_id_str_of_enum_variant_part<'a>(&mut self,
|
fn get_unique_type_id_str_of_enum_variant_part(&mut self, enum_type_id: UniqueTypeId) -> &str {
|
||||||
enum_type_id: UniqueTypeId) -> &str {
|
|
||||||
let variant_part_type_id = format!("{}_variant_part",
|
let variant_part_type_id = format!("{}_variant_part",
|
||||||
self.get_unique_type_id_as_string(enum_type_id));
|
self.get_unique_type_id_as_string(enum_type_id));
|
||||||
let interner_key = self.unique_id_interner.intern(&variant_part_type_id);
|
let interner_key = self.unique_id_interner.intern(&variant_part_type_id);
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
#![feature(static_nobundle)]
|
#![feature(static_nobundle)]
|
||||||
#![feature(trusted_len)]
|
#![feature(trusted_len)]
|
||||||
#![deny(rust_2018_idioms)]
|
#![deny(rust_2018_idioms)]
|
||||||
|
#![deny(unused_lifetimes)]
|
||||||
#![allow(explicit_outlives_requirements)]
|
#![allow(explicit_outlives_requirements)]
|
||||||
|
|
||||||
use back::write::{create_target_machine, create_informational_target_machine};
|
use back::write::{create_target_machine, create_informational_target_machine};
|
||||||
@ -107,7 +108,7 @@ impl ExtraBackendMethods for LlvmCodegenBackend {
|
|||||||
ModuleLlvm::new_metadata(tcx, mod_name)
|
ModuleLlvm::new_metadata(tcx, mod_name)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn write_compressed_metadata<'b, 'gcx>(
|
fn write_compressed_metadata<'gcx>(
|
||||||
&self,
|
&self,
|
||||||
tcx: TyCtxt<'gcx, 'gcx>,
|
tcx: TyCtxt<'gcx, 'gcx>,
|
||||||
metadata: &EncodedMetadata,
|
metadata: &EncodedMetadata,
|
||||||
@ -115,7 +116,7 @@ impl ExtraBackendMethods for LlvmCodegenBackend {
|
|||||||
) {
|
) {
|
||||||
base::write_compressed_metadata(tcx, metadata, llvm_module)
|
base::write_compressed_metadata(tcx, metadata, llvm_module)
|
||||||
}
|
}
|
||||||
fn codegen_allocator<'b, 'gcx>(
|
fn codegen_allocator<'gcx>(
|
||||||
&self,
|
&self,
|
||||||
tcx: TyCtxt<'gcx, 'gcx>,
|
tcx: TyCtxt<'gcx, 'gcx>,
|
||||||
mods: &mut ModuleLlvm,
|
mods: &mut ModuleLlvm,
|
||||||
@ -284,7 +285,7 @@ impl CodegenBackend for LlvmCodegenBackend {
|
|||||||
attributes::provide_extern(providers);
|
attributes::provide_extern(providers);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn codegen_crate<'b, 'tcx>(
|
fn codegen_crate<'tcx>(
|
||||||
&self,
|
&self,
|
||||||
tcx: TyCtxt<'tcx, 'tcx>,
|
tcx: TyCtxt<'tcx, 'tcx>,
|
||||||
metadata: EncodedMetadata,
|
metadata: EncodedMetadata,
|
||||||
|
@ -327,7 +327,7 @@ impl LayoutTypeMethods<'tcx> for CodegenCx<'ll, 'tcx> {
|
|||||||
fn backend_field_index(&self, layout: TyLayout<'tcx>, index: usize) -> u64 {
|
fn backend_field_index(&self, layout: TyLayout<'tcx>, index: usize) -> u64 {
|
||||||
layout.llvm_field_index(index)
|
layout.llvm_field_index(index)
|
||||||
}
|
}
|
||||||
fn scalar_pair_element_backend_type<'a>(
|
fn scalar_pair_element_backend_type(
|
||||||
&self,
|
&self,
|
||||||
layout: TyLayout<'tcx>,
|
layout: TyLayout<'tcx>,
|
||||||
index: usize,
|
index: usize,
|
||||||
|
@ -175,7 +175,7 @@ impl<'a, 'tcx> CodegenCx<'a, 'tcx> {
|
|||||||
|
|
||||||
pub trait LayoutLlvmExt<'tcx> {
|
pub trait LayoutLlvmExt<'tcx> {
|
||||||
fn is_llvm_immediate(&self) -> bool;
|
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 llvm_type<'a>(&self, cx: &CodegenCx<'a, 'tcx>) -> &'a Type;
|
||||||
fn immediate_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>,
|
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 {
|
match self.abi {
|
||||||
layout::Abi::ScalarPair(..) => true,
|
layout::Abi::ScalarPair(..) => true,
|
||||||
layout::Abi::Uninhabited |
|
layout::Abi::Uninhabited |
|
||||||
|
Loading…
Reference in New Issue
Block a user