mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-08 09:38:26 +03:00
"Fallout": Slightly different errors are generated in this edge case.
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user