Skip to content
This repository was archived by the owner on Apr 2, 2026. It is now read-only.

select! and select_ref!: allow #[cfg()] gates#970

Merged
zesterer merged 1 commit into
zesterer:mainfrom
Tpt:tpt/select-cfg
Mar 15, 2026
Merged

select! and select_ref!: allow #[cfg()] gates#970
zesterer merged 1 commit into
zesterer:mainfrom
Tpt:tpt/select-cfg

Conversation

@Tpt

@Tpt Tpt commented Mar 14, 2026

Copy link
Copy Markdown
Contributor

This is handy to match some arguments only if a feature is enabled. For example:

select! {
   'c' => (),
   #[cfg(feature = "uppercase-is-ok")]
   'C' => ()
}

I have not found a good place to write a test, where should I write one

This is handy to match some arguments only if a feature is enabled. For example:
```
select! {
   'c' => (),
   #[cfg(feature = "uppercase-is-ok")]
   'C' => ()
}
```
@zesterer

Copy link
Copy Markdown
Owner

Thanks! Great change.

@zesterer
zesterer merged commit 3451910 into zesterer:main Mar 15, 2026
3 of 4 checks passed
@Tpt
Tpt deleted the tpt/select-cfg branch March 17, 2026 15:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants