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:
@@ -2301,7 +2301,7 @@ impl<'a: 'ast, 'b, 'ast, 'tcx> LateResolutionVisitor<'a, 'b, 'ast, 'tcx> {
|
||||
let report_error = |this: &Self, ns| {
|
||||
if this.should_report_errs() {
|
||||
let what = if ns == TypeNS { "type parameters" } else { "local variables" };
|
||||
this.r.dcx().create_err(ImportsCannotReferTo { span: ident.span, what }).emit();
|
||||
this.r.dcx().emit_err(ImportsCannotReferTo { span: ident.span, what });
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user