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
I would like to use custom attributes to feature guard bindings based on information in the doc comment.
E.g. if the doc comment contains @since 10, I would like to generate
#[cfg(feature = "api-10")]
<the item>
Currently, add_attributes seems to only support structs, enums and unions. I would like to also have support for functions and ideally also enum variants.
Would a PR that adds function support to add_attributes() be accepted?
CC @mkroening Any technical reason your PR did not implement support for functions, or did you just not need it for your usecase?
Edit: It seems that it also is not possible / intended to add attributes during the processing of the doc comment callback, so that would also need to be changed to support my usecase.
The text was updated successfully, but these errors were encountered:
I would like to use custom attributes to feature guard bindings based on information in the doc comment.
E.g. if the doc comment contains
@since 10
, I would like to generateCurrently,
add_attributes
seems to only support structs, enums and unions. I would like to also have support for functions and ideally also enum variants.Would a PR that adds function support to
add_attributes()
be accepted?CC @mkroening Any technical reason your PR did not implement support for functions, or did you just not need it for your usecase?
Edit: It seems that it also is not possible / intended to add attributes during the processing of the doc comment callback, so that would also need to be changed to support my usecase.
The text was updated successfully, but these errors were encountered: