Skip to content

Commit 4a21968

Browse files
committed
rustdoc: deny(unused_lifetimes).
1 parent 8ee1814 commit 4a21968

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

src/librustdoc/clean/auto_trait.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ impl<'a, 'tcx> AutoTraitFinder<'a, 'tcx> {
341341
.collect()
342342
}
343343

344-
fn make_final_bounds<'b, 'c, 'cx>(
344+
fn make_final_bounds(
345345
&self,
346346
ty_to_bounds: FxHashMap<Type, FxHashSet<GenericBound>>,
347347
ty_to_fn: FxHashMap<Type, (Option<PolyTrait>, Option<Type>)>,

src/librustdoc/clean/mod.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -1298,7 +1298,7 @@ impl Clean<Constant> for hir::ConstArg {
12981298
}
12991299
}
13001300

1301-
impl<'tcx> Clean<Lifetime> for ty::GenericParamDef {
1301+
impl Clean<Lifetime> for ty::GenericParamDef {
13021302
fn clean(&self, _cx: &DocContext<'_>) -> Lifetime {
13031303
Lifetime(self.name.to_string())
13041304
}
@@ -2039,7 +2039,7 @@ impl<'a, A: Copy> Clean<FnDecl> for (&'a hir::FnDecl, A)
20392039
}
20402040
}
20412041

2042-
impl<'a, 'tcx> Clean<FnDecl> for (DefId, ty::PolyFnSig<'tcx>) {
2042+
impl<'tcx> Clean<FnDecl> for (DefId, ty::PolyFnSig<'tcx>) {
20432043
fn clean(&self, cx: &DocContext<'_>) -> FnDecl {
20442044
let (did, sig) = *self;
20452045
let mut names = if cx.tcx.hir().as_local_hir_id(did).is_some() {
@@ -2276,7 +2276,7 @@ impl Clean<Item> for hir::ImplItem {
22762276
}
22772277
}
22782278

2279-
impl<'tcx> Clean<Item> for ty::AssocItem {
2279+
impl Clean<Item> for ty::AssocItem {
22802280
fn clean(&self, cx: &DocContext<'_>) -> Item {
22812281
let inner = match self.kind {
22822282
ty::AssocKind::Const => {
@@ -3174,7 +3174,7 @@ impl Clean<Item> for hir::StructField {
31743174
}
31753175
}
31763176

3177-
impl<'tcx> Clean<Item> for ty::FieldDef {
3177+
impl Clean<Item> for ty::FieldDef {
31783178
fn clean(&self, cx: &DocContext<'_>) -> Item {
31793179
Item {
31803180
name: Some(self.ident.name).clean(cx),
@@ -3342,7 +3342,7 @@ impl Clean<Item> for doctree::Variant {
33423342
}
33433343
}
33443344

3345-
impl<'tcx> Clean<Item> for ty::VariantDef {
3345+
impl Clean<Item> for ty::VariantDef {
33463346
fn clean(&self, cx: &DocContext<'_>) -> Item {
33473347
let kind = match self.ctor_kind {
33483348
CtorKind::Const => VariantKind::CLike,

src/librustdoc/html/render.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1764,7 +1764,7 @@ impl DocFolder for Cache {
17641764
}
17651765
}
17661766

1767-
impl<'a> Cache {
1767+
impl Cache {
17681768
fn generics(&mut self, generics: &clean::Generics) {
17691769
for param in &generics.params {
17701770
match param.kind {

src/librustdoc/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#![deny(rust_2018_idioms)]
22
#![deny(internal)]
3+
#![deny(unused_lifetimes)]
34

45
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/",
56
html_playground_url = "https://play.rust-lang.org/")]

0 commit comments

Comments
 (0)