Skip to content

Commit cbeff8b

Browse files
committed
"Fallout": Slightly different errors are generated in this edge case.
1 parent 09a7bc5 commit cbeff8b

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/test/compile-fail/borrowck-closures-mut-of-imm.rs

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ fn a(x: &int) {
2424
//~^ ERROR cannot borrow
2525
let c2 = || set(&mut *x);
2626
//~^ ERROR cannot borrow
27+
//~| ERROR closure requires unique access
2728
}
2829

2930
fn main() {

src/test/compile-fail/issue-17551.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@
1313
struct B<T>;
1414

1515
fn main() {
16-
let foo = B; //~ ERROR unable to infer enough type information
17-
let closure = |:| foo;
16+
let foo = B;
17+
let closure = |:| foo; //~ ERROR unable to infer enough type information
1818
}

0 commit comments

Comments
 (0)