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
|
@ -325,7 +325,7 @@ impl<'a, 'tcx> InlineAsmCtxt<'a, 'tcx> {
|
|||
op.is_clobber(),
|
||||
) {
|
||||
let msg = format!("cannot use register `{}`: {}", reg.name(), msg);
|
||||
self.tcx.dcx().struct_span_err(*op_sp, msg).emit();
|
||||
self.tcx.dcx().span_err(*op_sp, msg);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
@ -364,7 +364,7 @@ impl<'a, 'tcx> InlineAsmCtxt<'a, 'tcx> {
|
|||
reg_class.name(),
|
||||
feature
|
||||
);
|
||||
self.tcx.dcx().struct_span_err(*op_sp, msg).emit();
|
||||
self.tcx.dcx().span_err(*op_sp, msg);
|
||||
// register isn't enabled, don't do more checks
|
||||
continue;
|
||||
}
|
||||
|
@ -378,7 +378,7 @@ impl<'a, 'tcx> InlineAsmCtxt<'a, 'tcx> {
|
|||
.intersperse(", ")
|
||||
.collect::<String>(),
|
||||
);
|
||||
self.tcx.dcx().struct_span_err(*op_sp, msg).emit();
|
||||
self.tcx.dcx().span_err(*op_sp, msg);
|
||||
// register isn't enabled, don't do more checks
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue