Rustup to 1.18.0-nightly (d5cf1cb64 2017-04-15)

This commit is contained in:
Mrmaxmeier 2017-04-16 18:38:17 +02:00
parent 5842463562
commit 89f0f323bb
3 changed files with 4 additions and 1 deletions

View File

@ -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(..) |

View File

@ -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));
},

View File

@ -904,7 +904,8 @@ pub fn opt_def_id(def: Def) -> Option<DefId> {
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,
}