Rollup merge of #130114 - eduardosm:needless-returns, r=compiler-errors
Remove needless returns detected by clippy in the compiler
This commit is contained in:
commit
a31a8fe0cf
38 changed files with 66 additions and 75 deletions
|
@ -188,7 +188,7 @@ impl ArgAttributes {
|
|||
if self.arg_ext != other.arg_ext {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
true
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -632,7 +632,7 @@ impl<'a, Ty> ArgAbi<'a, Ty> {
|
|||
PassMode::Indirect { .. } => {
|
||||
self.mode = PassMode::Direct(ArgAttributes::new());
|
||||
}
|
||||
PassMode::Ignore | PassMode::Direct(_) | PassMode::Pair(_, _) => return, // already direct
|
||||
PassMode::Ignore | PassMode::Direct(_) | PassMode::Pair(_, _) => {} // already direct
|
||||
_ => panic!("Tried to make {:?} direct", self.mode),
|
||||
}
|
||||
}
|
||||
|
@ -646,7 +646,6 @@ impl<'a, Ty> ArgAbi<'a, Ty> {
|
|||
}
|
||||
PassMode::Indirect { attrs: _, meta_attrs: _, on_stack: false } => {
|
||||
// already indirect
|
||||
return;
|
||||
}
|
||||
_ => panic!("Tried to make {:?} indirect", self.mode),
|
||||
}
|
||||
|
@ -661,7 +660,6 @@ impl<'a, Ty> ArgAbi<'a, Ty> {
|
|||
}
|
||||
PassMode::Indirect { attrs: _, meta_attrs: _, on_stack: false } => {
|
||||
// already indirect
|
||||
return;
|
||||
}
|
||||
_ => panic!("Tried to make {:?} indirect (expected `PassMode::Ignore`)", self.mode),
|
||||
}
|
||||
|
|
|
@ -66,7 +66,7 @@ where
|
|||
data.last_offset = offset + Reg::f64().size;
|
||||
}
|
||||
data.prefix_index += 1;
|
||||
return data;
|
||||
data
|
||||
}
|
||||
|
||||
fn arg_scalar_pair<C>(
|
||||
|
@ -92,7 +92,7 @@ where
|
|||
offset += Size::from_bytes(4 - (offset.bytes() % 4));
|
||||
}
|
||||
data = arg_scalar(cx, scalar2, offset, data);
|
||||
return data;
|
||||
data
|
||||
}
|
||||
|
||||
fn parse_structure<'a, Ty, C>(
|
||||
|
@ -128,7 +128,7 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
return data;
|
||||
data
|
||||
}
|
||||
|
||||
fn classify_arg<'a, Ty, C>(cx: &C, arg: &mut ArgAbi<'a, Ty>, in_registers_max: Size)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue