summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorDanilo Krummrich <dakr@kernel.org>2026-05-25 23:21:10 +0300
committerDanilo Krummrich <dakr@kernel.org>2026-05-27 17:27:28 +0300
commit4555291ddae9abe2c40a7eae192b1976b07a1fad (patch)
tree8418932505f646ddb7758774938f01c81fba0983 /include/linux
parente189bdb687a56bcf389798f1d3a2f261fff2ef54 (diff)
downloadlinux-4555291ddae9abe2c40a7eae192b1976b07a1fad.tar.xz
rust: auxiliary: generalize Registration over ForLt
Generalize Registration<T> to Registration<F: ForLt> and Device::registration_data<F: ForLt>() to return Pin<&F::Of<'_>>. The stored 'static lifetime is shortened to the borrow lifetime of &self via ForLt::cast_ref; ForLt's covariance guarantee makes this sound. Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Reviewed-by: Alexandre Courbot <acourbot@nvidia.com> Reviewed-by: Eliot Courtney <ecourtney@nvidia.com> Reviewed-by: Gary Guo <gary@garyguo.net> Link: https://patch.msgid.link/20260525202921.124698-24-dakr@kernel.org [ Use PhantomData<F::Of<'a>> instead of PhantomData<(fn(&'a ()) -> &'a (), F)>], which also gets us rid of #[allow(clippy::type_complexity)]. - Danilo ] Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions