nak,nil: elide lifetimes where possible

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34372>
This commit is contained in:
Seán de Búrca 2025-04-03 18:39:23 -07:00 committed by Marge Bot
parent e4f045df58
commit e559c63fd8
3 changed files with 11 additions and 11 deletions

View file

@ -954,7 +954,7 @@ impl SSAInstrBuilder<'_> {
}
}
impl<'a> Builder for SSAInstrBuilder<'a> {
impl Builder for SSAInstrBuilder<'_> {
fn push_instr(&mut self, instr: Box<Instr>) -> &mut Instr {
self.b.push_instr(instr)
}
@ -964,7 +964,7 @@ impl<'a> Builder for SSAInstrBuilder<'a> {
}
}
impl<'a> SSABuilder for SSAInstrBuilder<'a> {
impl SSABuilder for SSAInstrBuilder<'_> {
fn alloc_ssa(&mut self, file: RegFile) -> SSAValue {
self.alloc.alloc(file)
}
@ -979,7 +979,7 @@ pub struct PredicatedBuilder<'a, T: Builder> {
pred: Pred,
}
impl<'a, T: Builder> Builder for PredicatedBuilder<'a, T> {
impl<T: Builder> Builder for PredicatedBuilder<'_, T> {
fn push_instr(&mut self, instr: Box<Instr>) -> &mut Instr {
let mut instr = instr;
assert!(instr.pred.is_true());
@ -992,7 +992,7 @@ impl<'a, T: Builder> Builder for PredicatedBuilder<'a, T> {
}
}
impl<'a, T: SSABuilder> SSABuilder for PredicatedBuilder<'a, T> {
impl<T: SSABuilder> SSABuilder for PredicatedBuilder<'_, T> {
fn alloc_ssa(&mut self, file: RegFile) -> SSAValue {
self.b.alloc_ssa(file)
}
@ -1013,7 +1013,7 @@ impl<'a, T: Builder> UniformBuilder<'a, T> {
}
}
impl<'a, T: Builder> Builder for UniformBuilder<'a, T> {
impl<T: Builder> Builder for UniformBuilder<'_, T> {
fn push_instr(&mut self, instr: Box<Instr>) -> &mut Instr {
self.b.push_instr(instr)
}
@ -1023,7 +1023,7 @@ impl<'a, T: Builder> Builder for UniformBuilder<'a, T> {
}
}
impl<'a, T: SSABuilder> SSABuilder for UniformBuilder<'a, T> {
impl<T: SSABuilder> SSABuilder for UniformBuilder<'_, T> {
fn alloc_ssa(&mut self, file: RegFile) -> SSAValue {
let file = if self.uniform {
file.to_uniform().unwrap()

View file

@ -399,7 +399,7 @@ impl<'a> SpillChooser<'a> {
}
}
impl<'a> IntoIterator for SpillChooser<'a> {
impl IntoIterator for SpillChooser<'_> {
type Item = SSAValue;
type IntoIter = SpillChoiceIter;

View file

@ -97,8 +97,8 @@ fn nvb097_th_bl_source(
type THBitView<'a> = BitMutView<'a, [u32; 8]>;
fn nv9097_set_th_v2_0<'a>(
th: &mut THBitView<'a>,
fn nv9097_set_th_v2_0(
th: &mut THBitView<'_>,
format: &Format,
swizzle: [nil_rs_bindings::pipe_swizzle; 4],
) {
@ -122,8 +122,8 @@ fn nv9097_set_th_v2_0<'a>(
th.set_field(cl9097::TEXHEADV2_W_SOURCE, source[3]);
}
fn nvb097_set_th_bl_0<'a>(
th: &mut THBitView<'a>,
fn nvb097_set_th_bl_0(
th: &mut THBitView<'_>,
format: &Format,
swizzle: [nil_rs_bindings::pipe_swizzle; 4],
) {