You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Use Option<&X> in case the linker inserts some stray nulls, as we think// it might on Windows.//// See <https://devblogs.microsoft.com/oldnewthing/20181108-00/?p=100165>.#[linkme::distributed_slice]pubstaticWORKERS:[Option<&'staticRegisteredWorker>] = [..];// Always have at least one entry to work around linker bugs.//// See <https://github.com/llvm/llvm-project/issues/65855>.#[linkme::distributed_slice(WORKERS)]staticWORKAROUND:Option<&'staticRegisteredWorker> = None;
Output:
warning: since `&` implements the `Copy` trait, `&Option<&T>` can be simplified to `Option<&T>`
--> support/mesh/mesh_worker/src/worker.rs:624:5
|
624 | #[linkme::distributed_slice(WORKERS)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ref_option_ref
= note: requested on the command line with `-W clippy::ref-option-ref`
= note: this warning originates in the attribute macro `linkme::distributed_slice` (in Nightly builds, run with -Z macro-backtrace for more info)
The text was updated successfully, but these errors were encountered:
This does not occur on v0.3.24. Encountered this when trying to update OpenVMM to v0.3.30.
Code example:
Output:
The text was updated successfully, but these errors were encountered: