Skip to content

Commit 84ddc30

Browse files
authored
Merge pull request #552 from rust-lang/cargo/0.4.18
Prepare for 0.4.19 release
2 parents 9ae986d + 5322e56 commit 84ddc30

File tree

5 files changed

+24
-63
lines changed

5 files changed

+24
-63
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,8 @@ jobs:
127127
- uses: actions/checkout@master
128128
- name: Install Rust
129129
run: |
130-
rustup update 1.31.0 --no-self-update
131-
rustup default 1.31.0
130+
rustup update 1.60.0 --no-self-update
131+
rustup default 1.60.0
132132
- run: cargo test --verbose --manifest-path tests/Cargo.toml
133133

134134
embedded:

CHANGELOG.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
## [Unreleased]
44

5+
## [0.4.19] - 2023-06-10
6+
7+
* Use target_has_atomic instead of the old atomic_cas cfg by @GuillaumeGomez in https://github.com/rust-lang/log/pull/555
8+
* Put MSRV into Cargo.toml by @est31 in https://github.com/rust-lang/log/pull/557
9+
510
## [0.4.18] - 2023-05-28
611

712
* fix markdown links (again) by @hellow554 in https://github.com/rust-lang/log/pull/513
@@ -14,7 +19,6 @@
1419
* GitHub Workflows security hardening by @sashashura in https://github.com/rust-lang/log/pull/538
1520
* Fix build status badge by @atouchet in https://github.com/rust-lang/log/pull/539
1621
* Add call_logger to the documentation by @a1ecbr0wn in https://github.com/rust-lang/log/pull/547
17-
* Remove build.rs file by @GuillaumeGomez in https://github.com/rust-lang/log/pull/543
1822
* Use stable internals for key-value API by @KodrAus in https://github.com/rust-lang/log/pull/550
1923
* Change wording of list of implementations by @Thomasdezeeuw in https://github.com/rust-lang/log/pull/553
2024
* Add std-logger to list of implementations by @Thomasdezeeuw in https://github.com/rust-lang/log/pull/554
@@ -239,7 +243,9 @@ version using log 0.4.x to avoid losing module and file information.
239243

240244
Look at the [release tags] for information about older releases.
241245

242-
[Unreleased]: https://github.com/rust-lang-nursery/log/compare/0.4.17...HEAD
246+
[Unreleased]: https://github.com/rust-lang-nursery/log/compare/0.4.18...HEAD
247+
[0.4.19]: https://github.com/rust-lang-nursery/log/compare/0.4.18...0.4.19
248+
[0.4.18]: https://github.com/rust-lang-nursery/log/compare/0.4.17...0.4.18
243249
[0.4.17]: https://github.com/rust-lang-nursery/log/compare/0.4.16...0.4.17
244250
[0.4.16]: https://github.com/rust-lang-nursery/log/compare/0.4.15...0.4.16
245251
[0.4.15]: https://github.com/rust-lang-nursery/log/compare/0.4.13...0.4.15

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22

33
name = "log"
4-
version = "0.4.18" # remember to update html_root_url
4+
version = "0.4.19" # remember to update html_root_url
55
authors = ["The Rust Project Developers"]
66
license = "MIT OR Apache-2.0"
77
readme = "README.md"
@@ -13,7 +13,7 @@ A lightweight logging facade for Rust
1313
categories = ["development-tools::debugging"]
1414
keywords = ["logging"]
1515
exclude = ["rfcs/**/*"]
16-
build = "build.rs"
16+
rust-version = "1.60.0"
1717

1818
[package.metadata.docs.rs]
1919
features = ["std", "serde", "kv_unstable_std", "kv_unstable_sval", "kv_unstable_serde"]

build.rs

Lines changed: 0 additions & 46 deletions
This file was deleted.

src/lib.rs

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@
319319
#![doc(
320320
html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
321321
html_favicon_url = "https://www.rust-lang.org/favicon.ico",
322-
html_root_url = "https://docs.rs/log/0.4.18"
322+
html_root_url = "https://docs.rs/log/0.4.19"
323323
)]
324324
#![warn(missing_docs)]
325325
#![deny(missing_debug_implementations, unconditional_recursion)]
@@ -346,20 +346,20 @@ mod serde;
346346
#[cfg(feature = "kv_unstable")]
347347
pub mod kv;
348348

349-
#[cfg(has_atomics)]
349+
#[cfg(target_has_atomic = "ptr")]
350350
use std::sync::atomic::{AtomicUsize, Ordering};
351351

352-
#[cfg(not(has_atomics))]
352+
#[cfg(not(target_has_atomic = "ptr"))]
353353
use std::cell::Cell;
354-
#[cfg(not(has_atomics))]
354+
#[cfg(not(target_has_atomic = "ptr"))]
355355
use std::sync::atomic::Ordering;
356356

357-
#[cfg(not(has_atomics))]
357+
#[cfg(not(target_has_atomic = "ptr"))]
358358
struct AtomicUsize {
359359
v: Cell<usize>,
360360
}
361361

362-
#[cfg(not(has_atomics))]
362+
#[cfg(not(target_has_atomic = "ptr"))]
363363
impl AtomicUsize {
364364
const fn new(v: usize) -> AtomicUsize {
365365
AtomicUsize { v: Cell::new(v) }
@@ -373,7 +373,7 @@ impl AtomicUsize {
373373
self.v.set(val)
374374
}
375375

376-
#[cfg(atomic_cas)]
376+
#[cfg(target_has_atomic = "ptr")]
377377
fn compare_exchange(
378378
&self,
379379
current: usize,
@@ -391,7 +391,7 @@ impl AtomicUsize {
391391

392392
// Any platform without atomics is unlikely to have multiple cores, so
393393
// writing via Cell will not be a race condition.
394-
#[cfg(not(has_atomics))]
394+
#[cfg(not(target_has_atomic = "ptr"))]
395395
unsafe impl Sync for AtomicUsize {}
396396

397397
// The LOGGER static holds a pointer to the global logger. It is protected by
@@ -1219,6 +1219,7 @@ where
12191219
///
12201220
/// Note that `Trace` is the maximum level, because it provides the maximum amount of detail in the emitted logs.
12211221
#[inline]
1222+
#[cfg(target_has_atomic = "ptr")]
12221223
pub fn set_max_level(level: LevelFilter) {
12231224
MAX_LOG_LEVEL_FILTER.store(level as usize, Ordering::Relaxed);
12241225
}
@@ -1287,7 +1288,7 @@ pub fn max_level() -> LevelFilter {
12871288
/// An error is returned if a logger has already been set.
12881289
///
12891290
/// [`set_logger`]: fn.set_logger.html
1290-
#[cfg(all(feature = "std", atomic_cas))]
1291+
#[cfg(all(feature = "std", target_has_atomic = "ptr"))]
12911292
pub fn set_boxed_logger(logger: Box<dyn Log>) -> Result<(), SetLoggerError> {
12921293
set_logger_inner(|| Box::leak(logger))
12931294
}
@@ -1345,12 +1346,12 @@ pub fn set_boxed_logger(logger: Box<dyn Log>) -> Result<(), SetLoggerError> {
13451346
/// ```
13461347
///
13471348
/// [`set_logger_racy`]: fn.set_logger_racy.html
1348-
#[cfg(atomic_cas)]
1349+
#[cfg(target_has_atomic = "ptr")]
13491350
pub fn set_logger(logger: &'static dyn Log) -> Result<(), SetLoggerError> {
13501351
set_logger_inner(|| logger)
13511352
}
13521353

1353-
#[cfg(atomic_cas)]
1354+
#[cfg(target_has_atomic = "ptr")]
13541355
fn set_logger_inner<F>(make_logger: F) -> Result<(), SetLoggerError>
13551356
where
13561357
F: FnOnce() -> &'static dyn Log,

0 commit comments

Comments
 (0)