Skip to content

Commit 081de96

Browse files
committed
WIP: force format_args!-related warnings to be always shown.
1 parent c97d5f0 commit 081de96

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

crates/rustc_codegen_spirv/src/builder/builder_methods.rs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3670,7 +3670,16 @@ impl<'a, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'tcx> {
36703670

36713671
Err(FormatArgsNotRecognized(step)) => {
36723672
if let Some(current_span) = self.current_span {
3673-
let mut warn = self.tcx.dcx().struct_span_warn(
3673+
// HACK(eddyb) Cargo silences warnings in dependencies .
3674+
let force_warn = |span, msg| -> rustc_errors::Diag<'_, ()> {
3675+
rustc_errors::Diag::new(
3676+
self.tcx.dcx(),
3677+
rustc_errors::Level::ForceWarning,
3678+
msg,
3679+
)
3680+
.with_span(span)
3681+
};
3682+
let mut warn = force_warn(
36743683
current_span,
36753684
"failed to find and remove `format_args!` construction for this `panic!`",
36763685
);

0 commit comments

Comments
 (0)