diff --git a/src/nouveau/compiler/nak/builder.rs b/src/nouveau/compiler/nak/builder.rs index 160efd2924f..60651e6f1c4 100644 --- a/src/nouveau/compiler/nak/builder.rs +++ b/src/nouveau/compiler/nak/builder.rs @@ -12,7 +12,7 @@ pub trait Builder { self.push_instr(Instr::new_boxed(op)) } - fn predicate<'a>(&'a mut self, pred: Pred) -> PredicatedBuilder<'a, Self> + fn predicate(&mut self, pred: Pred) -> PredicatedBuilder<'_, Self> where Self: Sized, { diff --git a/src/nouveau/compiler/nak/cfg.rs b/src/nouveau/compiler/nak/cfg.rs index 33303d4302a..8ca7323e319 100644 --- a/src/nouveau/compiler/nak/cfg.rs +++ b/src/nouveau/compiler/nak/cfg.rs @@ -329,7 +329,7 @@ impl CFG { &self.nodes[idx].pred[..] } - pub fn drain<'a>(&'a mut self) -> impl Iterator + 'a { + pub fn drain(&mut self) -> impl Iterator + '_ { self.has_loop = false; self.nodes.drain(..).map(|n| n.node) } diff --git a/src/nouveau/compiler/nak/from_nir.rs b/src/nouveau/compiler/nak/from_nir.rs index af33238a9d2..b8a241c8b41 100644 --- a/src/nouveau/compiler/nak/from_nir.rs +++ b/src/nouveau/compiler/nak/from_nir.rs @@ -2787,10 +2787,10 @@ impl<'a> ShaderFromNir<'a> { b.push_op(OpFSOut { srcs: srcs }); } - fn parse_block<'b>( + fn parse_block( &mut self, ssa_alloc: &mut SSAValueAllocator, - phi_map: &mut PhiAllocMap<'b>, + phi_map: &mut PhiAllocMap, nb: &nir_block, ) { let mut b = SSAInstrBuilder::new(self.info.sm, ssa_alloc); @@ -2933,29 +2933,29 @@ impl<'a> ShaderFromNir<'a> { self.cfg.add_node(nb.index, bb); } - fn parse_if<'b>( + fn parse_if( &mut self, ssa_alloc: &mut SSAValueAllocator, - phi_map: &mut PhiAllocMap<'b>, + phi_map: &mut PhiAllocMap, ni: &nir_if, ) { self.parse_cf_list(ssa_alloc, phi_map, ni.iter_then_list()); self.parse_cf_list(ssa_alloc, phi_map, ni.iter_else_list()); } - fn parse_loop<'b>( + fn parse_loop( &mut self, ssa_alloc: &mut SSAValueAllocator, - phi_map: &mut PhiAllocMap<'b>, + phi_map: &mut PhiAllocMap, nl: &nir_loop, ) { self.parse_cf_list(ssa_alloc, phi_map, nl.iter_body()); } - fn parse_cf_list<'b>( + fn parse_cf_list( &mut self, ssa_alloc: &mut SSAValueAllocator, - phi_map: &mut PhiAllocMap<'b>, + phi_map: &mut PhiAllocMap, list: ExecListIter, ) { for node in list { diff --git a/src/nouveau/compiler/nak/liveness.rs b/src/nouveau/compiler/nak/liveness.rs index 16f883345f2..addbff2ffc2 100644 --- a/src/nouveau/compiler/nak/liveness.rs +++ b/src/nouveau/compiler/nak/liveness.rs @@ -428,7 +428,7 @@ impl NextUseBlockLiveness { } /// Returns an iterator over all the values which are live-in to this block - pub fn iter_live_in<'a>(&'a self) -> impl Iterator { + pub fn iter_live_in(&self) -> impl Iterator { self.ssa_map.iter().filter_map(|(ssa, entry)| { if entry.defined || entry.uses.is_empty() { None diff --git a/src/nouveau/compiler/nak/nir.rs b/src/nouveau/compiler/nak/nir.rs index 9b08de8567f..ddd7a3beca5 100644 --- a/src/nouveau/compiler/nak/nir.rs +++ b/src/nouveau/compiler/nak/nir.rs @@ -151,11 +151,11 @@ impl AsConst for nir_src { } pub trait AsDef { - fn as_def<'a>(&'a self) -> &'a nir_def; + fn as_def(&self) -> &nir_def; } impl AsDef for nir_def { - fn as_def<'a>(&'a self) -> &'a nir_def { + fn as_def(&self) -> &nir_def { self } } @@ -176,7 +176,7 @@ impl NirValue for T { } impl AsDef for nir_src { - fn as_def<'a>(&'a self) -> &'a nir_def { + fn as_def(&self) -> &nir_def { unsafe { &*self.ssa } } } @@ -220,7 +220,7 @@ impl NirSrcsAsSlice for nir_alu_instr { } impl AsDef for nir_alu_src { - fn as_def<'a>(&'a self) -> &'a nir_def { + fn as_def(&self) -> &nir_def { self.src.as_def() } } diff --git a/src/nouveau/compiler/nak/repair_ssa.rs b/src/nouveau/compiler/nak/repair_ssa.rs index e5cba108fee..6fb940d4cfb 100644 --- a/src/nouveau/compiler/nak/repair_ssa.rs +++ b/src/nouveau/compiler/nak/repair_ssa.rs @@ -80,7 +80,7 @@ fn get_ssa_or_phi( } } -fn get_or_insert_phi_dsts<'a>(bb: &'a mut BasicBlock) -> &'a mut OpPhiDsts { +fn get_or_insert_phi_dsts(bb: &mut BasicBlock) -> &mut OpPhiDsts { let has_phi = match &bb.instrs[0].op { Op::PhiDsts(_) => true, _ => false, @@ -94,7 +94,7 @@ fn get_or_insert_phi_dsts<'a>(bb: &'a mut BasicBlock) -> &'a mut OpPhiDsts { } } -fn get_or_insert_phi_srcs<'a>(bb: &'a mut BasicBlock) -> &'a mut OpPhiSrcs { +fn get_or_insert_phi_srcs(bb: &mut BasicBlock) -> &mut OpPhiSrcs { let mut has_phi = false; let mut ip = bb.instrs.len(); for (i, instr) in bb.instrs.iter_mut().enumerate().rev() {