use std::hash::Hash;
use std::collections::hash_map::Entry;
-use rustc::hir::def::{Def, DefKind};
+use rustc::hir::def::DefKind;
use rustc::hir::def_id::DefId;
use rustc::mir::interpret::{ConstEvalErr, ErrorHandled};
use rustc::mir;
}
} else if def_id.is_local() {
// constant defined in this crate, we can figure out a lint level!
- match tcx.describe_def(def_id) {
+ match tcx.def_kind(def_id) {
// constants never produce a hard error at the definition site. Anything else is
// a backwards compatibility hazard (and will break old versions of winapi for sure)
//
// note that validation may still cause a hard error on this very same constant,
// because any code that existed before validation could not have failed validation
// thus preventing such a hard error from being a backwards compatibility hazard
- Some(Def::Def(DefKind::Const, _)) | Some(Def::Def(DefKind::AssociatedConst, _)) => {
+ Some(DefKind::Const) | Some(DefKind::AssociatedConst) => {
let hir_id = tcx.hir().as_local_hir_id(def_id).unwrap();
err.report_as_lint(
tcx.at(tcx.def_span(def_id)),