-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Eliminate word_and_empty
methods.
#140095
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
base: master
Are you sure you want to change the base?
Conversation
Some changes occurred in compiler/rustc_attr_parsing |
An opinionated PR, this one... sorry there are a bunch of changes in a single commit, it was hard to separate them out. Removing the functions that returned tuples was important, they got in the way of other changes. |
I see, well I'll take a look :) |
This helps with #137978. |
hm, would you mind at least making the removals from parser.rs a separate commit. I'm not 100% sure I agree with those removals. I intended those APIs to be for all the future attribute parsers that will be converted to a dedicated parser implementation. The reason I am kind of okay with it is because that some of those APIs were made before I allowed easy matching on attribute parsers, which really is a better API so maybe that's what we should switch to. But that'd still be nicer to discuss/refer to if it were a separate commit. I also quickly want to see whether some of my open but blocked PRs relied on those APIs just to see if I had very good reasons for them but I doubt it. |
To get rid of the `Ident::empty` uses. This requires introducing `PathParser::word_sym`, as an alternative to `PathParser::word`.
- Remove `MetaItemParser::{path,deconstruct}` and just get the two parsers one at a time. - Rename `MetaItemParser::path_without_args` as `MetaItemParser::path`, and avoid the clone. - Remove `MetaItemParser::{word,word_without_args,path_is}`, which are unused. - Remove `MetaItemListParser::all_{word,path}_list`, which are unused.
199d63d
to
1e9bad4
Compare
I have split it into two commits. |
To remove the last remaining
Ident::empty
uses.r? @jdonszelmann