On Mon Sep 28, 2026 at 1:36 PM CEST, Gary Guo wrote:
> I think this doesn't need to use `pin_chain`? You can do
>
>     gpu <- ...,
>
>     _: {
>         #[cfg(...)]
>         gpu.run_self_tests(pdev);
>     }

Unfortunately, this produces the following error.

        error[E0382]: borrow of moved value: `gpu`
           --> drivers/gpu/nova-core/driver.rs:140:62
            |
        119 |             gpu <- Gpu::new(
            |             --- move occurs because `gpu` has type 
`core::pin::Pin<&mut gpu::Gpu<'_>>`, which does not implement the `Copy` trait
        ...
        129 |                 gpu.run_selftests(pdev);
            |                 --- value moved here
        ...
        140 |                     
Pin::new_unchecked(&*core::ptr::from_ref(gpu.as_ref().get_ref()))
            |                                                              ^^^ 
value borrowed here after move
        
        error: aborting due to 1 previous error

Reply via email to