aboutsummaryrefslogtreecommitdiffstats
path: root/components/plugins/utils.rs
diff options
context:
space:
mode:
authorSimon Sapin <simon.sapin@exyr.org>2015-01-31 14:36:05 +0100
committerMatt Brubeck <mbrubeck@limpet.net>2015-02-11 14:48:34 -0800
commitd5dd1d658e5d79701fb9d028479a0fcb26a033fa (patch)
tree0c243afe9d7d82695d16bd43d72e88600e4414ef /components/plugins/utils.rs
parentbc6882bdefc318402a46ede1494eb79339705c21 (diff)
downloadservo-d5dd1d658e5d79701fb9d028479a0fcb26a033fa.tar.gz
servo-d5dd1d658e5d79701fb9d028479a0fcb26a033fa.zip
Upgrade to rustc ba2f13ef0 2015-02-04
Diffstat (limited to 'components/plugins/utils.rs')
-rw-r--r--components/plugins/utils.rs12
1 files changed, 5 insertions, 7 deletions
diff --git a/components/plugins/utils.rs b/components/plugins/utils.rs
index e9db633f2d4..1be51283c1b 100644
--- a/components/plugins/utils.rs
+++ b/components/plugins/utils.rs
@@ -42,21 +42,19 @@ pub fn match_lang_ty(cx: &Context, ty: &Ty, value: &str) -> bool {
if let TyPath(_, ty_id) = ty.node {
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| {
+ for attr in ty::get_attrs(cx.tcx, def_id).iter() {
if let ast::MetaNameValue(ref name, ref val) = attr.node.value.node {
- if name.get() == "servo_lang" {
+ if &**name == "servo_lang" {
if let ast::LitStr(ref v, _) = val.node {
- if v.get() == value {
+ if &**v == value {
mark_used(attr);
found = true;
- // We're done with the loop
- return false;
+ break
}
}
}
}
- true
- });
+ }
};
}
found