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

Stabilize noop_waker #133089

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

eholk
Copy link
Contributor

@eholk eholk commented Nov 16, 2024

Tracking Issue: #98286

This is a handy feature that's been used widely in tests and example async code and it'd be nice to make it available to users.

cc @rust-lang/wg-async

Creating as a draft PR because T-libs-api will need to consider this and do an FCP before merging.

@eholk eholk added the I-libs-api-nominated Nominated for discussion during a libs-api team meeting. label Nov 16, 2024
@rustbot
Copy link
Collaborator

rustbot commented Nov 16, 2024

r? @TaKO8Ki

rustbot has assigned @TaKO8Ki.
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 PG-exploit-mitigations Project group: Exploit mitigations S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Nov 16, 2024
@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-tools failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
tests/pass/float_nan.rs ... ok
tests/pass/0weak_memory_consistency.rs ... ok

FAILED TEST: tests/pass/move-data-across-await-point.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-ewp271" RUST_BACKTRACE="1" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/bin/miri" "--error-format=json" "--sysroot=/checkout/obj/build/x86_64-unknown-linux-gnu/miri-sysroot" "-Dwarnings" "-Dunused" "-Ainternal_features" "-Zui-testing" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/miri_ui/tests/pass" "tests/pass/move-data-across-await-point.rs" "--edition" "2021"
error: test got exit status: 1, but expected 0
 = note: compilation failed, but was expected to succeed

error: actual output differed from expected
---

Location:
   /cargo/registry/src/index.crates.io-6f17d22bba15001f/ui_test-0.26.5/src/lib.rs:357

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
error: test failed, to rerun pass `--test ui`
Caused by:
  process didn't exit successfully: `/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/ui-de50b20aa7a9761c --quiet` (exit status: 1)
  process didn't exit successfully: `/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/ui-de50b20aa7a9761c --quiet` (exit status: 1)
Command has failed. Rerun with -v to see more details.
  local time: Sat Nov 16 02:15:12 UTC 2024
  network time: Sat, 16 Nov 2024 02:15:12 GMT
##[error]Process completed with exit code 1.
Post job cleanup.

Comment on lines +866 to +867
#[stable(feature = "noop_waker", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "noop_waker", since = "CURRENT_RUSTC_VERSION")]
Copy link
Contributor

Choose a reason for hiding this comment

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

LocalWaker is itself still unstable, so I think this function should remain unstable, just under that feature gate?

Suggested change
#[stable(feature = "noop_waker", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "noop_waker", since = "CURRENT_RUSTC_VERSION")]
#[unstable(feature = "local_waker", issue = "118959")]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-libs-api-nominated Nominated for discussion during a libs-api team meeting. PG-exploit-mitigations Project group: Exploit mitigations S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. 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.

6 participants