Pass a Symbol to check_name, emit_feature_err, and related functions.
This commit is contained in:
parent
79602c87b5
commit
fb084a48e2
114 changed files with 671 additions and 621 deletions
|
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue