Fix a diagnostic
This commit is contained in:
parent
9620d26138
commit
e70cc2733b
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue