-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Move attribute validation from rustc_parse
to rustc_attr_parsing
#143963
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?
Move attribute validation from rustc_parse
to rustc_attr_parsing
#143963
Conversation
This comment has been minimized.
This comment has been minimized.
☔ The latest upstream changes (presumably #143958) made this pull request unmergeable. Please resolve the merge conflicts. |
78e9f18
to
89169bd
Compare
This comment has been minimized.
This comment has been minimized.
b166f19
to
6b0c356
Compare
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
rustc_parse
to rustc_attr_parsing
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
6b0c356
to
4091a29
Compare
id: S::Id, | ||
emit_lint: &mut impl FnMut(AttributeLint<S::Id>), | ||
) { | ||
let builtin_attr_info = attr.ident().and_then(|ident| BUILTIN_ATTRIBUTE_MAP.get(&ident.name)); |
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.
This PR still gets safety information of attributes from BUILTIN_ATTRIBUTE_MAP
.
The BUILTIN_ATTRIBUTES
global duplicates quite some information (templates, encode cross crate, duplicate logic) from the new parsers. Is the long term goal to remove this global? If yes, I can also make a new match statement somewhere to store this information
@rustbot ready I don't expect this PR to have a performance effect but it should definitely get a perf run. Could you do this? |
|
Some changes occurred in compiler/rustc_attr_data_structures Some changes occurred in compiler/rustc_attr_parsing These commits modify the If this was unintentional then you should revert the changes before this PR is merged. |
The job Click to see the possible cause of the failure (guessed by this bot)
|
Ok now how did I break incremental compilation?... |
Reminder, once the PR becomes ready for a review, use |
This moves the old attribute validation from
rustc_parse
torustc_attr_parsing
.This PR is easiest to review commit-by-commit.
This is part 1 of 2, of a fix for #143940, the perfomance regression caused by #143460.
This PR does not yet fix the performance regression but does the refactoring work to prepare for fixing it. After all these changes there should be no functional change to the compiler, other than some re-ordering of the errors.