Pass a Symbol to check_name, emit_feature_err, and related functions.
This commit is contained in:
@@ -23,6 +23,7 @@ extern crate rustc;
|
||||
|
||||
use rustc::ty::TyCtxt;
|
||||
use rustc::hir::def_id::LOCAL_CRATE;
|
||||
use syntax::symbol::sym;
|
||||
|
||||
pub mod link;
|
||||
pub mod codegen_backend;
|
||||
@@ -35,7 +36,7 @@ pub mod symbol_names_test;
|
||||
/// reporting an error.
|
||||
pub fn check_for_rustc_errors_attr(tcx: TyCtxt<'_, '_, '_>) {
|
||||
if let Some((def_id, _)) = tcx.entry_fn(LOCAL_CRATE) {
|
||||
if tcx.has_attr(def_id, "rustc_error") {
|
||||
if tcx.has_attr(def_id, sym::rustc_error) {
|
||||
tcx.sess.span_fatal(tcx.def_span(def_id), "compilation successful");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user