diff --git a/embassy-hal-common/src/drop.rs b/embassy-hal-common/src/drop.rs index 6ef716f9..7cd16aae 100644 --- a/embassy-hal-common/src/drop.rs +++ b/embassy-hal-common/src/drop.rs @@ -1,6 +1,7 @@ use core::mem; use core::mem::MaybeUninit; +#[must_use = "to delay the drop handler invokation to the end of the scope"] pub struct OnDrop { f: MaybeUninit, } @@ -27,6 +28,7 @@ impl Drop for OnDrop { /// /// To correctly dispose of this device, call the [defuse](struct.DropBomb.html#method.defuse) /// method before this object is dropped. +#[must_use = "to delay the drop bomb invokation to the end of the scope"] pub struct DropBomb { _private: (), }