Early return to decrease indentation
This commit is contained in:
parent
8e548bf8d6
commit
ed7c6819e4
1 changed files with 40 additions and 45 deletions
|
@ -1186,7 +1186,9 @@ impl<'hir> LoweringContext<'_, 'hir> {
|
|||
input| {
|
||||
match used_regs.entry(r) {
|
||||
Entry::Occupied(o) => {
|
||||
if !skip {
|
||||
if skip {
|
||||
return;
|
||||
}
|
||||
skip = true;
|
||||
|
||||
let idx2 = *o.get();
|
||||
|
@ -1203,14 +1205,8 @@ impl<'hir> LoweringContext<'_, 'hir> {
|
|||
reg2.name()
|
||||
);
|
||||
let mut err = sess.struct_span_err(op_sp, &msg);
|
||||
err.span_label(
|
||||
op_sp,
|
||||
&format!("register `{}`", reg.name()),
|
||||
);
|
||||
err.span_label(
|
||||
op_sp2,
|
||||
&format!("register `{}`", reg2.name()),
|
||||
);
|
||||
err.span_label(op_sp, &format!("register `{}`", reg.name()));
|
||||
err.span_label(op_sp2, &format!("register `{}`", reg2.name()));
|
||||
|
||||
match (op, op2) {
|
||||
(
|
||||
|
@ -1232,7 +1228,6 @@ impl<'hir> LoweringContext<'_, 'hir> {
|
|||
|
||||
err.emit();
|
||||
}
|
||||
}
|
||||
Entry::Vacant(v) => {
|
||||
v.insert(idx);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue