From e63a685412e763a0eb04cf8a5daccdbe090d364e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Miku=C5=82a?= Date: Mon, 18 Mar 2019 11:59:09 +0100 Subject: [PATCH] NestedMetaItemKind -> NestedMetaItem --- clippy_lints/src/attrs.rs | 6 +++--- clippy_lints/src/utils/conf.rs | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/clippy_lints/src/attrs.rs b/clippy_lints/src/attrs.rs index 0c12bab957c..8025832fdcc 100644 --- a/clippy_lints/src/attrs.rs +++ b/clippy_lints/src/attrs.rs @@ -14,7 +14,7 @@ use rustc::ty::{self, TyCtxt}; use rustc::{declare_tool_lint, lint_array}; use rustc_errors::Applicability; use semver::Version; -use syntax::ast::{AttrStyle, Attribute, Lit, LitKind, MetaItemKind, NestedMetaItem, NestedMetaItemKind}; +use syntax::ast::{AttrStyle, Attribute, Lit, LitKind, MetaItemKind, NestedMetaItem}; use syntax::source_map::Span; declare_clippy_lint! { @@ -219,7 +219,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for AttrPass { } for item in items { if_chain! { - if let NestedMetaItemKind::MetaItem(mi) = &item.node; + if let NestedMetaItem::MetaItem(mi) = &item; if let MetaItemKind::NameValue(lit) = &mi.node; if mi.name() == "since"; then { @@ -476,7 +476,7 @@ fn check_semver(cx: &LateContext<'_, '_>, span: Span, lit: &Lit) { } fn is_word(nmi: &NestedMetaItem, expected: &str) -> bool { - if let NestedMetaItemKind::MetaItem(mi) = &nmi.node { + if let NestedMetaItem::MetaItem(mi) = &nmi { mi.is_word() && mi.name() == expected } else { false diff --git a/clippy_lints/src/utils/conf.rs b/clippy_lints/src/utils/conf.rs index 64243203b7f..ca860a5d30d 100644 --- a/clippy_lints/src/utils/conf.rs +++ b/clippy_lints/src/utils/conf.rs @@ -12,9 +12,9 @@ use toml; /// Gets the configuration file from arguments. pub fn file_from_args( - args: &[source_map::Spanned], + args: &[ast::NestedMetaItem], ) -> Result, (&'static str, source_map::Span)> { - for arg in args.iter().filter_map(syntax::source_map::Spanned::meta_item) { + for arg in args.iter().filter_map(syntax::ast::NestedMetaItem::meta_item) { if arg.name() == "conf_file" { return match arg.node { ast::MetaItemKind::Word | ast::MetaItemKind::List(_) => {