Skip to content

Commit 8b7aeef

Browse files
Import struct_span_err macro instead of prepending it
1 parent de21c3d commit 8b7aeef

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/rustc_expand/src/expand.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use rustc_ast_pretty::pprust;
1818
use rustc_attr::{self as attr, is_builtin_attr, HasAttrs};
1919
use rustc_data_structures::map_in_place::MapInPlace;
2020
use rustc_data_structures::stack::ensure_sufficient_stack;
21-
use rustc_errors::{Applicability, PResult};
21+
use rustc_errors::{struct_span_err, Applicability, PResult};
2222
use rustc_feature::Features;
2323
use rustc_parse::parser::Parser;
2424
use rustc_parse::validate_attr;
@@ -542,7 +542,7 @@ impl<'a, 'b> MacroExpander<'a, 'b> {
542542
fn error_derive_forbidden_on_non_adt(&self, derives: &[Path], item: &Annotatable) {
543543
let attr = self.cx.sess.find_by_name(item.attrs(), sym::derive);
544544
let span = attr.map_or(item.span(), |attr| attr.span);
545-
let mut err = rustc_errors::struct_span_err!(
545+
let mut err = struct_span_err!(
546546
self.cx.sess,
547547
span,
548548
E0774,

0 commit comments

Comments
 (0)