-
Notifications
You must be signed in to change notification settings - Fork 204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Module::add_item
#5875
Comments
I was actually wondering if this should be the only way to add new items to a program. For example, if you have two annotations on a module: #[one]
mod foo {
#![two]
} if there are functions |
@asterite I think I would expect both to be inserted within |
Sounds good, I'll capture an issue for this and likely work on it today. |
# Description ## Problem Resolves #5875 (comment) ## Summary ## Additional Context ## Documentation Check one: - [x] No documentation needed. - [ ] Documentation included in this PR. - [ ] **[For Experimental Features]** Documentation to be submitted in a separate PR. # PR Checklist - [x] I have tested the changes locally. - [x] I have formatted the changes with [Prettier](https://prettier.io/) and/or `cargo fmt` on default settings. --------- Co-authored-by: jfecher <[email protected]> Co-authored-by: Jake Fecher <[email protected]>
# Description ## Problem Resolves #5875 ## Summary ## Additional Context ## Documentation Check one: - [ ] No documentation needed. - [x] Documentation included in this PR. - [ ] **[For Experimental Features]** Documentation to be submitted in a separate PR. # PR Checklist - [x] I have tested the changes locally. - [x] I have formatted the changes with [Prettier](https://prettier.io/) and/or `cargo fmt` on default settings.
Problem
(From a slack request)
Given just a
Module
metaprogramming object, there is no way to add additional functions or types to the module.Happy Case
We add the function:
To add a top-level item to the module.
Workaround
None
Workaround Description
No response
Additional Context
No response
Project Impact
None
Blocker Context
No response
Would you like to submit a PR for this Issue?
None
Support Needs
No response
The text was updated successfully, but these errors were encountered: