-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Ditch parse_in_attr
#67052
Ditch parse_in_attr
#67052
Conversation
cc @estebank |
This comment has been minimized.
This comment has been minimized.
@petrochenkov Addressed the review comments. |
@bors r+ |
📌 Commit 99191c2 has been approved by |
Ditch `parse_in_attr` Fixes rust-lang#66940 r? @petrochenkov
Rollup of 10 pull requests Successful merges: - #66606 (Add feature gate for mut refs in const fn) - #66841 (Add `{f32,f64}::approx_unchecked_to<Int>` unsafe methods) - #67009 (Emit coercion suggestions in more places) - #67052 (Ditch `parse_in_attr`) - #67071 (Do not ICE on closure typeck) - #67078 (accept union inside enum if not followed by identifier) - #67090 (Change "either" to "any" in Layout::from_size_align's docs) - #67092 (Fix comment typos in src/libcore/alloc.rs) - #67094 (get rid of __ in field names) - #67102 (Add note to src/ci/docker/README.md about multiple docker images) Failed merges: - #67101 (use `#[allow(unused_attributes)]` to paper over incr.comp problem) r? @ghost
--> $DIR/cfg-attr-parse.rs:50:18 | ||
| | ||
LL | #[cfg_attr{all(),,}] | ||
| ^ expected identifier |
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.
From personal experience trailing commas seems like a good case to account for in the parser, in the same way we account for extra and missing semicolons. What do you think?
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 you use the standard list parsers then it is handled automatically, and otherwise it's not worth it I'd say.
| | ||
LL | #[derive(Copy="bad")] | ||
| ^ expected one of `)`, `,`, or `::` | ||
| ^^^^^^ help: remove the value |
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.
😍
error_derive_forbidden_on_non_adt: be more graceful Fixes rust-lang#69341 which was injected by rust-lang#67052. r? @petrochenkov
Fixes #66940
r? @petrochenkov