Skip to content

Commit dd550cd

Browse files
committed
Auto merge of #149941 - jhpratt:rollup-9p1xc2t, r=jhpratt
Rollup of 10 pull requests Successful merges: - rust-lang/rust#145278 (Update `rustc_codegen_gcc` rotate operation document) - rust-lang/rust#148837 (Use `let...else` instead of `match foo { ... _ => return };` and `if let ... else return`) - rust-lang/rust#149177 (Add proper suggestion for associated function with unknown field) - rust-lang/rust#149843 (Inherit attributes in delegation) - rust-lang/rust#149860 (Fix: Prevent macro-expanded extern crates from shadowing extern arguments) - rust-lang/rust#149874 (Weak for Arc pointer is marked as DynSend/DynSync) - rust-lang/rust#149903 (Remove unused code in `cfg_old`) - rust-lang/rust#149911 (bootstrap: Don't pass an unused `--color` to compiletest) - rust-lang/rust#149916 (Add a sanity check in case of any duplicate nodes) - rust-lang/rust#149924 (`declare_lint_pass` for `INLINE_ALWAYS_MISMATCHING_TARGET_FEATURES`) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 01f5752 + 21b5d90 commit dd550cd

2 files changed

Lines changed: 3 additions & 9 deletions

File tree

src/debuginfo/unwind.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,9 @@ impl UnwindContext {
130130
return;
131131
}
132132

133-
let unwind_info = if let Some(unwind_info) =
133+
let Some(unwind_info) =
134134
context.compiled_code().unwrap().create_unwind_info(module.isa()).unwrap()
135-
{
136-
unwind_info
137-
} else {
135+
else {
138136
return;
139137
};
140138

src/optimize/peephole.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,7 @@ pub(crate) fn maybe_known_branch_taken(
2929
arg: Value,
3030
test_zero: bool,
3131
) -> Option<bool> {
32-
let arg_inst = if let ValueDef::Result(arg_inst, 0) = bcx.func.dfg.value_def(arg) {
33-
arg_inst
34-
} else {
35-
return None;
36-
};
32+
let ValueDef::Result(arg_inst, 0) = bcx.func.dfg.value_def(arg) else { return None };
3733

3834
match bcx.func.dfg.insts[arg_inst] {
3935
InstructionData::UnaryImm { opcode: Opcode::Iconst, imm } => {

0 commit comments

Comments
 (0)