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
The above code block could be used at a crate-level to define crate-level since and item-info values.
As far as I can tell, the main challenge will be identifying whether the attribute is in an inner or outer position. The way to tell seems to be to check for pub mod { ... }. As I understand, pub mod {} is not valid in any other context, and is only wrapped around the full crate's code. As far as being used as an inner-attribute in other contexts, that may require more investigation surrounding what is passed in as the item TokenStream.
Each attribute could potentially be used as an inner attribute.
The above code block could be used at a crate-level to define crate-level
since
anditem-info
values.As far as I can tell, the main challenge will be identifying whether the attribute is in an inner or outer position. The way to tell seems to be to check for
pub mod { ... }
. As I understand,pub mod {}
is not valid in any other context, and is only wrapped around the full crate's code. As far as being used as an inner-attribute in other contexts, that may require more investigation surrounding what is passed in as the itemTokenStream
.Note that this usage would require
nightly
, withcustom_inner_attributes
enabled.The text was updated successfully, but these errors were encountered: