提交 4a219685 编写于 作者: E Eduard-Mihai Burtescu

rustdoc: deny(unused_lifetimes).

上级 8ee18140
......@@ -341,7 +341,7 @@ fn extract_for_generics<'b, 'c, 'd>(
.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 @@ fn clean(&self, cx: &DocContext<'_>) -> Constant {
}
}
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 @@ fn clean(&self, cx: &DocContext<'_>) -> FnDecl {
}
}
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 @@ fn clean(&self, cx: &DocContext<'_>) -> Item {
}
}
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 @@ fn clean(&self, cx: &DocContext<'_>) -> Item {
}
}
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 @@ fn clean(&self, cx: &DocContext<'_>) -> Item {
}
}
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 @@ fn fold_item(&mut self, item: clean::Item) -> Option<clean::Item> {
}
}
impl<'a> Cache {
impl Cache {
fn generics(&mut self, generics: &clean::Generics) {
for param in &generics.params {
match param.kind {
......
#![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/")]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册