Fix a diagnostic

This commit is contained in:
Alex Crichton 2017-08-18 09:40:59 -07:00
parent 9620d26138
commit e70cc2733b

View File

@ -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);
};