You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6
+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7
+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8
+
// option. This file may not be copied, modified, or distributed
9
+
// except according to those terms.
10
+
11
+
// compile-flags: -Z borrowck=compare
12
+
13
+
#![feature(generators)]
14
+
#![feature(nll)]
15
+
16
+
fnmain(){
17
+
|| {
18
+
// The reference in `_a` is a Legal with NLL since it ends before the yield
19
+
let _a = &muttrue;//~ ERROR borrow may still be in use when generator yields (Ast)
20
+
let b = &muttrue;//~ ERROR borrow may still be in use when generator yields (Ast)
21
+
//~^ borrow may still be in use when generator yields (Mir)
0 commit comments