Skip to content

Commit 8ee1814

Browse files
committed
rustc_codegen_*: deny(unused_lifetimes).
1 parent 7b353f2 commit 8ee1814

File tree

11 files changed

+13
-11
lines changed

11 files changed

+13
-11
lines changed

src/librustc_codegen_llvm/asm.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ impl AsmBuilderMethods<'tcx> for Builder<'a, 'll, 'tcx> {
112112
}
113113
}
114114

115-
impl AsmMethods<'tcx> for CodegenCx<'ll, 'tcx> {
115+
impl AsmMethods for CodegenCx<'ll, 'tcx> {
116116
fn codegen_global_asm(&self, ga: &hir::GlobalAsm) {
117117
let asm = CString::new(ga.asm.as_str().as_bytes()).unwrap();
118118
unsafe {

src/librustc_codegen_llvm/builder.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1074,8 +1074,8 @@ impl BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
10741074
}
10751075
}
10761076

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

src/librustc_codegen_ssa/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#![allow(dead_code)]
1515
#![deny(rust_2018_idioms)]
1616
#![deny(internal)]
17+
#![deny(unused_lifetimes)]
1718
#![allow(explicit_outlives_requirements)]
1819

1920
#![recursion_limit="256"]

src/librustc_codegen_ssa/mir/analyze.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ impl CleanupKind {
272272
}
273273
}
274274

275-
pub fn cleanup_kinds<'a, 'tcx>(mir: &mir::Body<'tcx>) -> IndexVec<mir::BasicBlock, CleanupKind> {
275+
pub fn cleanup_kinds<'tcx>(mir: &mir::Body<'tcx>) -> IndexVec<mir::BasicBlock, CleanupKind> {
276276
fn discover_masters<'tcx>(result: &mut IndexVec<mir::BasicBlock, CleanupKind>,
277277
mir: &mir::Body<'tcx>) {
278278
for (bb, data) in mir.basic_blocks().iter_enumerated() {

src/librustc_codegen_ssa/mir/block.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ impl<'a, 'tcx: 'a, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
223223
}
224224
}
225225

226-
fn codegen_return_terminator<'b>(
226+
fn codegen_return_terminator(
227227
&mut self,
228228
mut bx: Bx,
229229
) {

src/librustc_codegen_ssa/traits/asm.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ pub trait AsmBuilderMethods<'tcx>: BackendTypes {
1212
) -> bool;
1313
}
1414

15-
pub trait AsmMethods<'tcx> {
15+
pub trait AsmMethods {
1616
fn codegen_global_asm(&self, ga: &GlobalAsm);
1717
}

src/librustc_codegen_ssa/traits/builder.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ pub trait BuilderMethods<'a, 'tcx: 'a>:
2929
+ AbiBuilderMethods<'tcx>
3030
+ IntrinsicCallMethods<'tcx>
3131
+ AsmBuilderMethods<'tcx>
32-
+ StaticBuilderMethods<'tcx>
32+
+ StaticBuilderMethods
3333
+ HasParamEnv<'tcx>
3434
+ HasTargetSpec
3535

src/librustc_codegen_ssa/traits/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ pub trait CodegenMethods<'tcx>:
5858
+ StaticMethods
5959
+ DebugInfoMethods<'tcx>
6060
+ DeclareMethods<'tcx>
61-
+ AsmMethods<'tcx>
61+
+ AsmMethods
6262
+ PreDefineMethods<'tcx>
6363
+ HasParamEnv<'tcx>
6464
+ HasTyCtxt<'tcx>
@@ -74,7 +74,7 @@ impl<'tcx, T> CodegenMethods<'tcx> for T where
7474
+ StaticMethods
7575
+ DebugInfoMethods<'tcx>
7676
+ DeclareMethods<'tcx>
77-
+ AsmMethods<'tcx>
77+
+ AsmMethods
7878
+ PreDefineMethods<'tcx>
7979
+ HasParamEnv<'tcx>
8080
+ HasTyCtxt<'tcx>

src/librustc_codegen_ssa/traits/statics.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ pub trait StaticMethods: BackendTypes {
88
fn codegen_static(&self, def_id: DefId, is_mutable: bool);
99
}
1010

11-
pub trait StaticBuilderMethods<'tcx>: BackendTypes {
11+
pub trait StaticBuilderMethods: BackendTypes {
1212
fn get_static(&mut self, def_id: DefId) -> Self::Value;
1313
fn static_panic_msg(
1414
&mut self,

src/librustc_codegen_ssa/traits/type_.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ pub trait LayoutTypeMethods<'tcx>: Backend<'tcx> {
101101
fn is_backend_immediate(&self, layout: TyLayout<'tcx>) -> bool;
102102
fn is_backend_scalar_pair(&self, layout: TyLayout<'tcx>) -> bool;
103103
fn backend_field_index(&self, layout: TyLayout<'tcx>, index: usize) -> u64;
104-
fn scalar_pair_element_backend_type<'a>(
104+
fn scalar_pair_element_backend_type(
105105
&self,
106106
layout: TyLayout<'tcx>,
107107
index: usize,

src/librustc_codegen_utils/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
#![deny(rust_2018_idioms)]
2020
#![deny(internal)]
21+
#![deny(unused_lifetimes)]
2122

2223
#[macro_use]
2324
extern crate rustc;

0 commit comments

Comments
 (0)