This commit is contained in:
Philipp Hansch 2019-08-25 08:06:32 +02:00
parent 2bcb615594
commit 818b2ccfc5
No known key found for this signature in database
GPG key ID: 82AA61CAA11397E6
2 changed files with 3 additions and 3 deletions

View file

@ -196,7 +196,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for MissingDoc {
}
}
fn check_variant(&mut self, cx: &LateContext<'a, 'tcx>, v: &'tcx hir::Variant, _: &hir::Generics) {
fn check_variant(&mut self, cx: &LateContext<'a, 'tcx>, v: &'tcx hir::Variant) {
self.check_missing_docs_attrs(cx, &v.attrs, v.span, "a variant");
}
}

View file

@ -90,12 +90,12 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Author {
done();
}
fn check_variant(&mut self, cx: &LateContext<'a, 'tcx>, var: &'tcx hir::Variant, generics: &hir::Generics) {
fn check_variant(&mut self, cx: &LateContext<'a, 'tcx>, var: &'tcx hir::Variant) {
if !has_attr(cx.sess(), &var.attrs) {
return;
}
prelude();
PrintVisitor::new("var").visit_variant(var, generics, hir::DUMMY_HIR_ID);
PrintVisitor::new("var").visit_variant(var, &hir::Generics::empty(), hir::DUMMY_HIR_ID);
done();
}