-
Notifications
You must be signed in to change notification settings - Fork 259
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
ATOMIC_USIZE_INIT deprecated in rust 1.34 #320
Comments
|
Ok lets call that option (d). With all due respect, I am least pleased with (d) since it hides the upgrade nudge, until it breaks. But that said, its also rather lame that all of (b) is required to cfg use the newer const fn with >= 1.24. |
How will a user of this library be better off if it uses the const constructor for this value? |
I presume you prefer (d) to either (a) or (b) then, ok. Seems like the your last question would be better made to whomever did the deprecation in But rust-lang/rfcs#2523 would have had to be stabilized by rust 1.16 to make (b) trivially simple, and I guess I can understand your position in terms of risk-benefit. |
Deprecated stable APIs will not be removed from the standard library. |
ATOMIC_USIZE_INIT was deprecated in rust 1.34. Silence the deprecation warning until our MSRV >= 1.24, where we can use the replacement const fn `AtomicUsize::new` github: fixes rust-lang#320
* Print `rerun-if-changed=build.rs` in `build.rs` * Optimize compile-time: Extract `bin/src/lib.rs` so that `cargo-binstall (lib)` can be compiled in parallel to other deps. * Refactor: Extract new mod `bin/src/bin_utils.rs` * Extract new fn `MainExit::new` * Refactor: Extract new fn `run_tokio_main` * Handle `Runtime::new` err gracefully in `run_tokio_main` instead of `panic!`ing, return the error as `BinstallError` * Avoid mixing `eprintln` and `error` in `MainExit::report` * Set profile for `build-override` to speedup building of `build.rs` and proc macros. Signed-off-by: Jiahao XU <[email protected]>
On to the next build warning...
https://travis-ci.com/rust-lang-nursery/log/jobs/174845625#L448
AtomicUsize::new
became usable as a const fn in 1.24, as best I can tell, so there are two options to fix this:(a) Increase
log
"s MSRV to 1.24 and useAtomicUsize::new
(b) Introduce a build script with version_check (build dep) and cfg switch to
AtomicUsize::new
for >= 1.24Or, I suppose: (c) ignore it. Thoughts?
The text was updated successfully, but these errors were encountered: