-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Better attribute and metaitem encapsulation throughout the compiler #34842
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @nrc (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
cc @Manishearth |
Shouldn't be breaking cc @dtolnay |
} | ||
}; | ||
let metas = if let Some(metas) = meta.meta_item_list() { | ||
metas |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think should be indented just once.
☔ The latest upstream changes (presumably #34789) made this pull request unmergeable. Please resolve the merge conflicts. |
// ast::LitKind::FloatUnsuffixed(ref f) => f.to_string(), | ||
// ast::LitKind::Bool(b) => b.to_string(), | ||
// } | ||
// } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we don't need this code then delete it.
2bacc2e
to
addbc02
Compare
} else { | ||
out.push(Err(meta.span)); | ||
return out; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: 2-space indent
r = me with indenting nit and tests fixed |
@bors: r+ |
📌 Commit 0518021 has been approved by |
⌛ Testing commit 0518021 with merge 8a98905... |
💔 Test failed - auto-win-gnu-32-opt-rustbuild |
@bors: retry On Tue, Jul 19, 2016 at 9:27 PM, bors [email protected] wrote:
|
☔ The latest upstream changes (presumably #34113) made this pull request unmergeable. Please resolve the merge conflicts. |
🔒 Merge conflict |
@alexcrichton Will you kick off bors again? |
@bors: retry |
⌛ Testing commit 5553901 with merge f164cf5... |
Better attribute and metaitem encapsulation throughout the compiler This PR refactors most (hopefully all?) of the `MetaItem` interactions outside of `libsyntax` (and a few inside) to interact with MetaItems through the provided traits instead of directly creating / destruct / matching against them. This is a necessary first step to eventually converting `MetaItem`s to internally use `TokenStream` representations (which will make `MetaItem` interactions much nicer for macro writers once the new macro system is in place). r? @nrc
This PR refactors most (hopefully all?) of the
MetaItem
interactions outside oflibsyntax
(and a few inside) to interact with MetaItems through the provided traits instead of directly creating / destruct / matching against them. This is a necessary first step to eventually convertingMetaItem
s to internally useTokenStream
representations (which will makeMetaItem
interactions much nicer for macro writers once the new macro system is in place).r? @nrc