Skip to content

Commit e00eac8

Browse files
committed
use structured fields in some existing warnings
Signed-off-by: Eliza Weisman <[email protected]>
1 parent 928c787 commit e00eac8

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

compiler/rustc_codegen_ssa/src/back/link.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -844,18 +844,17 @@ fn link_natively<'a, B: ArchiveBuilder<'a>>(
844844
if out.contains(msg_segv) || out.contains(msg_bus) {
845845
warn!(
846846
"looks like the linker segfaulted when we tried to call it, \
847-
automatically retrying again. cmd = {:?}, out = {}.",
848-
cmd, out,
847+
automatically retrying again",
848+
?cmd, %out,
849849
);
850850
continue;
851851
}
852852

853853
if is_illegal_instruction(&output.status) {
854854
warn!(
855855
"looks like the linker hit an illegal instruction when we \
856-
tried to call it, automatically retrying again. cmd = {:?}, ]\
857-
out = {}, status = {}.",
858-
cmd, out, output.status,
856+
tried to call it, automatically retrying again."
857+
?cmd, %out, status = %output.status,
859858
);
860859
continue;
861860
}

compiler/rustc_errors/src/emitter.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2308,7 +2308,7 @@ pub fn is_case_difference(sm: &SourceMap, suggested: &str, sp: Span) -> bool {
23082308
let found = match sm.span_to_snippet(sp) {
23092309
Ok(snippet) => snippet,
23102310
Err(e) => {
2311-
warn!("Invalid span {:?}. Err={:?}", sp, e);
2311+
warn!(error = ?e, "Invalid span {:?}", sp);
23122312
return false;
23132313
}
23142314
};

0 commit comments

Comments
 (0)