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

Deprecate ONCE_INIT in future 1.38 release #61757

Merged
merged 1 commit into from Jun 13, 2019

Conversation

Projects
None yet
6 participants
@sfackler
Copy link
Member

commented Jun 12, 2019

Once::new() has been a stable const fn for a while now.

Closes #61746

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

commented Jun 12, 2019

r? @bluss

(rust_highfive has picked a reviewer for you, use r? to override)

@sfackler

This comment has been minimized.

Copy link
Member Author

commented Jun 12, 2019

@rust-highfive rust-highfive assigned alexcrichton and unassigned bluss Jun 12, 2019

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

commented Jun 12, 2019

The job x86_64-gnu-llvm-6.0 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
travis_time:end:07b6d120:start=1560304861869235752,finish=1560304863831939339,duration=1962703587
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
$ export GCP_CACHE_BUCKET=rust-lang-ci-cache
$ export AWS_ACCESS_KEY_ID=AKIA46X5W6CZEJZ6XT55
---
[00:27:47]    Compiling hashbrown v0.4.0
[00:27:50] error: use of deprecated item 'sync::once::ONCE_INIT': the `new` function is now preferred
[00:27:50]    --> src/libstd/sync/mod.rs:166:39
[00:27:50]     |
[00:27:50] 166 | pub use self::once::{Once, OnceState, ONCE_INIT};
[00:27:50]     |
[00:27:50]     = note: `-D deprecated` implied by `-D warnings`
[00:27:50] 
[00:27:52] error: aborting due to previous error

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@Centril Centril added this to the 1.37 milestone Jun 12, 2019

@sfackler sfackler force-pushed the sfackler:deprecate-once-init branch from 8af4bc6 to c0e0198 Jun 12, 2019

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

commented Jun 12, 2019

The job x86_64-gnu-llvm-6.0 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
travis_time:end:125c8c6b:start=1560312421231393291,finish=1560312423032216239,duration=1800822948
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
$ export GCP_CACHE_BUCKET=rust-lang-ci-cache
$ export AWS_ACCESS_KEY_ID=AKIA46X5W6CZEJZ6XT55
---
[00:40:57]    Compiling rustc_mir v0.0.0 (/checkout/src/librustc_mir)
[00:40:58] error: use of deprecated item 'std::sync::ONCE_INIT': the `new` function is now preferred
[00:40:58]    --> src/librustc_metadata/dynamic_lib.rs:164:38
[00:40:58]     |
[00:40:58] 164 |         use std::sync::{Mutex, Once, ONCE_INIT};
[00:40:58]     |
[00:40:58]     = note: `-D deprecated` implied by `-D warnings`
[00:40:58] 
[00:40:58] error: use of deprecated item 'std::sync::ONCE_INIT': the `new` function is now preferred
[00:40:58] error: use of deprecated item 'std::sync::ONCE_INIT': the `new` function is now preferred
[00:40:58]    --> src/librustc_metadata/dynamic_lib.rs:165:29
[00:40:58]     |
[00:40:58] 165 |         static INIT: Once = ONCE_INIT;
[00:40:58]     |                             ^^^^^^^^^ help: replace the use of the deprecated item: `Once::new()`
[00:41:00] error: aborting due to 2 previous errors
[00:41:00] 
[00:41:01] error: Could not compile `rustc_metadata`.
[00:41:01] warning: build failed, waiting for other jobs to finish...
---
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 1.
travis_time:start:1cc294ee
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Wed Jun 12 04:54:04 UTC 2019
trap-oxgzobynhmm1/s-fd31q2bxq4-1tzpb2u-19ca4iajxr4qm
108532 ./src/llvm-project/lldb
102836 ./.git
98204 ./obj/build/x86_64-unknown-linux-gnu/stage1-std
98060 ./obj/build/x86_64-unknown-linux-gnu/stage0-std

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@alexcrichton

This comment has been minimized.

Copy link
Member

commented Jun 12, 2019

r=me w/ ci passing

@sfackler sfackler force-pushed the sfackler:deprecate-once-init branch from c0e0198 to d5df2a8 Jun 12, 2019

@sfackler

This comment has been minimized.

Copy link
Member Author

commented Jun 12, 2019

@bors r=alexcrichton

@bors

This comment has been minimized.

Copy link
Contributor

commented Jun 12, 2019

📌 Commit d5df2a8 has been approved by alexcrichton

Centril added a commit to Centril/rust that referenced this pull request Jun 12, 2019

Rollup merge of rust-lang#61757 - sfackler:deprecate-once-init, r=ale…
…xcrichton

Deprecate ONCE_INIT

Once::new() has been a stable const fn for a while now.

Closes rust-lang#61746

bors added a commit that referenced this pull request Jun 12, 2019

Auto merge of #61783 - Centril:rollup-r5u53z7, r=Centril
Rollup of 10 pull requests

Successful merges:

 - #60376 (Stabilize Option::xor)
 - #61398 (Stabilize copy_within)
 - #61629 (Hygienize macros in the standard library)
 - #61675 (Include frame pointer for bare metal RISC-V targets)
 - #61750 (Fix x.py install)
 - #61757 (Deprecate ONCE_INIT)
 - #61762 (rustbuild: fix libtest_stamp)
 - #61763 (ci: fix ci stats upload condition)
 - #61771 (Update cargo)
 - #61776 (Fix typos in error_codes)

Failed merges:

r? @ghost
@Centril

This comment has been minimized.

Copy link
Member

commented Jun 12, 2019

Failed in #61783 (comment), @bors r-

Deprecate ONCE_INIT
Once::new() has been a stable const fn for a while now.

Closes #61746

@sfackler sfackler force-pushed the sfackler:deprecate-once-init branch from d5df2a8 to 72e99f5 Jun 13, 2019

@sfackler

This comment has been minimized.

Copy link
Member Author

commented Jun 13, 2019

I pushed the deprecation out one more release to avoid bootstrapping issues with clippy and cargo.

@bors r=alexcrichton

@bors

This comment has been minimized.

Copy link
Contributor

commented Jun 13, 2019

📌 Commit 72e99f5 has been approved by alexcrichton

@RalfJung RalfJung changed the title Deprecate ONCE_INIT Deprecate ONCE_INIT in future 1.38 release Jun 13, 2019

Centril added a commit to Centril/rust that referenced this pull request Jun 13, 2019

Rollup merge of rust-lang#61757 - sfackler:deprecate-once-init, r=ale…
…xcrichton

Deprecate ONCE_INIT in future 1.38 release

Once::new() has been a stable const fn for a while now.

Closes rust-lang#61746

bors added a commit that referenced this pull request Jun 13, 2019

Auto merge of #61799 - Centril:rollup-vpm5uxr, r=Centril
Rollup of 5 pull requests

Successful merges:

 - #61598 (Handle index out of bound errors during const eval without panic)
 - #61720 (std: Remove internal definitions of `cfg_if!` macro)
 - #61757 (Deprecate ONCE_INIT in future 1.38 release)
 - #61766 (submodules: update clippy from c0dbd34 to bd33a97)
 - #61791 (Small cleanup in `check_pat_path`)

Failed merges:

r? @ghost

bors added a commit to rust-lang/cargo that referenced this pull request Jun 13, 2019

Auto merge of #7031 - lzutao:deprecated-once-init, r=ehuss
Deprecated ONCE_INIT in favor of Once::new()

cc rust-lang/rust#61757

@bors bors merged commit 72e99f5 into rust-lang:master Jun 13, 2019

1 of 2 checks passed

pr Build #20190613.4 failed
Details
Travis CI - Pull Request Build Passed
Details

@95th 95th referenced this pull request Jun 23, 2019

Merged

Minor tweaks: #2569

ry added a commit to denoland/deno that referenced this pull request Jun 23, 2019

Minor tweaks (#2569)
1. Separate Snapshot and Script StartupData functions based on cfg "no-snapshot-init"
2. Replace deprecated Once::ONCE_INIT with Once::new (rust-lang/rust#61757)
3. Elide lifetime
4. Fix typos
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.