diff options
author | Simon Sapin <simon.sapin@exyr.org> | 2015-04-23 00:14:02 +0200 |
---|---|---|
committer | Josh Matthews <josh@joshmatthews.net> | 2015-05-05 10:07:34 -0400 |
commit | ef8edd4e87aeb3cc71dfd9da2f69437080f5410e (patch) | |
tree | 9146cdd7126ead59c57cacbaa04eda0f16761f65 /components/plugins/utils.rs | |
parent | 7b87085c1880c60aa3be5b3ec4572a0d93fd5537 (diff) | |
download | servo-ef8edd4e87aeb3cc71dfd9da2f69437080f5410e.tar.gz servo-ef8edd4e87aeb3cc71dfd9da2f69437080f5410e.zip |
Upgrade to rustc 551a74dddd84cf01440ee84148ebd18bc68bd7c8.
Diffstat (limited to 'components/plugins/utils.rs')
-rw-r--r-- | components/plugins/utils.rs | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/components/plugins/utils.rs b/components/plugins/utils.rs index 603aa3569a0..3da728481e9 100644 --- a/components/plugins/utils.rs +++ b/components/plugins/utils.rs @@ -69,15 +69,9 @@ pub fn match_lang_ty(cx: &Context, ty: &Ty, value: &str) -> bool { pub fn unsafe_context(map: &ast_map::Map, id: ast::NodeId) -> bool { match map.find(map.get_parent(id)) { Some(ast_map::NodeImplItem(itm)) => { - match *itm { - ast::MethodImplItem(ref meth) => match meth.node { - ast::MethDecl(_, _, _, _, style, _, _, _) => match style { - ast::Unsafety::Unsafe => true, - _ => false, - }, - _ => false, - }, - _ => false, + match itm.node { + ast::MethodImplItem(ref sig, _) => sig.unsafety == ast::Unsafety::Unsafe, + _ => false } }, Some(ast_map::NodeItem(itm)) => { |