rustc_codegen_*: deny(unused_lifetimes).

This commit is contained in:
Eduard-Mihai Burtescu 2019-06-11 12:49:10 +03:00
parent 7b353f215f
commit 8ee1814062
11 changed files with 13 additions and 11 deletions

View file

@ -112,7 +112,7 @@ impl AsmBuilderMethods<'tcx> for Builder<'a, 'll, 'tcx> {
}
}
impl AsmMethods<'tcx> for CodegenCx<'ll, 'tcx> {
impl AsmMethods for CodegenCx<'ll, 'tcx> {
fn codegen_global_asm(&self, ga: &hir::GlobalAsm) {
let asm = CString::new(ga.asm.as_str().as_bytes()).unwrap();
unsafe {

View file

@ -1074,8 +1074,8 @@ impl BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
}
}
impl StaticBuilderMethods<'tcx> for Builder<'a, 'll, 'tcx> {
fn get_static(&mut self, def_id: DefId) -> &'ll Value {
impl StaticBuilderMethods for Builder<'a, 'll, 'tcx> {
fn get_static(&mut self, def_id: DefId) -> &'ll Value {
// Forward to the `get_static` method of `CodegenCx`
self.cx().get_static(def_id)
}

View file

@ -14,6 +14,7 @@
#![allow(dead_code)]
#![deny(rust_2018_idioms)]
#![deny(internal)]
#![deny(unused_lifetimes)]
#![allow(explicit_outlives_requirements)]
#![recursion_limit="256"]

View file

@ -272,7 +272,7 @@ impl CleanupKind {
}
}
pub fn cleanup_kinds<'a, 'tcx>(mir: &mir::Body<'tcx>) -> IndexVec<mir::BasicBlock, CleanupKind> {
pub fn cleanup_kinds<'tcx>(mir: &mir::Body<'tcx>) -> IndexVec<mir::BasicBlock, CleanupKind> {
fn discover_masters<'tcx>(result: &mut IndexVec<mir::BasicBlock, CleanupKind>,
mir: &mir::Body<'tcx>) {
for (bb, data) in mir.basic_blocks().iter_enumerated() {

View file

@ -223,7 +223,7 @@ impl<'a, 'tcx: 'a, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
}
}
fn codegen_return_terminator<'b>(
fn codegen_return_terminator(
&mut self,
mut bx: Bx,
) {

View file

@ -12,6 +12,6 @@ pub trait AsmBuilderMethods<'tcx>: BackendTypes {
) -> bool;
}
pub trait AsmMethods<'tcx> {
pub trait AsmMethods {
fn codegen_global_asm(&self, ga: &GlobalAsm);
}

View file

@ -29,7 +29,7 @@ pub trait BuilderMethods<'a, 'tcx: 'a>:
+ AbiBuilderMethods<'tcx>
+ IntrinsicCallMethods<'tcx>
+ AsmBuilderMethods<'tcx>
+ StaticBuilderMethods<'tcx>
+ StaticBuilderMethods
+ HasParamEnv<'tcx>
+ HasTargetSpec

View file

@ -58,7 +58,7 @@ pub trait CodegenMethods<'tcx>:
+ StaticMethods
+ DebugInfoMethods<'tcx>
+ DeclareMethods<'tcx>
+ AsmMethods<'tcx>
+ AsmMethods
+ PreDefineMethods<'tcx>
+ HasParamEnv<'tcx>
+ HasTyCtxt<'tcx>
@ -74,7 +74,7 @@ impl<'tcx, T> CodegenMethods<'tcx> for T where
+ StaticMethods
+ DebugInfoMethods<'tcx>
+ DeclareMethods<'tcx>
+ AsmMethods<'tcx>
+ AsmMethods
+ PreDefineMethods<'tcx>
+ HasParamEnv<'tcx>
+ HasTyCtxt<'tcx>

View file

@ -8,7 +8,7 @@ pub trait StaticMethods: BackendTypes {
fn codegen_static(&self, def_id: DefId, is_mutable: bool);
}
pub trait StaticBuilderMethods<'tcx>: BackendTypes {
pub trait StaticBuilderMethods: BackendTypes {
fn get_static(&mut self, def_id: DefId) -> Self::Value;
fn static_panic_msg(
&mut self,

View file

@ -101,7 +101,7 @@ pub trait LayoutTypeMethods<'tcx>: Backend<'tcx> {
fn is_backend_immediate(&self, layout: TyLayout<'tcx>) -> bool;
fn is_backend_scalar_pair(&self, layout: TyLayout<'tcx>) -> bool;
fn backend_field_index(&self, layout: TyLayout<'tcx>, index: usize) -> u64;
fn scalar_pair_element_backend_type<'a>(
fn scalar_pair_element_backend_type(
&self,
layout: TyLayout<'tcx>,
index: usize,

View file

@ -18,6 +18,7 @@
#![deny(rust_2018_idioms)]
#![deny(internal)]
#![deny(unused_lifetimes)]
#[macro_use]
extern crate rustc;