"Fallout": Slightly different errors are generated in this edge case.

This commit is contained in:
Niko Matsakis 2015-01-02 04:15:00 -05:00
parent 09a7bc55db
commit cbeff8b8b3
2 changed files with 3 additions and 2 deletions

View file

@ -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() {

View file

@ -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
}