rustc_errors: take self
by value in DiagnosticBuilder::cancel
.
This commit is contained in:
parent
8562d6b752
commit
0b9d70cf6d
31 changed files with 176 additions and 146 deletions
|
@ -296,7 +296,7 @@ impl<'a> Parser<'a> {
|
|||
// extra noise.
|
||||
init
|
||||
}
|
||||
(Err(mut init_err), Some((snapshot, _, ty_err))) => {
|
||||
(Err(init_err), Some((snapshot, _, ty_err))) => {
|
||||
// init error, ty error
|
||||
init_err.cancel();
|
||||
// Couldn't parse the type nor the initializer, only raise the type error and
|
||||
|
@ -449,7 +449,7 @@ impl<'a> Parser<'a> {
|
|||
);
|
||||
}
|
||||
}
|
||||
Err(mut e) => {
|
||||
Err(e) => {
|
||||
self.recover_stmt_(SemiColonMode::Break, BlockMode::Ignore);
|
||||
e.cancel();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue