aboutsummaryrefslogtreecommitdiffstats
path: root/components/plugins/lints/inheritance_integrity.rs
diff options
context:
space:
mode:
authorbors-servo <metajack+bors@gmail.com>2015-03-18 11:25:00 -0600
committerbors-servo <metajack+bors@gmail.com>2015-03-18 11:25:00 -0600
commit99cf9dbfc107bacb84dfe5afa9539a0ede3beac2 (patch)
treecc36210329cb1a31709a03685c05c4aaa99407e3 /components/plugins/lints/inheritance_integrity.rs
parent65d4b12bf20783ea784f1c61f4b33ec0fc975f4f (diff)
parent5f15eb5fbfb7a8649132cc8b3a07314389836714 (diff)
downloadservo-99cf9dbfc107bacb84dfe5afa9539a0ede3beac2.tar.gz
servo-99cf9dbfc107bacb84dfe5afa9539a0ede3beac2.zip
auto merge of #5256 : servo/servo/rustup_20150311, r=jdm
...v. Relies on: * https://github.com/servo/rust-geom/pull/72 * https://github.com/servo/rust-glx/pull/10 * https://github.com/servo/gleam/pull/15 * https://github.com/servo/rust-mozjs/pull/137 * https://github.com/servo/rust-core-text/pull/35 * https://github.com/servo/rust-io-surface/pull/28
Diffstat (limited to 'components/plugins/lints/inheritance_integrity.rs')
-rw-r--r--components/plugins/lints/inheritance_integrity.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/components/plugins/lints/inheritance_integrity.rs b/components/plugins/lints/inheritance_integrity.rs
index d806b1cad1c..d8cf22a102b 100644
--- a/components/plugins/lints/inheritance_integrity.rs
+++ b/components/plugins/lints/inheritance_integrity.rs
@@ -41,8 +41,9 @@ impl LintPass for InheritancePass {
.map(|(_, f)| f.span);
// 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().get(&ty_id).cloned() {
+ if let ast::TyPath(..) = f.node.ty.node {
+ if let Some(&def::PathResolution { base_def: def::DefTy(def_id, _), .. }) =
+ cx.tcx.def_map.borrow().get(&f.node.ty.id) {
if ty::has_attr(cx.tcx, def_id, "_dom_struct_marker") {
// If the field is not the first, it's probably
// being misused (a)