Fix tidy errors

This commit is contained in:
John Kåre Alsaker 2017-07-15 21:28:42 +02:00
parent 3fdc3fa1ec
commit f5ec50358a
3 changed files with 13 additions and 9 deletions

View File

@ -719,7 +719,11 @@ impl<'a, 'tcx> BorrowckCtxt<'a, 'tcx> {
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,

View File

@ -15,10 +15,10 @@ fn foo(_a: (), _b: &bool) {}
// 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() { }

View File

@ -13,8 +13,8 @@
fn foo(_b: &bool, _a: ()) {}
fn main() {
|| {
let b = true;
foo(&b, yield); //~ ERROR
};
|| {
let b = true;
foo(&b, yield); //~ ERROR
};
}