Skip to content
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

Merged
merged 3 commits into from
Dec 7, 2019
Merged

Ditch parse_in_attr #67052

merged 3 commits into from
Dec 7, 2019

Conversation

Centril
Copy link
Contributor

@Centril Centril commented Dec 5, 2019

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 5, 2019
@Centril
Copy link
Contributor Author

Centril commented Dec 5, 2019

cc @estebank

@bors

This comment has been minimized.

src/librustc_parse/validate_attr.rs Outdated Show resolved Hide resolved
src/libsyntax_expand/proc_macro.rs Outdated Show resolved Hide resolved
src/libsyntax_expand/proc_macro.rs Outdated Show resolved Hide resolved
@petrochenkov petrochenkov added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 6, 2019
@Centril Centril added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Dec 6, 2019
@Centril
Copy link
Contributor Author

Centril commented Dec 6, 2019

@petrochenkov Addressed the review comments.

@petrochenkov
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Dec 6, 2019

📌 Commit 99191c2 has been approved by petrochenkov

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 6, 2019
Centril added a commit to Centril/rust that referenced this pull request Dec 6, 2019
bors added a commit that referenced this pull request Dec 6, 2019
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
@bors bors merged commit 99191c2 into rust-lang:master Dec 7, 2019
@Centril Centril deleted the config-1 branch December 7, 2019 02:46
--> $DIR/cfg-attr-parse.rs:50:18
|
LL | #[cfg_attr{all(),,}]
| ^ expected identifier
Copy link
Contributor

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?

Copy link
Contributor Author

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😍

Centril added a commit to Centril/rust that referenced this pull request Feb 28, 2020
error_derive_forbidden_on_non_adt: be more graceful

Fixes rust-lang#69341 which was injected by rust-lang#67052.

r? @petrochenkov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Avoid re-parsing with parse_in_attr
5 participants