Skip to content

Commit e63a685

Browse files
committed
NestedMetaItemKind -> NestedMetaItem
1 parent cf71caa commit e63a685

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

clippy_lints/src/attrs.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use rustc::ty::{self, TyCtxt};
1414
use rustc::{declare_tool_lint, lint_array};
1515
use rustc_errors::Applicability;
1616
use semver::Version;
17-
use syntax::ast::{AttrStyle, Attribute, Lit, LitKind, MetaItemKind, NestedMetaItem, NestedMetaItemKind};
17+
use syntax::ast::{AttrStyle, Attribute, Lit, LitKind, MetaItemKind, NestedMetaItem};
1818
use syntax::source_map::Span;
1919

2020
declare_clippy_lint! {
@@ -219,7 +219,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for AttrPass {
219219
}
220220
for item in items {
221221
if_chain! {
222-
if let NestedMetaItemKind::MetaItem(mi) = &item.node;
222+
if let NestedMetaItem::MetaItem(mi) = &item;
223223
if let MetaItemKind::NameValue(lit) = &mi.node;
224224
if mi.name() == "since";
225225
then {
@@ -476,7 +476,7 @@ fn check_semver(cx: &LateContext<'_, '_>, span: Span, lit: &Lit) {
476476
}
477477

478478
fn is_word(nmi: &NestedMetaItem, expected: &str) -> bool {
479-
if let NestedMetaItemKind::MetaItem(mi) = &nmi.node {
479+
if let NestedMetaItem::MetaItem(mi) = &nmi {
480480
mi.is_word() && mi.name() == expected
481481
} else {
482482
false

clippy_lints/src/utils/conf.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ use toml;
1212

1313
/// Gets the configuration file from arguments.
1414
pub fn file_from_args(
15-
args: &[source_map::Spanned<ast::NestedMetaItemKind>],
15+
args: &[ast::NestedMetaItem],
1616
) -> Result<Option<path::PathBuf>, (&'static str, source_map::Span)> {
17-
for arg in args.iter().filter_map(syntax::source_map::Spanned::meta_item) {
17+
for arg in args.iter().filter_map(syntax::ast::NestedMetaItem::meta_item) {
1818
if arg.name() == "conf_file" {
1919
return match arg.node {
2020
ast::MetaItemKind::Word | ast::MetaItemKind::List(_) => {

0 commit comments

Comments
 (0)