Skip to content

Commit

Permalink
rustc_codegen_*: deny(unused_lifetimes).
Browse files Browse the repository at this point in the history
  • Loading branch information
eddyb committed Jun 11, 2019
1 parent 7b353f2 commit 8ee1814
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/librustc_codegen_llvm/asm.rs
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions src/librustc_codegen_llvm/builder.rs
Expand Up @@ -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)
}
Expand Down
1 change: 1 addition & 0 deletions src/librustc_codegen_ssa/lib.rs
Expand Up @@ -14,6 +14,7 @@
#![allow(dead_code)]
#![deny(rust_2018_idioms)]
#![deny(internal)]
#![deny(unused_lifetimes)]
#![allow(explicit_outlives_requirements)]

#![recursion_limit="256"]
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_codegen_ssa/mir/analyze.rs
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_codegen_ssa/mir/block.rs
Expand Up @@ -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,
) {
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_codegen_ssa/traits/asm.rs
Expand Up @@ -12,6 +12,6 @@ pub trait AsmBuilderMethods<'tcx>: BackendTypes {
) -> bool;
}

pub trait AsmMethods<'tcx> {
pub trait AsmMethods {
fn codegen_global_asm(&self, ga: &GlobalAsm);
}
2 changes: 1 addition & 1 deletion src/librustc_codegen_ssa/traits/builder.rs
Expand Up @@ -29,7 +29,7 @@ pub trait BuilderMethods<'a, 'tcx: 'a>:
+ AbiBuilderMethods<'tcx>
+ IntrinsicCallMethods<'tcx>
+ AsmBuilderMethods<'tcx>
+ StaticBuilderMethods<'tcx>
+ StaticBuilderMethods
+ HasParamEnv<'tcx>
+ HasTargetSpec

Expand Down
4 changes: 2 additions & 2 deletions src/librustc_codegen_ssa/traits/mod.rs
Expand Up @@ -58,7 +58,7 @@ pub trait CodegenMethods<'tcx>:
+ StaticMethods
+ DebugInfoMethods<'tcx>
+ DeclareMethods<'tcx>
+ AsmMethods<'tcx>
+ AsmMethods
+ PreDefineMethods<'tcx>
+ HasParamEnv<'tcx>
+ HasTyCtxt<'tcx>
Expand All @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_codegen_ssa/traits/statics.rs
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_codegen_ssa/traits/type_.rs
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions src/librustc_codegen_utils/lib.rs
Expand Up @@ -18,6 +18,7 @@

#![deny(rust_2018_idioms)]
#![deny(internal)]
#![deny(unused_lifetimes)]

#[macro_use]
extern crate rustc;
Expand Down

0 comments on commit 8ee1814

Please sign in to comment.