-
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
Hir attributes #131808
base: master
Are you sure you want to change the base?
Hir attributes #131808
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as outdated.
This comment was marked as outdated.
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
=^.^=
This comment was marked as resolved.
This comment was marked as resolved.
1920abd
to
cefa0ea
Compare
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
11f9305
to
23fb500
Compare
This comment was marked as resolved.
This comment was marked as resolved.
23fb500
to
fe4f527
Compare
This comment was marked as outdated.
This comment was marked as outdated.
f080616
to
92d262d
Compare
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Change `AttrArgs::Eq` to a struct variant Cleanups for simplifying rust-lang#131808 Basically changes `AttrArgs::Eq` to a struct variant and then avoids several matches on `AttrArgsEq` in favor of methods on it. This will make future refactorings simpler, as they can either keep methods or switch to field accesses without having to restructure code
Rollup merge of rust-lang#133746 - oli-obk:push-xwyrylxmrtvq, r=jieyouxu Change `AttrArgs::Eq` to a struct variant Cleanups for simplifying rust-lang#131808 Basically changes `AttrArgs::Eq` to a struct variant and then avoids several matches on `AttrArgsEq` in favor of methods on it. This will make future refactorings simpler, as they can either keep methods or switch to field accesses without having to restructure code
92d262d
to
340edd0
Compare
I rebased the PR, reordered some commits and squashed the clippy/rustdoc/rustfmt commits into the main commit. Each commit now builds on its own and does the minimal work necessary to get to a new compiling state. The middle commit is subsequently huge, but that's unavoidable for something like adding hir::Attribute |
This comment has been minimized.
This comment has been minimized.
340edd0
to
6ecd91c
Compare
Change `AttrArgs::Eq` to a struct variant Cleanups for simplifying rust-lang/rust#131808 Basically changes `AttrArgs::Eq` to a struct variant and then avoids several matches on `AttrArgsEq` in favor of methods on it. This will make future refactorings simpler, as they can either keep methods or switch to field accesses without having to restructure code
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.AttributeExt
is added, which is implemented for bothast::Attribute
andhir::Atribute
. This makeshir::Attributes
mostly compatible with code that used to parseast::Attribute
. All its methods are also added as inherent methods to avoid having to import the trait everywhere in the compiler.ast::Attribute
at all.