Migrate some rustc_builtin_macros to SessionDiagnostic
This commit is contained in:
parent
ed1ce580ec
commit
8af8a95a64
11 changed files with 134 additions and 32 deletions
|
@ -1,3 +1,4 @@
|
|||
use crate::errors;
|
||||
use rustc_ast::tokenstream::{TokenStream, TokenTree};
|
||||
use rustc_expand::base::{self, ExtCtxt};
|
||||
use rustc_span::symbol::kw;
|
||||
|
@ -20,7 +21,7 @@ pub fn expand_trace_macros(
|
|||
};
|
||||
err |= cursor.next().is_some();
|
||||
if err {
|
||||
cx.span_err(sp, "trace_macros! accepts only `true` or `false`")
|
||||
cx.emit_err(errors::TraceMacros { span: sp });
|
||||
} else {
|
||||
cx.set_trace_macros(value);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue