From 89f0f323bb9bcb78cc9f6ace99ad44df5617483c Mon Sep 17 00:00:00 2001 From: Mrmaxmeier Date: Sun, 16 Apr 2017 18:38:17 +0200 Subject: [PATCH] Rustup to 1.18.0-nightly (d5cf1cb64 2017-04-15) --- clippy_lints/src/missing_doc.rs | 1 + clippy_lints/src/utils/inspector.rs | 1 + clippy_lints/src/utils/mod.rs | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/clippy_lints/src/missing_doc.rs b/clippy_lints/src/missing_doc.rs index 1249b638a08..c38402ad29c 100644 --- a/clippy_lints/src/missing_doc.rs +++ b/clippy_lints/src/missing_doc.rs @@ -122,6 +122,7 @@ fn check_item(&mut self, cx: &LateContext<'a, 'tcx>, it: &'tcx hir::Item) { hir::ItemStatic(..) => "a static", hir::ItemStruct(..) => "a struct", hir::ItemTrait(..) => "a trait", + hir::ItemGlobalAsm(..) => "an assembly blob", hir::ItemTy(..) => "a type alias", hir::ItemUnion(..) => "a union", hir::ItemDefaultImpl(..) | diff --git a/clippy_lints/src/utils/inspector.rs b/clippy_lints/src/utils/inspector.rs index 66c1ba89353..b38cc8a15be 100644 --- a/clippy_lints/src/utils/inspector.rs +++ b/clippy_lints/src/utils/inspector.rs @@ -372,6 +372,7 @@ fn print_item(cx: &LateContext, item: &hir::Item) { }, hir::ItemMod(..) => println!("module"), hir::ItemForeignMod(ref fm) => println!("foreign module with abi: {}", fm.abi), + hir::ItemGlobalAsm(ref asm) => println!("global asm: {:?}", asm), hir::ItemTy(..) => { println!("type alias for {:?}", cx.tcx.item_type(did)); }, diff --git a/clippy_lints/src/utils/mod.rs b/clippy_lints/src/utils/mod.rs index 87b43062631..f5f88c572e3 100644 --- a/clippy_lints/src/utils/mod.rs +++ b/clippy_lints/src/utils/mod.rs @@ -904,7 +904,8 @@ pub fn opt_def_id(def: Def) -> Option { Def::AssociatedConst(id) | Def::Local(id) | Def::Upvar(id, ..) | - Def::Macro(id, _) => Some(id), + Def::Macro(id, ..) | + Def::GlobalAsm(id) => Some(id), Def::Label(..) | Def::PrimTy(..) | Def::SelfTy(..) | Def::Err => None, }