diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2019-08-27 07:26:57 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-27 07:26:57 -0400 |
commit | f79ec15d17a3fbdd5ac47aacbae898725d1a883b (patch) | |
tree | 79ec5ce7946e425abd157bada15b9aadd69d7fdd /components/script_plugins/webidl_must_inherit.rs | |
parent | 245ce017e3ee985b8c69de0ef3b27f91a1d75144 (diff) | |
parent | e18846ae94f1d5f5e5e8b73aaffaf1dbbba19999 (diff) | |
download | servo-f79ec15d17a3fbdd5ac47aacbae898725d1a883b.tar.gz servo-f79ec15d17a3fbdd5ac47aacbae898725d1a883b.zip |
Auto merge of #24054 - servo:rustup, r=jdm
Upgrade to rustc 1.39.0-nightly (521d78407 2019-08-25)
<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/24054)
<!-- Reviewable:end -->
Diffstat (limited to 'components/script_plugins/webidl_must_inherit.rs')
-rw-r--r-- | components/script_plugins/webidl_must_inherit.rs | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/components/script_plugins/webidl_must_inherit.rs b/components/script_plugins/webidl_must_inherit.rs index dc05a15f6b1..83f00197c3e 100644 --- a/components/script_plugins/webidl_must_inherit.rs +++ b/components/script_plugins/webidl_must_inherit.rs @@ -2,7 +2,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use rustc::hir::{self, HirId}; +use rustc::hir; use rustc::lint::{LateContext, LateLintPass, LintArray, LintContext, LintPass}; use rustc::ty; use std::boxed; @@ -12,7 +12,6 @@ use std::fmt; use std::fs; use std::io; use std::path; -use syntax::ast; use weedle; declare_lint!( @@ -177,14 +176,12 @@ impl LintPass for WebIdlPass { } impl<'a, 'tcx> LateLintPass<'a, 'tcx> for WebIdlPass { - fn check_struct_def( - &mut self, - cx: &LateContext<'a, 'tcx>, - def: &'tcx hir::VariantData, - n: ast::Name, - _gen: &'tcx hir::Generics, - id: HirId, - ) { + fn check_item(&mut self, cx: &LateContext<'a, 'tcx>, item: &'tcx hir::Item) { + let def = match &item.node { + hir::ItemKind::Struct(def, ..) => def, + _ => return, + }; + let id = item.hir_id; let def_id = cx.tcx.hir().local_def_id(id); if !is_webidl_ty(&self.symbols, cx, cx.tcx.type_of(def_id)) { return; @@ -201,7 +198,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for WebIdlPass { get_ty_name(&ty).to_string() }); - let struct_name = n.to_string(); + let struct_name = item.ident.to_string(); match check_webidl(&struct_name, &parent_name) { Ok(()) => {}, Err(e) => { |