Fix tidy errors
This commit is contained in:
parent
3fdc3fa1ec
commit
f5ec50358a
3 changed files with 13 additions and 9 deletions
|
@ -719,7 +719,11 @@ impl<'a, 'tcx> BorrowckCtxt<'a, 'tcx> {
|
||||||
|
|
||||||
let mut db = match err.cause {
|
let mut db = match err.cause {
|
||||||
MutabilityViolation => {
|
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(_)) => {
|
BorrowViolation(euv::ClosureCapture(_)) => {
|
||||||
struct_span_err!(self.tcx.sess, error_span, E0595,
|
struct_span_err!(self.tcx.sess, error_span, E0595,
|
||||||
|
|
|
@ -15,10 +15,10 @@ fn foo(_a: (), _b: &bool) {}
|
||||||
// Some examples that probably *could* be accepted, but which we reject for now.
|
// Some examples that probably *could* be accepted, but which we reject for now.
|
||||||
|
|
||||||
fn bar() {
|
fn bar() {
|
||||||
|| {
|
|| {
|
||||||
let b = true;
|
let b = true;
|
||||||
foo(yield, &b); //~ ERROR
|
foo(yield, &b); //~ ERROR
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
fn main() { }
|
fn main() { }
|
||||||
|
|
|
@ -13,8 +13,8 @@
|
||||||
fn foo(_b: &bool, _a: ()) {}
|
fn foo(_b: &bool, _a: ()) {}
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
|| {
|
|| {
|
||||||
let b = true;
|
let b = true;
|
||||||
foo(&b, yield); //~ ERROR
|
foo(&b, yield); //~ ERROR
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue