From: csmoe Date: Tue, 14 Jan 2020 13:22:19 +0000 (+0800) Subject: suggest to limit lifetime of temporary borrow with let X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=b97560116785f2dbb488e66ab34aeee981ec2912;p=rust.git suggest to limit lifetime of temporary borrow with let --- diff --git a/src/librustc/traits/error_reporting.rs b/src/librustc/traits/error_reporting.rs index 66737372bda..13eb47a041f 100644 --- a/src/librustc/traits/error_reporting.rs +++ b/src/librustc/traits/error_reporting.rs @@ -2578,7 +2578,7 @@ fn note_obligation_cause_for_async_await( }; span.push_span_label(original_span, message); - err.set_span(span); + err.set_span(span.clone()); format!("is not {}", trait_name) } else {