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/utils.rs | |
parent | 21a888341d3e184b0835c4de73959b851d275571 (diff) | |
download | servo-50c246bdc525afd26ff1864001eaf243db834192.tar.gz servo-50c246bdc525afd26ff1864001eaf243db834192.zip |
Fix warnings post-upgrade
Diffstat (limited to 'components/plugins/utils.rs')
-rw-r--r-- | components/plugins/utils.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/components/plugins/utils.rs b/components/plugins/utils.rs index ec3df8a99ad..34d74a4001f 100644 --- a/components/plugins/utils.rs +++ b/components/plugins/utils.rs @@ -39,7 +39,7 @@ pub fn match_ty_unwrap<'a>(ty: &'a Ty, segments: &[&str]) -> Option<&'a [P<Ty>]> pub fn match_lang_ty(cx: &Context, ty: &Ty, value: &str) -> bool { let mut found = false; if let TyPath(_, _, ty_id) = 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() { // Iterating through attributes is hard because of cross-crate defs ty::each_attr(cx.tcx, def_id, |attr| { if let ast::MetaNameValue(ref name, ref val) = attr.node.value.node { @@ -59,4 +59,4 @@ pub fn match_lang_ty(cx: &Context, ty: &Ty, value: &str) -> bool { }; } found -}
\ No newline at end of file +} |