Skip to content

Commit

Permalink
Import struct_span_err macro instead of prepending it
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Oct 1, 2020
1 parent de21c3d commit 8b7aeef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler/rustc_expand/src/expand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 8b7aeef

Please sign in to comment.