Move lint level source explanation to the bottom

This commit is contained in:
Maybe Waffle 2022-09-18 19:47:21 +04:00
parent 6ecacf76bc
commit ad3d1fc9d5

View File

@ -392,8 +392,6 @@ pub fn struct_lint_level<'s, 'd>(
return;
}
explain_lint_level_source(lint, level, src, &mut *err);
let name = lint.name_lower();
let is_force_warn = matches!(level, Level::ForceWarn(_));
err.code(DiagnosticId::Lint { name, has_future_breakage, is_force_warn });
@ -434,6 +432,7 @@ pub fn struct_lint_level<'s, 'd>(
// Finally, run `decorate`.
decorate(&mut err);
explain_lint_level_source(lint, level, src, &mut *err);
err.emit()
}
struct_lint_level_impl(sess, lint, level, src, span, msg, Box::new(decorate))