mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
Fix tidy errors
This commit is contained in:
parent
3fdc3fa1ec
commit
f5ec50358a
@ -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,
|
||||
|
@ -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() { }
|
||||
|
@ -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
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user