-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Hir attributes #131808
base: master
Are you sure you want to change the base?
Hir attributes #131808
Conversation
Could not assign reviewer from: |
r? @fee1-dead rustbot has assigned @fee1-dead. Use |
This comment has been minimized.
This comment has been minimized.
cc2499a
to
6e0f96e
Compare
cf3179b
to
e3133bb
Compare
This comment has been minimized.
This comment has been minimized.
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.
The Clippy changes look good to me :D
=^.^=
These commits modify the If this was unintentional then you should revert the changes before this PR is merged. Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt Some changes occurred in src/tools/clippy cc @rust-lang/clippy Some changes occurred in coverage instrumentation. cc @Zalathar Some changes occurred in src/tools/rustfmt cc @rust-lang/rustfmt Some changes occurred in src/librustdoc/clean/types.rs cc @camelid Changes to the size of AST and/or HIR nodes. cc @nnethercote Some changes occurred in compiler/rustc_sanitizers cc @rust-lang/project-exploit-mitigations, @rcvalle |
1920abd
to
cefa0ea
Compare
I see this line:
replaced with this line lower down:
So the size has tripled? |
I think you're right. This slipped through while it really shouldn't have, investigating... It seems that I forgot a layer of indirection which |
cefa0ea
to
40a7a2f
Compare
@nnethercote well that did it, the file even disappeared from the diff cause they're equal now 😊 |
db44f71
to
823a920
Compare
823a920
to
0ab8f09
Compare
☔ The latest upstream changes (presumably #131892) made this pull request unmergeable. Please resolve the merge conflicts. |
…eplacement for most places currently accepting ast::Attribute
Co-authored-by: xFrednet <xFrednet@gmail.com>
0ab8f09
to
64dbe9d
Compare
This PR needs some explanation, it's somewhat large.
hir::Attribute
which is a lowered version ofast::Attribute
. Right now, this has few concrete effects, however every place that after this PR parses ahir::Attribute
should later get a pre-parsed attribute as described in Attribute handling reworks compiler-team#796 and transitively Refactoring attributes in the compiler #131229.ast::Attribute
because some parts are not necessary anymore. They used to modelhir
-specfic parts of attributes even though they were part of theast
AttributeExt
which is implemented for bothast::Attribute
andhir::Atribute
. This makeshir::Attributes
mostly compatible with code that used to parseast::Attribute
. Some day I hope I can remove this trait, once parsing happens in a central location but for now it's a useful abstractionhir::Attribute
.ast::Attribute
but should really refer tohir::Attribute
. This is mostly just fixing up imports.ast::Attribute
. This also removes some assertions that were necessary because the typeast::Attribute
did not model the fact that certain values should not exist anymore while hashing.hir::Attribute
nowhir::Attribute
. The one for clippy is largest, and was made in a call together with @xFrednet who signed off on it.Attribute
didn't used to be in there. Another test also changed, but it seems for the better. I'm unsure what I did to change it but I looked at it with Fred and we agreed that the new result is actually preferable.Finally, I may have broken intra-doc links with something. As far as I know, this is nothing fundamental, just a dumb mistake somewhere. I'm still debugging that, hence this is a draft PR but in fairness all the complicated logic is done.
r? @oli-obk