rustdoc: deny(unused_lifetimes).
This commit is contained in:
parent
8ee1814062
commit
4a219685ff
@ -341,7 +341,7 @@ impl<'a, 'tcx> AutoTraitFinder<'a, 'tcx> {
|
||||
.collect()
|
||||
}
|
||||
|
||||
fn make_final_bounds<'b, 'c, 'cx>(
|
||||
fn make_final_bounds(
|
||||
&self,
|
||||
ty_to_bounds: FxHashMap<Type, FxHashSet<GenericBound>>,
|
||||
ty_to_fn: FxHashMap<Type, (Option<PolyTrait>, Option<Type>)>,
|
||||
|
@ -1298,7 +1298,7 @@ impl Clean<Constant> for hir::ConstArg {
|
||||
}
|
||||
}
|
||||
|
||||
impl<'tcx> Clean<Lifetime> for ty::GenericParamDef {
|
||||
impl Clean<Lifetime> for ty::GenericParamDef {
|
||||
fn clean(&self, _cx: &DocContext<'_>) -> Lifetime {
|
||||
Lifetime(self.name.to_string())
|
||||
}
|
||||
@ -2039,7 +2039,7 @@ impl<'a, A: Copy> Clean<FnDecl> for (&'a hir::FnDecl, A)
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a, 'tcx> Clean<FnDecl> for (DefId, ty::PolyFnSig<'tcx>) {
|
||||
impl<'tcx> Clean<FnDecl> for (DefId, ty::PolyFnSig<'tcx>) {
|
||||
fn clean(&self, cx: &DocContext<'_>) -> FnDecl {
|
||||
let (did, sig) = *self;
|
||||
let mut names = if cx.tcx.hir().as_local_hir_id(did).is_some() {
|
||||
@ -2276,7 +2276,7 @@ impl Clean<Item> for hir::ImplItem {
|
||||
}
|
||||
}
|
||||
|
||||
impl<'tcx> Clean<Item> for ty::AssocItem {
|
||||
impl Clean<Item> for ty::AssocItem {
|
||||
fn clean(&self, cx: &DocContext<'_>) -> Item {
|
||||
let inner = match self.kind {
|
||||
ty::AssocKind::Const => {
|
||||
@ -3174,7 +3174,7 @@ impl Clean<Item> for hir::StructField {
|
||||
}
|
||||
}
|
||||
|
||||
impl<'tcx> Clean<Item> for ty::FieldDef {
|
||||
impl Clean<Item> for ty::FieldDef {
|
||||
fn clean(&self, cx: &DocContext<'_>) -> Item {
|
||||
Item {
|
||||
name: Some(self.ident.name).clean(cx),
|
||||
@ -3342,7 +3342,7 @@ impl Clean<Item> for doctree::Variant {
|
||||
}
|
||||
}
|
||||
|
||||
impl<'tcx> Clean<Item> for ty::VariantDef {
|
||||
impl Clean<Item> for ty::VariantDef {
|
||||
fn clean(&self, cx: &DocContext<'_>) -> Item {
|
||||
let kind = match self.ctor_kind {
|
||||
CtorKind::Const => VariantKind::CLike,
|
||||
|
@ -1764,7 +1764,7 @@ impl DocFolder for Cache {
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> Cache {
|
||||
impl Cache {
|
||||
fn generics(&mut self, generics: &clean::Generics) {
|
||||
for param in &generics.params {
|
||||
match param.kind {
|
||||
|
@ -1,5 +1,6 @@
|
||||
#![deny(rust_2018_idioms)]
|
||||
#![deny(internal)]
|
||||
#![deny(unused_lifetimes)]
|
||||
|
||||
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/",
|
||||
html_playground_url = "https://play.rust-lang.org/")]
|
||||
|
Loading…
x
Reference in New Issue
Block a user