Skip to content

Ditch parse_in_attr - #67052

Merged
bors merged 3 commits into
rust-lang:masterfrom
Centril:config-1
Dec 7, 2019
Merged

Ditch parse_in_attr#67052
bors merged 3 commits into
rust-lang:masterfrom
Centril:config-1

Conversation

@Centril

Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
ContributorAuthor

cc @estebank

@bors

This comment has been minimized.

Comment threadsrc/librustc_parse/validate_attr.rs Outdated
Comment threadsrc/libsyntax_expand/proc_macro.rs Outdated
Comment threadsrc/libsyntax_expand/proc_macro.rs Outdated
@petrochenkovpetrochenkov 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
@CentrilCentril 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
Copy Markdown
ContributorAuthor

@petrochenkov Addressed the review comments.

@petrochenkov

Copy link
Copy Markdown
Contributor

@bors r+

@bors

bors commented Dec 6, 2019

Copy link
Copy Markdown
Collaborator

📌 Commit 99191c2 has been approved by petrochenkov

@borsbors 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
@CentrilCentril mentioned 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:masterDec 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
Copy Markdown
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
Copy Markdown
ContributorAuthor

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
Copy Markdown
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
Fixesrust-lang#69341 which was injected by rust-lang#67052.
r? @petrochenkov
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: 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

@Centril@bors@petrochenkov@estebank@rust-highfive