Skip to content

allow syntax::ext::base::MultiItemModifier to return multiple items #34223

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
llogiq opened this issue Jun 11, 2016 · 1 comment
Closed

allow syntax::ext::base::MultiItemModifier to return multiple items #34223

llogiq opened this issue Jun 11, 2016 · 1 comment

Comments

@llogiq
Copy link
Contributor

llogiq commented Jun 11, 2016

As of yet, MultiItemModifiers can only return a single item, which can lead to problems with expanding macros or preprending items, e.g. extern crate foo; use foo::bar to avoid requiring users to manually import items.

A simple solution would be to change Annotatable to work on SmallVecs of Items/TraitItems/ImplItems. However, this would break all procedural macros using this interface.

@jseyfried
Copy link
Contributor

@llogiq c.f. #34253

bors added a commit that referenced this issue Jun 23, 2016
Allow `MultiItemModifier`s to expand into zero or many items

Fixes #34223.
r? @nrc
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants