aboutsummaryrefslogtreecommitdiffstats
path: root/components/plugins/utils.rs
diff options
context:
space:
mode:
authorMs2ger <ms2ger@gmail.com>2015-01-02 12:45:28 +0100
committerJosh Matthews <josh@joshmatthews.net>2015-01-08 09:58:46 -0500
commit16c7060bc8ff91527ae97f8a3feee5706747b9c5 (patch)
tree0cc29f2cc50c729d3a8f9521a22991fad67b9afd /components/plugins/utils.rs
parentcf616b90a236f88058dbad74b568b4d4379d2829 (diff)
downloadservo-16c7060bc8ff91527ae97f8a3feee5706747b9c5.tar.gz
servo-16c7060bc8ff91527ae97f8a3feee5706747b9c5.zip
Update rustc to revision 2cfb5acb5a2751c759627377e602bac4f88f2d19.
Diffstat (limited to 'components/plugins/utils.rs')
-rw-r--r--components/plugins/utils.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/components/plugins/utils.rs b/components/plugins/utils.rs
index 132d7afaaa8..6f7f00f9109 100644
--- a/components/plugins/utils.rs
+++ b/components/plugins/utils.rs
@@ -4,7 +4,6 @@
use rustc::lint::Context;
use rustc::middle::{ty, def};
-use rustc::middle::typeck::astconv::AstConv;
use syntax::ptr::P;
use syntax::{ast, ast_map};
@@ -17,7 +16,7 @@ use syntax::attr::mark_used;
/// Try not to use this for types defined in crates you own, use match_lang_ty instead (for lint passes)
pub fn match_ty_unwrap<'a>(ty: &'a Ty, segments: &[&str]) -> Option<&'a [P<Ty>]> {
match ty.node {
- TyPath(Path {segments: ref seg, ..}, _, _) => {
+ TyPath(Path {segments: ref seg, ..}, _) => {
// So ast::Path isn't the full path, just the tokens that were provided.
// I could muck around with the maps and find the full path
// however the more efficient way is to simply reverse the iterators and zip them
@@ -40,7 +39,7 @@ pub fn match_ty_unwrap<'a>(ty: &'a Ty, segments: &[&str]) -> Option<&'a [P<Ty>]>
/// Checks if a type has a #[servo_lang = "str"] attribute
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 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| {