Skip to content

Conversation

Kixunil
Copy link
Contributor

@Kixunil Kixunil commented Feb 4, 2021

This stabilizes:

  • OnceState
  • OnceState::is_poisoned() (previously named poisoned())
  • Once::call_once_force()

poisoned() was renamed because the new name is more clear as a few
people agreed and nobody objected.

Closes #33577

Notes:

  • I'm not entirely sure it's supposed to be 1.51, LMK if I did it wrong
  • I failed to run tests locally, so we will have to leave it to bors or someone else can try

@rust-highfive
Copy link
Contributor

r? @m-ou-se

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 4, 2021
@rust-log-analyzer
Copy link
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
Suite("src/test/assembly") not skipped for "bootstrap::test::Assembly" -- not in ["src/tools/tidy"]
Check compiletest suite=assembly mode=assembly (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)

running 29 tests
iiiiiiiiiiiiiiiiiiiiiiiiiiiii
test result: ok. 0 passed; 0 failed; 29 ignored; 0 measured; 0 filtered out; finished in 0.00s

 finished in 0.064 seconds
Check compiletest suite=incremental mode=incremental (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
---
Suite("src/test/debuginfo") not skipped for "bootstrap::test::Debuginfo" -- not in ["src/tools/tidy"]
Check compiletest suite=debuginfo mode=debuginfo (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)

running 116 tests
iiiiiiiiii.i.i..i..i...ii...i.i....ii...........iiii........i.....i...i.......ii.i.ii.....iiii.....i 100/116
test result: ok. 78 passed; 0 failed; 38 ignored; 0 measured; 0 filtered out; finished in 1.94s

 finished in 2.002 seconds
Suite("src/test/ui-fulldeps") not skipped for "bootstrap::test::UiFullDeps" -- not in ["src/tools/tidy"]
---
............................................i...............................ii...................... 600/1147
.................................................................................................... 700/1147
.................................................................................................... 800/1147
...........................iii...................................................................... 900/1147
..............................................................F.....F..F............................ 1000/1147
...............................................
failures:

---- src/sync/once.rs - sync::once::Once::call_once_force (line 282) stdout ----
---- src/sync/once.rs - sync::once::Once::call_once_force (line 282) stdout ----
error[E0599]: no method named `poisoned` found for reference `&OnceState` in the current scope
   |
   |
25 |     assert!(state.poisoned());
   |                   ^^^^^^^^ private field, not a method
error: aborting due to previous error

For more information about this error, try `rustc --explain E0599`.
Couldn't compile the test.
Couldn't compile the test.
---- src/sync/once.rs - sync::once::OnceState::is_poisoned (line 528) stdout ----
error[E0599]: no method named `poisoned` found for reference `&OnceState` in the current scope
   |
   |
18 |     assert!(state.poisoned());
   |                   ^^^^^^^^ private field, not a method
error: aborting due to previous error

For more information about this error, try `rustc --explain E0599`.
Couldn't compile the test.
Couldn't compile the test.
---- src/sync/once.rs - sync::once::OnceState::is_poisoned (line 549) stdout ----
error[E0599]: no method named `poisoned` found for reference `&OnceState` in the current scope
   |
   |
11 |     assert!(!state.poisoned());
   |                    ^^^^^^^^ private field, not a method
error: aborting due to previous error

For more information about this error, try `rustc --explain E0599`.
Couldn't compile the test.
---

error: test failed, to rerun pass '--doc'


command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "test" "--target" "x86_64-unknown-linux-gnu" "-Zbinary-dep-depinfo" "-j" "16" "--release" "--locked" "--color" "always" "--features" "panic-unwind backtrace compiler-builtins-c" "--manifest-path" "/checkout/library/test/Cargo.toml" "-p" "std" "--" "--quiet"


failed to run: /checkout/obj/build/bootstrap/debug/bootstrap --stage 2 test --exclude src/tools/tidy
Build completed unsuccessfully in 0:18:58

@Kixunil
Copy link
Contributor Author

Kixunil commented Feb 4, 2021

Should the commits be squashed?

@m-ou-se
Copy link
Member

m-ou-se commented Feb 4, 2021

I'm not entirely sure it's supposed to be 1.51, LMK if I did it wrong

1.51 branches off tomorrow, so depending on how quickly this gets merged it might need to be changed to 1.52.

I failed to run tests locally, so we will have to leave it to bors or someone else can try

That's fine, using the CI on GitHub here works too. :)

Should the commits be squashed?

Yeah feel free to squash the commits.

@Kixunil Kixunil force-pushed the stabilize_once_poison branch from f5253b4 to 3444577 Compare February 4, 2021 13:13
@m-ou-se m-ou-se added the T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. label Feb 4, 2021
@Kixunil
Copy link
Contributor Author

Kixunil commented Feb 4, 2021

Sounds like good timing then. :D
Merging it sooner would be a bit nicer so I will try to make extra sure to help. The change should be easy enough anyway.

I squashed the commits right away to speed things up.

@rust-log-analyzer
Copy link
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
Suite("src/test/assembly") not skipped for "bootstrap::test::Assembly" -- not in ["src/tools/tidy"]
Check compiletest suite=assembly mode=assembly (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)

running 29 tests
iiiiiiiiiiiiiiiiiiiiiiiiiiiii

 finished in 0.072 seconds
Suite("src/test/incremental") not skipped for "bootstrap::test::Incremental" -- not in ["src/tools/tidy"]
Check compiletest suite=incremental mode=incremental (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
---
Suite("src/test/debuginfo") not skipped for "bootstrap::test::Debuginfo" -- not in ["src/tools/tidy"]
Check compiletest suite=debuginfo mode=debuginfo (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)

running 116 tests
iiiiiiiiii.i.i...i.i..ii....i.i....ii..........iiii.........i.....i...i.......ii.i.ii.....iiii.....i 100/116
test result: ok. 78 passed; 0 failed; 38 ignored; 0 measured; 0 filtered out; finished in 2.37s

 finished in 2.450 seconds
Suite("src/test/ui-fulldeps") not skipped for "bootstrap::test::UiFullDeps" -- not in ["src/tools/tidy"]
---
............................................i...............................ii...................... 600/1147
.................................................................................................... 700/1147
.................................................................................................... 800/1147
............................iii..................................................................... 900/1147
............................................................F..F.F.................................. 1000/1147
...............................................
failures:

---- src/sync/once.rs - sync::once::Once::call_once_force (line 282) stdout ----
---- src/sync/once.rs - sync::once::Once::call_once_force (line 282) stdout ----
error: the feature `once_poison` has been stable since 1.51.0 and no longer requires an attribute to enable
  |
  |
3 | #![feature(once_poison)]
  |
note: the lint level is defined here
 --> src/sync/once.rs:280:9
  |
  |
1 | #![deny(warnings)]
  |         ^^^^^^^^
  = note: `#[deny(stable_features)]` implied by `#[deny(warnings)]`

error: aborting due to previous error

Couldn't compile the test.
---- src/sync/once.rs - sync::once::OnceState::is_poisoned (line 528) stdout ----
error: the feature `once_poison` has been stable since 1.51.0 and no longer requires an attribute to enable
  |
  |
3 | #![feature(once_poison)]
  |
note: the lint level is defined here
 --> src/sync/once.rs:526:9
  |
  |
1 | #![deny(warnings)]
  |         ^^^^^^^^
  = note: `#[deny(stable_features)]` implied by `#[deny(warnings)]`

error: aborting due to previous error

Couldn't compile the test.
---- src/sync/once.rs - sync::once::OnceState::is_poisoned (line 549) stdout ----
error: the feature `once_poison` has been stable since 1.51.0 and no longer requires an attribute to enable
  |
  |
3 | #![feature(once_poison)]
  |
note: the lint level is defined here
 --> src/sync/once.rs:547:9
  |
---

error: test failed, to rerun pass '--doc'


command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "test" "--target" "x86_64-unknown-linux-gnu" "-Zbinary-dep-depinfo" "-j" "16" "--release" "--locked" "--color" "always" "--features" "panic-unwind backtrace compiler-builtins-c" "--manifest-path" "/checkout/library/test/Cargo.toml" "-p" "std" "--" "--quiet"


failed to run: /checkout/obj/build/bootstrap/debug/bootstrap --stage 2 test --exclude src/tools/tidy
Build completed unsuccessfully in 0:25:17

This stabilizes:

* `OnceState`
* `OnceState::is_poisoned()` (previously named `poisoned()`)
* `Once::call_once_force()`

`poisoned()` was renamed because the new name is more clear as a few
people agreed and nobody objected.

Closes rust-lang#33577
@Kixunil Kixunil force-pushed the stabilize_once_poison branch from 3444577 to f42e961 Compare February 4, 2021 14:20
@m-ou-se
Copy link
Member

m-ou-se commented Feb 4, 2021

FCP happened last may: #33577 (comment)
This also applies the rename that was discussed on that same thread: #33577 (comment)

@bors r+ rollup=always

@bors
Copy link
Collaborator

bors commented Feb 4, 2021

📌 Commit f42e961 has been approved by m-ou-se

@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 Feb 4, 2021
@m-ou-se
Copy link
Member

m-ou-se commented Feb 4, 2021

Sounds like good timing then. :D

The queue is quite long right now, so there's a chance it won't make it. We'll see how it goes. :)

m-ou-se added a commit to m-ou-se/rust that referenced this pull request Feb 4, 2021
…ou-se

Stabilize poison API of Once, rename poisoned()

This stabilizes:

* `OnceState`
* `OnceState::is_poisoned()` (previously named `poisoned()`)
* `Once::call_once_force()`

`poisoned()` was renamed because the new name is more clear as a few
people agreed and nobody objected.

Closes rust-lang#33577

Notes:

* I'm not entirely sure it's supposed to be 1.51, LMK if I did it wrong
* I failed to run tests locally, so we will have to leave it to bors or someone else can try
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 4, 2021
Rollup of 9 pull requests

Successful merges:

 - rust-lang#74304 (Stabilize the Wake trait)
 - rust-lang#79805 (Rename Iterator::fold_first to reduce and stabilize it)
 - rust-lang#81556 (introduce future-compatibility warning for forbidden lint groups)
 - rust-lang#81645 (Add lint for `panic!(123)` which is not accepted in Rust 2021.)
 - rust-lang#81710 (OsStr eq_ignore_ascii_case takes arg by value)
 - rust-lang#81711 (add #[inline] to all the public IpAddr functions)
 - rust-lang#81725 (Move test to be with the others)
 - rust-lang#81727 (Revert stabilizing integer::BITS.)
 - rust-lang#81745 (Stabilize poison API of Once, rename poisoned())

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 6f014cd into rust-lang:master Feb 5, 2021
@rustbot rustbot added this to the 1.51.0 milestone Feb 5, 2021
@Kixunil Kixunil deleted the stabilize_once_poison branch February 5, 2021 08:48
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-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tracking issue for std::sync::Once poisoning
6 participants