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 std::marker::PhantomData;use std::sync::Arc;#[ouroboros::self_referencing]structS{data:Arc<[u8]>,#[borrows(data)]#[covariant]value:F<'this>,}structF<'a>{_phantom:PhantomData<&'a ()>,}fnmain(){println!("Hello, world!");}
And the clippy warnings:
warning: call to `std::mem::drop` with a value that does not implement `Drop`. Dropping such a type only extends its contained lifetimes
--> src/main.rs:3:1
|
3 | #[ouroboros::self_referencing]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(clippy::drop_non_drop)]` on by default
note: argument has type `F`
--> src/main.rs:3:1
|
3 | #[ouroboros::self_referencing]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#drop_non_drop
= note: this warning originates in the attribute macro `ouroboros::self_referencing` (in Nightly builds, run with -Z macro-backtrace for more info)
The text was updated successfully, but these errors were encountered:
Minimal example:
And the clippy warnings:
The text was updated successfully, but these errors were encountered: