Skip to content

Commit b3afbb9

Browse files
committed
linker/inline: make Clippy happy
1 parent a57d8e0 commit b3afbb9

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
@@ -152,7 +152,7 @@ fn compute_function_postorder(
152152
}
153153

154154
states[current] = NodeState::Finished;
155-
postorder.push(current)
155+
postorder.push(current);
156156
}
157157

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

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

0 commit comments

Comments
 (0)