diff options
author | Ms2ger <Ms2ger@gmail.com> | 2016-03-24 17:21:27 +0100 |
---|---|---|
committer | Anthony Ramine <n.oxyde@gmail.com> | 2016-04-06 14:22:26 +0200 |
commit | bfadfe03490e79a2fd1a8bb14f6a57ae8604afa8 (patch) | |
tree | 0e7ea4ef4da5c4f88954053df0fb8a976fffed4e /components/plugins/lints | |
parent | f335586ff538004c708d836876b359704ebed86a (diff) | |
download | servo-bfadfe03490e79a2fd1a8bb14f6a57ae8604afa8.tar.gz servo-bfadfe03490e79a2fd1a8bb14f6a57ae8604afa8.zip |
Bump Rust to 2016-04-06
Diffstat (limited to 'components/plugins/lints')
-rw-r--r-- | components/plugins/lints/str_to_string.rs | 2 | ||||
-rw-r--r-- | components/plugins/lints/unrooted_must_root.rs | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/components/plugins/lints/str_to_string.rs b/components/plugins/lints/str_to_string.rs index 6070d9fcd85..8a1f1530898 100644 --- a/components/plugins/lints/str_to_string.rs +++ b/components/plugins/lints/str_to_string.rs @@ -3,7 +3,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ use rustc::lint::{LateContext, LintPass, LintArray, LateLintPass, LintContext}; -use rustc::middle::ty; +use rustc::ty; use rustc_front::hir; declare_lint!(STR_TO_STRING, Deny, diff --git a/components/plugins/lints/unrooted_must_root.rs b/components/plugins/lints/unrooted_must_root.rs index 0bd57774d62..56db0f5f9c4 100644 --- a/components/plugins/lints/unrooted_must_root.rs +++ b/components/plugins/lints/unrooted_must_root.rs @@ -5,7 +5,7 @@ use rustc::front::map as ast_map; use rustc::lint::{LateContext, LintPass, LintArray, LateLintPass, LintContext}; use rustc::middle::pat_util::pat_is_binding; -use rustc::middle::ty; +use rustc::ty; use rustc_front::hir; use rustc_front::intravisit as visit; use syntax::attr::AttrMetaMethods; @@ -125,11 +125,11 @@ impl LateLintPass for UnrootedPass { fn check_fn(&mut self, cx: &LateContext, kind: visit::FnKind, decl: &hir::FnDecl, block: &hir::Block, span: codemap::Span, _id: ast::NodeId) { let in_new_function = match kind { - visit::FnKind::ItemFn(n, _, _, _, _, _) | - visit::FnKind::Method(n, _, _) => { + visit::FnKind::ItemFn(n, _, _, _, _, _, _) | + visit::FnKind::Method(n, _, _, _) => { n.as_str() == "new" || n.as_str().starts_with("new_") } - visit::FnKind::Closure => return, + visit::FnKind::Closure(_) => return, }; for arg in &decl.inputs { @@ -223,7 +223,7 @@ impl<'a, 'b: 'a, 'tcx: 'a+'b> visit::Visitor<'a> for FnDefVisitor<'a, 'b, 'tcx> fn visit_fn(&mut self, kind: visit::FnKind<'a>, decl: &'a hir::FnDecl, block: &'a hir::Block, span: codemap::Span, _id: ast::NodeId) { - if kind == visit::FnKind::Closure { + if let visit::FnKind::Closure(_) = kind { visit::walk_fn(self, kind, decl, block, span); } } |