Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
tag_safe
This is a linter designed originally for use with a kernel, where functions need to be marked as "IRQ safe" (meaning they are safe to call within an IRQ handler, and handle the case where they may interrupt themselves).
Detailed
If a function is annotated with #[tag_safe(ident)]
(where ident
can be anything, and defines the type of safety) this linter will check that call functions called by that function either have that same annotation, or don't call any function with the reverse #[tag_unsafe(ident)]
annotation.
By default this lint is a warning, in functions that internally ensure safety it can be turned off with #[allow(not_tagged_safe)]
, and for functions that require safety it can be made an error with #[deny(not_tagged_safe)]
Usage
Below is an example of using this flag to prevent accidentally using an IRQ-unsafe method in an IRQ handler.
(Assume the lock used by acquire_irq_spinlock
is different to the one acquired by acquire_non_irq_spinlock
)
/// RAII primitive spinlock
;
/// Handle to said spinlock
;
/// RAII IRQ hold
;
/// Spinlock that also disables IRQs
;
static S_NON_IRQ_SPINLOCK: Spinlock = Spinlock;
static S_IRQ_SPINLOCK: IrqSpinlock = IrqSpinlock;
// Make the lint an error
// Require this method be IRQ safe
// This method handles IRQ safety internally, and hence makes
// this lint allowable.
// Stop IRQs from firing until the returned value is dropped
// Not safe to call in an IRQ without protection (as that can lead to a
// uniprocessor deadlock)