Skip to content

[cfg_match] Document the use of expressions. #135625

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

Merged
merged 1 commit into from
Jan 29, 2025

Conversation

c410-f3r
Copy link
Contributor

@c410-f3r c410-f3r commented Jan 17, 2025

cc #115585

Adds documentation to this new feature introduced in #133720.

@rustbot
Copy link
Collaborator

rustbot commented Jan 17, 2025

r? @joboet

rustbot has assigned @joboet.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jan 17, 2025
@rust-log-analyzer

This comment has been minimized.

@ehuss
Copy link
Contributor

ehuss commented Jan 17, 2025

Can you remove all of the submodule updates?

@c410-f3r c410-f3r force-pushed the cfg-match-foo-bar-baz branch from 90608ee to 5844eac Compare January 17, 2025 15:30
@c410-f3r
Copy link
Contributor Author

c410-f3r commented Jan 21, 2025

r? T-libs

@rustbot rustbot assigned tgross35 and jhpratt and unassigned joboet and tgross35 Jan 21, 2025
@@ -313,6 +313,17 @@ pub macro cfg_match {
/// }
/// }
/// ```
///
/// If desired, it is possible to return expressions through the use of surrounding braces.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
/// If desired, it is possible to return expressions through the use of surrounding braces.
/// If desired, it is possible to return expressions through the use of surrounding braces:

Nit, colon to introduce an example

@tgross35
Copy link
Contributor

One nit and squash please, then r=me

@c410-f3r c410-f3r force-pushed the cfg-match-foo-bar-baz branch from 5844eac to 587b9c6 Compare January 21, 2025 11:45
@jhpratt
Copy link
Member

jhpratt commented Jan 21, 2025

@bors r=tgross35,jhpratt rollup

@bors
Copy link
Collaborator

bors commented Jan 21, 2025

📌 Commit 587b9c6 has been approved by tgross35,jhpratt

It is now in the queue for this repository.

@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 Jan 21, 2025
@matthiaskrgr
Copy link
Member

@bors r-
#135835 (comment)

@bors bors 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jan 21, 2025
@c410-f3r c410-f3r force-pushed the cfg-match-foo-bar-baz branch from 587b9c6 to 7d9fe91 Compare January 21, 2025 20:54
@c410-f3r
Copy link
Contributor Author

@rustbot review

@rustbot rustbot 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 Jan 21, 2025
@ehuss
Copy link
Contributor

ehuss commented Jan 21, 2025

Do we know why it choked on the comma?

@c410-f3r
Copy link
Contributor Author

The macro does not support trailing commas at the current time.

@c410-f3r
Copy link
Contributor Author

c410-f3r commented Jan 28, 2025

r? T-libs

@rustbot rustbot assigned joboet, tgross35 and Noratrieb and unassigned jhpratt, joboet and tgross35 Jan 28, 2025
@tgross35
Copy link
Contributor

@bors r=tgross35,jhpratt

Do we know why it choked on the comma?

The macro does not support trailing commas at the current time.

Why was this not a problem during PR CI though?

@bors
Copy link
Collaborator

bors commented Jan 28, 2025

📌 Commit 7d9fe91 has been approved by tgross35,jhpratt

It is now in the queue for this repository.

@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 Jan 28, 2025
@bors bors merged commit 53f343f into rust-lang:master Jan 29, 2025
6 checks passed
@rustbot rustbot added this to the 1.86.0 milestone Jan 29, 2025
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. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants