PermitSborAttributes

Derive Macro PermitSborAttributes 

Source
#[derive(PermitSborAttributes)]
{
    // Attributes available to this derive:
    #[sbor]
}
Expand description

An empty derive which exists solely to allow the helper “sbor” attribute to be used without generating a compile error.

The intended use-case is as a utility for building other macros, which wish to add sbor attribute annotations to types for when they do use an Sbor derive - but wish to avoid the following error when they don’t:

error: cannot find attribute `sbor` in this scope

Ideally this would output an empty token stream, but instead we return a simply comment, to avoid the proc macro system thinking the macro build has broken and returning this error:

proc macro `PermitSborAttributes` not expanded: internal error