From e70cc2733b9902ae660f60fce7ba0bb5191a0d0c Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Fri, 18 Aug 2017 09:40:59 -0700 Subject: [PATCH] Fix a diagnostic --- src/librustc_borrowck/diagnostics.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/librustc_borrowck/diagnostics.rs b/src/librustc_borrowck/diagnostics.rs index 50a9dccaa2bb..74133c821f0f 100644 --- a/src/librustc_borrowck/diagnostics.rs +++ b/src/librustc_borrowck/diagnostics.rs @@ -660,7 +660,7 @@ yield point. # #![feature(generators, generator_trait)] # use std::ops::Generator; let mut b = || { - let a = &3; // <-- This borrow... + let a = &String::new(); // <-- This borrow... yield (); // ...is still in scope here, when the yield occurs. println!("{}", a); };