From e00eac8b9c4af0bd6baa4b645773fdfa86829fcb Mon Sep 17 00:00:00 2001 From: Eliza Weisman Date: Thu, 7 Oct 2021 10:48:48 -0700 Subject: use structured fields in some existing warnings Signed-off-by: Eliza Weisman --- compiler/rustc_errors/src/emitter.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/rustc_errors') diff --git a/compiler/rustc_errors/src/emitter.rs b/compiler/rustc_errors/src/emitter.rs index 29f352ae585..778d58eeadc 100644 --- a/compiler/rustc_errors/src/emitter.rs +++ b/compiler/rustc_errors/src/emitter.rs @@ -2308,7 +2308,7 @@ pub fn is_case_difference(sm: &SourceMap, suggested: &str, sp: Span) -> bool { let found = match sm.span_to_snippet(sp) { Ok(snippet) => snippet, Err(e) => { - warn!("Invalid span {:?}. Err={:?}", sp, e); + warn!(error = ?e, "Invalid span {:?}", sp); return false; } }; -- cgit 1.4.1-3-g733a5