diff --git a/src/librustc_borrowck/diagnostics.rs b/src/librustc_borrowck/diagnostics.rs index 50a9dccaa2b..74133c821f0 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); };