Import struct_span_err macro instead of prepending it
This commit is contained in:
parent
de21c3df0e
commit
8b7aeefede
1 changed files with 2 additions and 2 deletions
|
@ -18,7 +18,7 @@ use rustc_ast_pretty::pprust;
|
|||
use rustc_attr::{self as attr, is_builtin_attr, HasAttrs};
|
||||
use rustc_data_structures::map_in_place::MapInPlace;
|
||||
use rustc_data_structures::stack::ensure_sufficient_stack;
|
||||
use rustc_errors::{Applicability, PResult};
|
||||
use rustc_errors::{struct_span_err, Applicability, PResult};
|
||||
use rustc_feature::Features;
|
||||
use rustc_parse::parser::Parser;
|
||||
use rustc_parse::validate_attr;
|
||||
|
@ -542,7 +542,7 @@ impl<'a, 'b> MacroExpander<'a, 'b> {
|
|||
fn error_derive_forbidden_on_non_adt(&self, derives: &[Path], item: &Annotatable) {
|
||||
let attr = self.cx.sess.find_by_name(item.attrs(), sym::derive);
|
||||
let span = attr.map_or(item.span(), |attr| attr.span);
|
||||
let mut err = rustc_errors::struct_span_err!(
|
||||
let mut err = struct_span_err!(
|
||||
self.cx.sess,
|
||||
span,
|
||||
E0774,
|
||||
|
|
Loading…
Add table
Reference in a new issue