let mut db = match err.cause {
MutabilityViolation => {
- struct_span_err!(self.tcx.sess, error_span, E0594, "cannot assign to {}", descr)
+ struct_span_err!(self.tcx.sess,
+ error_span,
+ E0594,
+ "cannot assign to {}",
+ descr)
}
BorrowViolation(euv::ClosureCapture(_)) => {
struct_span_err!(self.tcx.sess, error_span, E0595,
// Some examples that probably *could* be accepted, but which we reject for now.
fn bar() {
- || {
- let b = true;
- foo(yield, &b); //~ ERROR
- };
+ || {
+ let b = true;
+ foo(yield, &b); //~ ERROR
+ };
}
fn main() { }
fn foo(_b: &bool, _a: ()) {}
fn main() {
- || {
- let b = true;
- foo(&b, yield); //~ ERROR
- };
+ || {
+ let b = true;
+ foo(&b, yield); //~ ERROR
+ };
}