Function remove_item_attrs

Source
pub fn remove_item_attrs(item: &str) -> Result<String, &'static str>
Expand description

Remove the attributes and doc comments of a stringified item,useful for write procedural macro attributes.

§Errors

This function will throw an error if encounters any unmatched delimiter(“[]”, “{}”, “()”, “<>”) while trying to remove the attributes,in the attributes and their delimiters.

This function also remove comments so in the future the name can change.