"Fallout": Slightly different errors are generated in this edge case.
This commit is contained in:
parent
09a7bc55db
commit
cbeff8b8b3
2 changed files with 3 additions and 2 deletions
|
@ -24,6 +24,7 @@ fn a(x: &int) {
|
|||
//~^ ERROR cannot borrow
|
||||
let c2 = || set(&mut *x);
|
||||
//~^ ERROR cannot borrow
|
||||
//~| ERROR closure requires unique access
|
||||
}
|
||||
|
||||
fn main() {
|
||||
|
|
|
@ -13,6 +13,6 @@
|
|||
struct B<T>;
|
||||
|
||||
fn main() {
|
||||
let foo = B; //~ ERROR unable to infer enough type information
|
||||
let closure = |:| foo;
|
||||
let foo = B;
|
||||
let closure = |:| foo; //~ ERROR unable to infer enough type information
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue