diff options
| author | Jubilee <workingjubilee@gmail.com> | 2024-09-11 15:53:22 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-11 15:53:22 -0700 |
| commit | a31a8fe0cf714e7222908ef0808e4ed93149c83c (patch) | |
| tree | e17c42a75c3417719325053abca83851a21c9a2e /compiler/rustc_target | |
| parent | c4488c49dee640a79eee3535a80edca0ba0bc926 (diff) | |
| parent | 0b20ffcb63b00acbbe70ae6f59a746bcde4c8b96 (diff) | |
| download | rust-a31a8fe0cf714e7222908ef0808e4ed93149c83c.tar.gz rust-a31a8fe0cf714e7222908ef0808e4ed93149c83c.zip | |
Rollup merge of #130114 - eduardosm:needless-returns, r=compiler-errors
Remove needless returns detected by clippy in the compiler
Diffstat (limited to 'compiler/rustc_target')
| -rw-r--r-- | compiler/rustc_target/src/abi/call/mod.rs | 6 | ||||
| -rw-r--r-- | compiler/rustc_target/src/abi/call/sparc64.rs | 6 |
2 files changed, 5 insertions, 7 deletions
diff --git a/compiler/rustc_target/src/abi/call/mod.rs b/compiler/rustc_target/src/abi/call/mod.rs index 082c169b210..c2826b55dc5 100644 --- a/compiler/rustc_target/src/abi/call/mod.rs +++ b/compiler/rustc_target/src/abi/call/mod.rs @@ -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), } diff --git a/compiler/rustc_target/src/abi/call/sparc64.rs b/compiler/rustc_target/src/abi/call/sparc64.rs index 2954d9642df..835353f76fc 100644 --- a/compiler/rustc_target/src/abi/call/sparc64.rs +++ b/compiler/rustc_target/src/abi/call/sparc64.rs @@ -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) |
