Shorten some error invocations.
- `struct_foo` + `emit` -> `foo` - `create_foo` + `emit` -> `emit_foo` I have made recent commits in other PRs that have removed some of these shortcuts for combinations with few uses, e.g. `struct_span_err_with_code`. But for the remaining combinations that have high levels of use, we might as well use them wherever possible.
This commit is contained in:
parent
4864cb8aef
commit
ff40ad4107
13 changed files with 30 additions and 34 deletions
|
@ -155,7 +155,7 @@ pub fn expand_include<'cx>(
|
|||
if self.p.token != token::Eof {
|
||||
let token = pprust::token_to_string(&self.p.token);
|
||||
let msg = format!("expected item, found `{token}`");
|
||||
self.p.dcx().struct_span_err(self.p.token.span, msg).emit();
|
||||
self.p.dcx().span_err(self.p.token.span, msg);
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue