Re: [PATCH v3 1/7] rust: types: rename ForLt to CovariantForLt

From: Gary Guo

Date: Wed Jun 24 2026 - 11:26:18 EST


On Fri Jun 19, 2026 at 12:08 AM BST, Danilo Krummrich wrote:
> Rename ForLt to CovariantForLt to prepare for the introduction of a new
> ForLt base trait that does not require covariance.
>
> The existing ForLt trait requires covariance, which enables the safe
> cast_ref() method. This rename preserves the same semantics under a more
> precise name, making room for a weaker ForLt trait in a subsequent
> commit.
>
> No functional change.
>
> Signed-off-by: Danilo Krummrich <dakr@xxxxxxxxxx>

Reviewed-by: Gary Guo <gary@xxxxxxxxxxx>

> ---
> drivers/gpu/nova-core/driver.rs | 4 +-
> rust/kernel/auxiliary.rs | 23 +++++------
> rust/kernel/types.rs | 2 +-
> rust/kernel/types/for_lt.rs | 57 ++++++++++++++-------------
> rust/macros/for_lt.rs | 2 +-
> rust/macros/lib.rs | 11 +++---
> samples/rust/rust_driver_auxiliary.rs | 8 ++--
> 7 files changed, 54 insertions(+), 53 deletions(-)