]> git.lizzy.rs Git - rust.git/commitdiff
suggest to limit lifetime of temporary borrow with let
authorcsmoe <csmoe@msn.com>
Tue, 14 Jan 2020 13:22:19 +0000 (21:22 +0800)
committercsmoe <csmoe@msn.com>
Tue, 14 Jan 2020 13:22:19 +0000 (21:22 +0800)
src/librustc/traits/error_reporting.rs

index 66737372bda37b2664d1be8629ac1e28dc943876..13eb47a041fa670008cc7cf517d8378e6ece138e 100644 (file)
@@ -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 {