Use a function to access the Hir map to be able to turn it into a query later
This commit is contained in:
@@ -53,7 +53,7 @@ pub mod symbol_names_test;
|
||||
/// reporting an error.
|
||||
pub fn check_for_rustc_errors_attr(tcx: TyCtxt) {
|
||||
if let Some((id, span, _)) = *tcx.sess.entry_fn.borrow() {
|
||||
let main_def_id = tcx.hir.local_def_id(id);
|
||||
let main_def_id = tcx.hir().local_def_id(id);
|
||||
|
||||
if tcx.has_attr(main_def_id, "rustc_error") {
|
||||
tcx.sess.span_fatal(span, "compilation successful");
|
||||
|
||||
Reference in New Issue
Block a user