Skip to content

fix: docs and cfg std for select macro#2966

Closed
tisonkun wants to merge 2 commits into
rust-lang:masterfrom
tisonkun:fixup-docs-cfg
Closed

fix: docs and cfg std for select macro#2966
tisonkun wants to merge 2 commits into
rust-lang:masterfrom
tisonkun:fixup-docs-cfg

Conversation

@tisonkun

Copy link
Copy Markdown
Contributor

This closes #2932

cc @taiki-e @petekubiak

Signed-off-by: tison <wander4096@gmail.com>
@rustbot rustbot added A-macro Area: macro related S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 26, 2025
Signed-off-by: tison <wander4096@gmail.com>
@rustbot rustbot added A-future Area: futures::future A-stream Area: futures::stream labels Aug 26, 2025
@taiki-e

taiki-e commented Aug 29, 2025

Copy link
Copy Markdown
Member

Thanks for the PR, but this is not correct. select! refers random module which gated under std feature, so cannot be used without std feature.

The correct action here is to make select no-std compatible (there are already two PRs) or to mention features enabled by default in docs (or issue doc(cfg)).

@taiki-e taiki-e closed this Aug 29, 2025
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 29, 2025
@tisonkun

Copy link
Copy Markdown
Contributor Author

@taiki-e Thanks for your information! I'll take a look later.

Thanks for the PR, but this is not correct. select! refers random module which gated under std feature, so cannot be used without std feature.

I tried to run:

cargo build --no-default-features --features async-await
cargo build --no-default-features --features async-await-macro

locally. And both are compiled. But yes now I see: __futures_crate::async_await::shuffle(&mut __select_arr); that depends on std.

@tisonkun
tisonkun deleted the fixup-docs-cfg branch August 31, 2025 00:22
@tisonkun

Copy link
Copy Markdown
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-future Area: futures::future A-macro Area: macro related A-stream Area: futures::stream

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Select macro docs are incorrect

3 participants