aboutsummaryrefslogtreecommitdiffstats
path: root/components/plugins/lints
diff options
context:
space:
mode:
authorLars Bergstrom <lars@lars.com>2016-12-19 08:29:06 -0600
committerLars Bergstrom <lars@lars.com>2016-12-19 08:29:06 -0600
commitcba3881a12cfd9a8c2361838f44a3de6a919763f (patch)
tree34047283b9f34d9f2c1b2d59a6778b62588f37e0 /components/plugins/lints
parent077a54de19ad6336cc6fae5fb4d9897535f67c2b (diff)
downloadservo-cba3881a12cfd9a8c2361838f44a3de6a919763f.tar.gz
servo-cba3881a12cfd9a8c2361838f44a3de6a919763f.zip
Revert "Update Rust to 1.15.0-nightly (8f02c429a 2016-12-15)."
This reverts commit 5618e797683e7bfc400e8b1879d89f64bfb577fa.
Diffstat (limited to 'components/plugins/lints')
-rw-r--r--components/plugins/lints/inheritance_integrity.rs2
-rw-r--r--components/plugins/lints/privatize.rs2
-rw-r--r--components/plugins/lints/transmute_type.rs2
-rw-r--r--components/plugins/lints/unrooted_must_root.rs28
4 files changed, 13 insertions, 21 deletions
diff --git a/components/plugins/lints/inheritance_integrity.rs b/components/plugins/lints/inheritance_integrity.rs
index 0c70a949c15..a47b6313db0 100644
--- a/components/plugins/lints/inheritance_integrity.rs
+++ b/components/plugins/lints/inheritance_integrity.rs
@@ -22,7 +22,7 @@ impl LintPass for InheritancePass {
}
}
-impl<'a, 'tcx> LateLintPass<'a, 'tcx> for InheritancePass {
+impl LateLintPass for InheritancePass {
fn check_struct_def(&mut self, cx: &LateContext, def: &hir::VariantData, _n: ast::Name,
_gen: &hir::Generics, id: ast::NodeId) {
// Lints are run post expansion, so it's fine to use
diff --git a/components/plugins/lints/privatize.rs b/components/plugins/lints/privatize.rs
index 0eec1ad1596..f3f56a0cdc4 100644
--- a/components/plugins/lints/privatize.rs
+++ b/components/plugins/lints/privatize.rs
@@ -21,7 +21,7 @@ impl LintPass for PrivatizePass {
}
}
-impl<'a, 'tcx> LateLintPass<'a, 'tcx> for PrivatizePass {
+impl LateLintPass for PrivatizePass {
fn check_struct_def(&mut self,
cx: &LateContext,
def: &hir::VariantData,
diff --git a/components/plugins/lints/transmute_type.rs b/components/plugins/lints/transmute_type.rs
index 1488aaa9a74..6cc1b3818a6 100644
--- a/components/plugins/lints/transmute_type.rs
+++ b/components/plugins/lints/transmute_type.rs
@@ -20,7 +20,7 @@ impl LintPass for TransmutePass {
}
}
-impl<'a, 'tcx> LateLintPass<'a, 'tcx> for TransmutePass {
+impl LateLintPass for TransmutePass {
fn check_expr(&mut self, cx: &LateContext, ex: &hir::Expr) {
match ex.node {
hir::ExprCall(ref expr, ref args) => {
diff --git a/components/plugins/lints/unrooted_must_root.rs b/components/plugins/lints/unrooted_must_root.rs
index 328b143593b..a2ce68c522b 100644
--- a/components/plugins/lints/unrooted_must_root.rs
+++ b/components/plugins/lints/unrooted_must_root.rs
@@ -76,7 +76,7 @@ impl LintPass for UnrootedPass {
}
}
-impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnrootedPass {
+impl LateLintPass for UnrootedPass {
/// All structs containing #[must_root] types must be #[must_root] themselves
fn check_struct_def(&mut self,
cx: &LateContext,
@@ -119,13 +119,8 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnrootedPass {
}
}
/// Function arguments that are #[must_root] types are not allowed
- fn check_fn(&mut self,
- cx: &LateContext<'a, 'tcx>,
- kind: visit::FnKind,
- decl: &'tcx hir::FnDecl,
- body: &'tcx hir::Expr,
- span: codemap::Span,
- id: ast::NodeId) {
+ fn check_fn(&mut self, cx: &LateContext, kind: visit::FnKind, decl: &hir::FnDecl,
+ body: &hir::Expr, span: codemap::Span, id: ast::NodeId) {
let in_new_function = match kind {
visit::FnKind::ItemFn(n, _, _, _, _, _, _) |
visit::FnKind::Method(n, _, _, _) => {
@@ -164,8 +159,8 @@ struct FnDefVisitor<'a, 'b: 'a, 'tcx: 'a+'b> {
in_new_function: bool,
}
-impl<'a, 'b, 'tcx> visit::Visitor<'tcx> for FnDefVisitor<'a, 'b, 'tcx> {
- fn visit_expr(&mut self, expr: &'tcx hir::Expr) {
+impl<'a, 'b: 'a, 'tcx: 'a+'b> visit::Visitor<'a> for FnDefVisitor<'a, 'b, 'tcx> {
+ fn visit_expr(&mut self, expr: &'a hir::Expr) {
let cx = self.cx;
fn require_rooted(cx: &LateContext, in_new_function: bool, subexpr: &hir::Expr) {
@@ -199,7 +194,7 @@ impl<'a, 'b, 'tcx> visit::Visitor<'tcx> for FnDefVisitor<'a, 'b, 'tcx> {
visit::walk_expr(self, expr);
}
- fn visit_pat(&mut self, pat: &'tcx hir::Pat) {
+ fn visit_pat(&mut self, pat: &'a hir::Pat) {
let cx = self.cx;
if let hir::PatKind::Binding(hir::BindingMode::BindByValue(_), _, _, _) = pat.node {
@@ -214,16 +209,13 @@ impl<'a, 'b, 'tcx> visit::Visitor<'tcx> for FnDefVisitor<'a, 'b, 'tcx> {
visit::walk_pat(self, pat);
}
- fn visit_fn(&mut self, kind: visit::FnKind<'tcx>, decl: &'tcx hir::FnDecl,
- body: hir::ExprId, span: codemap::Span, id: ast::NodeId) {
+ fn visit_fn(&mut self, kind: visit::FnKind<'a>, decl: &'a hir::FnDecl,
+ body: &'a hir::Expr, span: codemap::Span, id: ast::NodeId) {
if let visit::FnKind::Closure(_) = kind {
visit::walk_fn(self, kind, decl, body, span, id);
}
}
- fn visit_foreign_item(&mut self, _: &'tcx hir::ForeignItem) {}
- fn visit_ty(&mut self, _: &'tcx hir::Ty) { }
- fn nested_visit_map<'this>(&'this mut self) -> hir::intravisit::NestedVisitorMap<'this, 'tcx> {
- hir::intravisit::NestedVisitorMap::OnlyBodies(&self.cx.tcx.map)
- }
+ fn visit_foreign_item(&mut self, _: &'a hir::ForeignItem) {}
+ fn visit_ty(&mut self, _: &'a hir::Ty) { }
}