File tree 2 files changed +2
-2
lines changed
2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ fn main() {
7
7
8
8
// can hold onto the pointers for later, as long they stay in the closure
9
9
let _a = scope ( & arr1[ ..] , |arr| {
10
- let r = arr. pointer_range ( ) ; //~ ERROR cannot infer an appropriate lifetime
10
+ let r = arr. pointer_range ( ) ; //~ ERROR borrowed data cannot be stored outside of its closure
11
11
let r = r. nonempty ( ) . unwrap ( ) ;
12
12
let i = r. first ( ) ;
13
13
println ! ( "{}" , & arr[ i] ) ;
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ fn main() {
7
7
8
8
// can hold onto the indices for later, as long they stay in the closure
9
9
let _a = scope ( & arr1[ ..] , |arr| {
10
- let r = arr. range ( ) ; //~ ERROR cannot infer an appropriate lifetime
10
+ let r = arr. range ( ) ; //~ ERROR borrowed data cannot be stored outside of its closure
11
11
let r = r. nonempty ( ) . unwrap ( ) ;
12
12
let i = r. first ( ) ;
13
13
println ! ( "{}" , & arr[ i] ) ;
You can’t perform that action at this time.
0 commit comments