1
Fork 0

Rollup merge of #130114 - eduardosm:needless-returns, r=compiler-errors

Remove needless returns detected by clippy in the compiler
This commit is contained in:
Jubilee 2024-09-11 15:53:22 -07:00 committed by GitHub
commit a31a8fe0cf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
38 changed files with 66 additions and 75 deletions

View file

@ -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),
}

View file

@ -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)