Skip to content

Commit c5d3abe

Browse files
committed
linker/inline: make Clippy happy
1 parent b360321 commit c5d3abe

File tree

1 file changed

+5
-5
lines changed
  • crates/rustc_codegen_spirv/src/linker

1 file changed

+5
-5
lines changed

crates/rustc_codegen_spirv/src/linker/inline.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ fn compute_function_postorder(
151151
}
152152

153153
states[current] = NodeState::Finished;
154-
postorder.push(current)
154+
postorder.push(current);
155155
}
156156

157157
fn calls<'a>(
@@ -245,7 +245,7 @@ fn should_inline(
245245
// This should be more general, but a very common problem is passing an OpAccessChain to an
246246
// OpFunctionCall (i.e. `f(&s.x)`, or more commonly, `s.x.f()` where `f` takes `&self`), so detect
247247
// that case and inline the call.
248-
fn get_invalid_args<'a>(function: &'a Function) -> impl Iterator<Item = Word> + 'a {
248+
fn get_invalid_args(function: &Function) -> impl Iterator<Item = Word> + '_ {
249249
function.all_inst_iter().filter_map(|inst| {
250250
if inst.class.opcode == Op::AccessChain {
251251
inst.result_id
@@ -290,14 +290,14 @@ impl Inliner<'_, '_> {
290290
// If we successfully inlined a block, then continue processing on the next block or its tail.
291291
// TODO: this is quadratic in cases where [`Op::AccessChain`]s cascade into inner arguments.
292292
// For the common case of "we knew which functions to inline", it is linear.
293-
self.inline_block(&mut function, &functions, block_idx);
293+
self.inline_block(&mut function, functions, block_idx);
294294
block_idx += 1;
295295
}
296296
functions[index] = function;
297297
}
298298

299299
/// Inlines one block and returns whether inlining actually occurred.
300-
/// After calling this, blocks[block_idx] is finished processing.
300+
/// After calling this, `blocks[block_idx]` is finished processing.
301301
fn inline_block(
302302
&mut self,
303303
caller: &mut Function,
@@ -454,7 +454,7 @@ fn get_inlined_blocks(function: &Function, return_jump: Word) -> (Vec<Block>, Ve
454454
if let Op::Return | Op::ReturnValue = last.class.opcode {
455455
if Op::ReturnValue == last.class.opcode {
456456
let return_value = last.operands[0].id_ref_any().unwrap();
457-
phipairs.push((return_value, block.label_id().unwrap()))
457+
phipairs.push((return_value, block.label_id().unwrap()));
458458
}
459459
*block.instructions.last_mut().unwrap() =
460460
Instruction::new(Op::Branch, None, None, vec![Operand::IdRef(return_jump)]);

0 commit comments

Comments
 (0)