Skip to content

Commit be44169

Browse files
committed
Collapse if statements, change message to lowercase
1 parent 56207b8 commit be44169

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

compiler/rustc_resolve/src/macros.rs

+7-6
Original file line numberDiff line numberDiff line change
@@ -548,12 +548,13 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
548548

549549
err.span_label(path.span, format!("not {} {}", article, expected));
550550

551-
if !path.span.from_expansion() {
552-
// Suggest moving the macro out of the derive() as the macro isn't Derive
553-
if kind == MacroKind::Derive && ext.macro_kind() != MacroKind::Derive {
554-
err.span_help(path.span, "Remove from the surrounding `derive()`");
555-
err.help(format!("Add as non-Derive macro\n`#[{}]`", path_str));
556-
}
551+
// Suggest moving the macro out of the derive() as the macro isn't Derive
552+
if !path.span.from_expansion()
553+
&& kind == MacroKind::Derive
554+
&& ext.macro_kind() != MacroKind::Derive
555+
{
556+
err.span_help(path.span, "remove from the surrounding `derive()`");
557+
err.help(format!("add as non-Derive macro\n`#[{}]`", path_str));
557558
}
558559

559560
err.emit();

0 commit comments

Comments
 (0)