diff --git a/src/gallium/frontends/rusticl/api/icd.rs b/src/gallium/frontends/rusticl/api/icd.rs index a72a9fcf217..a0ede4cb640 100644 --- a/src/gallium/frontends/rusticl/api/icd.rs +++ b/src/gallium/frontends/rusticl/api/icd.rs @@ -231,7 +231,7 @@ pub trait ReferenceCountedAPIPointer { } } - fn get_ref(&self) -> CLResult<&'static T> { + fn get_ref(&self) -> CLResult<&T> { unsafe { Ok(self.get_ptr()?.as_ref().unwrap()) } } @@ -272,9 +272,9 @@ pub trait ReferenceCountedAPIPointer { Ok(res) } - fn get_ref_vec_from_arr(objs: *const Self, count: u32) -> CLResult> + fn get_ref_vec_from_arr<'a>(objs: *const Self, count: u32) -> CLResult> where - Self: Sized, + Self: Sized + 'a, { // CL spec requires validation for obj arrays, both values have to make sense if objs.is_null() && count > 0 || !objs.is_null() && count == 0 {