diff options
author | Manish Goregaokar <manishsmail@gmail.com> | 2014-12-18 15:18:11 +0530 |
---|---|---|
committer | Manish Goregaokar <manishsmail@gmail.com> | 2014-12-27 03:28:35 +0530 |
commit | 50c246bdc525afd26ff1864001eaf243db834192 (patch) | |
tree | 59864da35049488606be9c490b41111e746df57e /components/plugins/lints.rs | |
parent | 21a888341d3e184b0835c4de73959b851d275571 (diff) | |
download | servo-50c246bdc525afd26ff1864001eaf243db834192.tar.gz servo-50c246bdc525afd26ff1864001eaf243db834192.zip |
Fix warnings post-upgrade
Diffstat (limited to 'components/plugins/lints.rs')
-rw-r--r-- | components/plugins/lints.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/components/plugins/lints.rs b/components/plugins/lints.rs index 587eae0fa10..639520974e0 100644 --- a/components/plugins/lints.rs +++ b/components/plugins/lints.rs @@ -277,7 +277,7 @@ impl LintPass for InheritancePass { if match_lang_ty(cx, &*f.node.ty, "reflector") { if ctr > 0 { cx.span_lint(INHERITANCE_INTEGRITY, f.span, - "The Reflector should be the first field of the DOM struct"); + "The Reflector should be the first field of the DOM struct"); } return true; } @@ -287,7 +287,7 @@ impl LintPass for InheritancePass { // Find all #[dom_struct] fields let dom_spans: Vec<_> = def.fields.iter().enumerate().filter_map(|(ctr, f)| { if let ast::TyPath(_, _, ty_id) = f.node.ty.node { - if let Some(def::DefTy(def_id, _)) = cx.tcx.def_map.borrow().find_copy(&ty_id) { + if let Some(def::DefTy(def_id, _)) = cx.tcx.def_map.borrow().get(&ty_id).cloned() { if ty::has_attr(cx.tcx, def_id, "_dom_struct_marker") { // If the field is not the first, it's probably // being misused (a) @@ -327,7 +327,7 @@ impl LintPass for InheritancePass { } } else if dom_spans.len() == 0 { cx.span_lint(INHERITANCE_INTEGRITY, cx.tcx.map.expect_item(id).span, - "This DOM struct has no reflector or parent DOM struct"); + "This DOM struct has no reflector or parent DOM struct"); } } } |