summaryrefslogtreecommitdiff
path: root/tools/lib/python
diff options
context:
space:
mode:
authorGary Guo <gary@garyguo.net>2026-09-28 18:32:19 +0100
committerGary Guo <gary@garyguo.net>2026-09-30 15:56:21 +0100
commit158e85db3375c4b0b66223dee7aae16f2357aada (patch)
treee8456f03ff78514c42facaae609e5c6857f0df77 /tools/lib/python
parent95593ed3616194c9498cc190cd1a3693ff4bca37 (diff)
downloadlinux-next-158e85db3375c4b0b66223dee7aae16f2357aada.tar.gz
linux-next-158e85db3375c4b0b66223dee7aae16f2357aada.zip
rust: pin-init: internal: init: allow reborrow of `Pin<&mut T>` bindings
Use `let mut` for created bindings of initialized field, so `Pin<&mut T>` bindings may be reborrowed in subsequent initializers or code blocks. Without `let mut`, attempt to reborrow can produce error (and also a confusing fix): error[E0596]: cannot borrow `gpu` as mutable, as it is not declared as mutable --> drivers/gpu/nova-core/driver.rs:129:17 | 129 | gpu.as_mut().run_selftests(pdev); | ^^^ cannot borrow as mutable | help: consider changing this to be mutable | 119 | mut gpu <- Gpu::new( | +++ error: aborting due to 1 previous error Reported-by: Danilo Krummrich <dakr@kernel.org> Closes: https://lore.kernel.org/nova-gpu/DLQXWXRP3P1J.28SLFOJJQ2EDK@kernel.org/ Reviewed-by: Alexandre Courbot <acourbot@nvidia.com> Tested-by: Danilo Krummrich <dakr@kernel.org> Reviewed-by: Danilo Krummrich <dakr@kernel.org> Link: https://patch.msgid.link/20260928-dev-pin-init-sync-v1-1-e591c8e9cf0e@garyguo.net Signed-off-by: Gary Guo <gary@garyguo.net>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions