[INFO] cloning repository https://github.com/terrarier2111/SwapArc [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/terrarier2111/SwapArc" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fterrarier2111%2FSwapArc", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fterrarier2111%2FSwapArc'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 3a1c7e39b73bba6a614ae10e61ab75a727c9492e [INFO] linting terrarier2111/SwapArc against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fterrarier2111%2FSwapArc" "/workspace/builds/worker-6-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-6-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/terrarier2111/SwapArc [INFO] finished tweaking git repo https://github.com/terrarier2111/SwapArc [INFO] tweaked toml for git repo https://github.com/terrarier2111/SwapArc written to /workspace/builds/worker-6-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/terrarier2111/SwapArc on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/terrarier2111/SwapArc already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Updating git repository `https://github.com/terrarier2111/thread_local-rs/` [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded likely_stable v0.1.2 [INFO] [stderr] Downloaded clap v4.3.19 [INFO] [stderr] Downloaded pest v2.7.1 [INFO] [stderr] Downloaded clap_builder v4.3.19 [INFO] [stderr] Downloaded serde_json v1.0.103 [INFO] [stderr] Downloaded serde_derive v1.0.174 [INFO] [stderr] Downloaded regex-automata v0.3.3 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 45d03baa35a8e8efd5a5822d71c953b9b5e28e6ca7ecfadd9992c00e24d86d58 [INFO] running `Command { std: "docker" "start" "-a" "45d03baa35a8e8efd5a5822d71c953b9b5e28e6ca7ecfadd9992c00e24d86d58", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "45d03baa35a8e8efd5a5822d71c953b9b5e28e6ca7ecfadd9992c00e24d86d58", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "45d03baa35a8e8efd5a5822d71c953b9b5e28e6ca7ecfadd9992c00e24d86d58", kill_on_drop: false }` [INFO] [stdout] 45d03baa35a8e8efd5a5822d71c953b9b5e28e6ca7ecfadd9992c00e24d86d58 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] ec0c7908d94f637578e115aff1e847c697b56021f50029b28a3c86db36121a9c [INFO] running `Command { std: "docker" "start" "-a" "ec0c7908d94f637578e115aff1e847c697b56021f50029b28a3c86db36121a9c", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.66 [INFO] [stderr] Compiling unicode-ident v1.0.11 [INFO] [stderr] Compiling thiserror v1.0.44 [INFO] [stderr] Compiling crossbeam-utils v0.8.16 [INFO] [stderr] Compiling libc v0.2.147 [INFO] [stderr] Compiling memoffset v0.9.0 [INFO] [stderr] Compiling ucd-trie v0.1.6 [INFO] [stderr] Compiling crossbeam-epoch v0.9.15 [INFO] [stderr] Compiling serde v1.0.174 [INFO] [stderr] Compiling serde_derive v1.0.174 [INFO] [stderr] Compiling num-traits v0.2.16 [INFO] [stderr] Checking either v1.9.0 [INFO] [stderr] Compiling rayon-core v1.11.0 [INFO] [stderr] Compiling rustix v0.38.4 [INFO] [stderr] Compiling serde_json v1.0.103 [INFO] [stderr] Compiling const_fn v0.4.9 [INFO] [stderr] Checking half v1.8.2 [INFO] [stderr] Checking once_cell v1.18.0 [INFO] [stderr] Checking ryu v1.0.15 [INFO] [stderr] Checking bitflags v2.3.3 [INFO] [stderr] Checking ciborium-io v0.2.1 [INFO] [stderr] Checking itoa v1.0.9 [INFO] [stderr] Checking clap_lex v0.5.0 [INFO] [stderr] Checking linux-raw-sys v0.4.3 [INFO] [stderr] Checking plotters-backend v0.3.5 [INFO] [stderr] Checking regex-syntax v0.7.4 [INFO] [stderr] Checking anstyle v1.0.1 [INFO] [stderr] Checking itertools v0.10.5 [INFO] [stderr] Checking ciborium-ll v0.2.1 [INFO] [stderr] Checking walkdir v2.3.3 [INFO] [stderr] Checking arc-swap v1.6.0 [INFO] [stderr] Checking plotters-svg v0.3.5 [INFO] [stderr] Checking clap_builder v4.3.19 [INFO] [stderr] Checking crossbeam-channel v0.5.8 [INFO] [stderr] Checking thread_local v1.1.7 (https://github.com/terrarier2111/thread_local-rs/#c693b087) [INFO] [stderr] Checking num_cpus v1.16.0 [INFO] [stderr] Checking getrandom v0.2.10 [INFO] [stderr] Compiling quote v1.0.31 [INFO] [stderr] Checking crossbeam-deque v0.8.3 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking plotters v0.3.5 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Compiling syn v2.0.27 [INFO] [stderr] Checking regex-automata v0.3.3 [INFO] [stderr] Checking is-terminal v0.4.9 [INFO] [stderr] Checking criterion-plot v0.5.0 [INFO] [stderr] Checking rayon v1.7.0 [INFO] [stderr] Checking clap v4.3.19 [INFO] [stderr] Checking regex v1.9.1 [INFO] [stderr] Checking ciborium v0.2.1 [INFO] [stderr] Compiling thiserror-impl v1.0.44 [INFO] [stderr] Checking tinytemplate v1.2.1 [INFO] [stderr] Checking criterion v0.5.1 [INFO] [stderr] Compiling pest v2.7.1 [INFO] [stderr] Compiling semver-parser v0.10.2 [INFO] [stderr] Compiling semver v0.11.0 [INFO] [stderr] Compiling rustc_version v0.3.3 [INFO] [stderr] Compiling likely_stable v0.1.2 [INFO] [stderr] Checking swap-arc v0.1.1 (/opt/rustwide/workdir) [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/lib.rs:60:1 [INFO] [stdout] | [INFO] [stdout] 60 | / /// to cache previous reads. [INFO] [stdout] 61 | | [INFO] [stdout] | |_^ [INFO] [stdout] 62 | /// Note: `SwapArc` has wait-free reads. [INFO] [stdout] 63 | pub struct SwapArcAnyMeta< [INFO] [stdout] | ------------------------- the comment documents this struct [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the documentation should include the empty line include it in the comment [INFO] [stdout] | [INFO] [stdout] 61 | /// [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/lib.rs:60:1 [INFO] [stdout] | [INFO] [stdout] 60 | / /// to cache previous reads. [INFO] [stdout] 61 | | [INFO] [stdout] | |_^ [INFO] [stdout] 62 | /// Note: `SwapArc` has wait-free reads. [INFO] [stdout] 63 | pub struct SwapArcAnyMeta< [INFO] [stdout] | ------------------------- the comment documents this struct [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the documentation should include the empty line include it in the comment [INFO] [stdout] | [INFO] [stdout] 61 | /// [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `compare_exchange_inner` is never used [INFO] [stdout] --> src/lib.rs:887:15 [INFO] [stdout] | [INFO] [stdout] 89 | / impl, const METADATA_BITS: u32> [INFO] [stdout] 90 | | SwapArcAnyMeta [INFO] [stdout] | |_______________________________________- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 887 | unsafe fn compare_exchange_inner( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `inner` is never read [INFO] [stdout] --> src/lib.rs:1241:13 [INFO] [stdout] | [INFO] [stdout] 1240 | struct SwapArcFullPtrGuard = Arc, const METADATA_BITS: u32 = 0> { [INFO] [stdout] | ------------------- field in this struct [INFO] [stdout] 1241 | inner: D, [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `propagate_new_replace` is never used [INFO] [stdout] --> src/lib.rs:1455:15 [INFO] [stdout] | [INFO] [stdout] 1445 | impl> LocalDataInner { [INFO] [stdout] | --------------------------------------------------------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 1455 | unsafe fn propagate_new_replace(&mut self, replace: *mut T) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `val` is never used [INFO] [stdout] --> src/lib.rs:1558:8 [INFO] [stdout] | [INFO] [stdout] 1556 | impl> LocalCounted { [INFO] [stdout] | ------------------------------------------------------------- method in this implementation [INFO] [stdout] 1557 | #[inline] [INFO] [stdout] 1558 | fn val(&self) -> ManuallyDrop { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/lib.rs:1503:30 [INFO] [stdout] | [INFO] [stdout] 1501 | impl> OwnedData { [INFO] [stdout] | ---------------------------------------------------------- associated function in this implementation [INFO] [stdout] 1502 | #[inline] [INFO] [stdout] 1503 | pub(crate) unsafe fn new(val: *mut T) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `from_exposed_addr` is never used [INFO] [stdout] --> src/lib.rs:1710:19 [INFO] [stdout] | [INFO] [stdout] 1710 | pub(crate) fn from_exposed_addr(exposed_addr: usize) -> *const T { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `from_exposed_addr_mut` is never used [INFO] [stdout] --> src/lib.rs:1715:19 [INFO] [stdout] | [INFO] [stdout] 1715 | pub(crate) fn from_exposed_addr_mut(exposed_addr: usize) -> *mut T { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:410:13 [INFO] [stdout] | [INFO] [stdout] 410 | / return SwapArcGuard { [INFO] [stdout] 411 | | parent, [INFO] [stdout] 412 | | fake_ref, [INFO] [stdout] 413 | | idx, [INFO] [stdout] 414 | | }; [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 410 ~ SwapArcGuard { [INFO] [stdout] 411 + parent, [INFO] [stdout] 412 + fake_ref, [INFO] [stdout] 413 + idx, [INFO] [stdout] 414 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:340:29 [INFO] [stdout] | [INFO] [stdout] 340 | parent: &parent, [INFO] [stdout] | ^^^^^^^ help: change this to: `parent` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lib.rs:624:9 [INFO] [stdout] | [INFO] [stdout] 624 | / match self.intermediate_ref_cnt.compare_exchange( [INFO] [stdout] 625 | | 0, [INFO] [stdout] 626 | | Self::UPDATE | Self::OTHER_UPDATE, [INFO] [stdout] 627 | | Ordering::Acquire, [INFO] [stdout] ... | [INFO] [stdout] 668 | | Err(_) => {} [INFO] [stdout] 669 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 624 ~ if let Ok(_) = self.intermediate_ref_cnt.compare_exchange( [INFO] [stdout] 625 + 0, [INFO] [stdout] 626 + Self::UPDATE | Self::OTHER_UPDATE, [INFO] [stdout] 627 + Ordering::Acquire, [INFO] [stdout] 628 + Ordering::Relaxed, [INFO] [stdout] 629 + ) { [INFO] [stdout] 630 + // take the update [INFO] [stdout] 631 + [INFO] [stdout] 632 + // ORDERING: this is `Acquire` in order to establish a happens-before relationship with [INFO] [stdout] 633 + // to previous updates and thus ensure that the initialization has already happened when [INFO] [stdout] 634 + // we acquire the value of `updated`. [INFO] [stdout] 635 + let update = self.updated.swap(null_mut(), Ordering::Acquire); [INFO] [stdout] 636 + // check if we even have an update [INFO] [stdout] 637 + if update.is_null() { [INFO] [stdout] 638 + // unset the update flags as there's no update to be applied here [INFO] [stdout] 639 + [INFO] [stdout] 640 + // ORDERING: This is `Release` in order to establish a happens-before relationship [INFO] [stdout] 641 + // with loads of this counter and thus ensure that on the load of this counter [INFO] [stdout] 642 + // the critical section (in this case the swap of `updated`) has ended. [INFO] [stdout] 643 + self.intermediate_ref_cnt [INFO] [stdout] 644 + .fetch_and(!(Self::UPDATE | Self::OTHER_UPDATE), Ordering::Release); [INFO] [stdout] 645 + return; [INFO] [stdout] 646 + } [INFO] [stdout] 647 + [INFO] [stdout] 648 + // FIXME: ordering comment [INFO] [stdout] 649 + let metadata = Self::get_metadata(self.intermediate_ptr.load(Ordering::Acquire)); [INFO] [stdout] 650 + let update = Self::merge_ptr_and_metadata(update, metadata).cast_mut(); [INFO] [stdout] 651 + // FIXME: ordering comment [INFO] [stdout] 652 + self.intermediate_ptr.store(update, Ordering::Release); [INFO] [stdout] 653 + // unset the update flag [INFO] [stdout] 654 + [INFO] [stdout] 655 + // ORDERING: This is `Release` in order to establish a happens-before relationship [INFO] [stdout] 656 + // with loads of this counter and thus ensure that on the load of this counter [INFO] [stdout] 657 + // the critical section (in this case the swap of `updated` and the load + store [INFO] [stdout] 658 + // of `intermediate_ptr`) has ended. [INFO] [stdout] 659 + self.intermediate_ref_cnt [INFO] [stdout] 660 + .fetch_and(!Self::UPDATE, Ordering::Release); [INFO] [stdout] 661 + // try finishing the update up [INFO] [stdout] 662 + // FIXME: safety comment! [INFO] [stdout] 663 + unsafe { [INFO] [stdout] 664 + self.update_curr(update); [INFO] [stdout] 665 + } [INFO] [stdout] 666 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:904:15 [INFO] [stdout] | [INFO] [stdout] 904 | while !self [INFO] [stdout] | _______________^ [INFO] [stdout] 905 | | .intermediate_ref_cnt [INFO] [stdout] 906 | | .compare_exchange_weak( [INFO] [stdout] 907 | | 0, [INFO] [stdout] ... | [INFO] [stdout] 912 | | .is_ok() [INFO] [stdout] | |____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 904 ~ while self [INFO] [stdout] 905 + .intermediate_ref_cnt [INFO] [stdout] 906 + .compare_exchange_weak( [INFO] [stdout] 907 + 0, [INFO] [stdout] 908 + Self::UPDATE | Self::OTHER_UPDATE, [INFO] [stdout] 909 + Ordering::Acquire, [INFO] [stdout] 910 + Ordering::Relaxed, [INFO] [stdout] 911 + ).is_err() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `new` usually take no `self` [INFO] [stdout] --> src/lib.rs:1475:12 [INFO] [stdout] | [INFO] [stdout] 1475 | fn new(&self) -> &LocalCounted { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] = note: `#[warn(clippy::wrong_self_convention)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `new` usually return `Self` [INFO] [stdout] --> src/lib.rs:1475:5 [INFO] [stdout] | [INFO] [stdout] 1475 | / fn new(&self) -> &LocalCounted { [INFO] [stdout] 1476 | | unsafe { self.cache.get_unchecked(1 - self.curr_idx) } [INFO] [stdout] 1477 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_ret_no_self [INFO] [stdout] = note: `#[warn(clippy::new_ret_no_self)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: docs for unsafe trait missing `# Safety` section [INFO] [stdout] --> src/lib.rs:1597:1 [INFO] [stdout] | [INFO] [stdout] 1597 | pub unsafe trait RefCnt: Send + Sync + Clone {} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc [INFO] [stdout] = note: `#[warn(clippy::missing_safety_doc)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unsafe function's docs are missing a `# Safety` section [INFO] [stdout] --> src/lib.rs:1607:5 [INFO] [stdout] | [INFO] [stdout] 1607 | unsafe fn from(ptr: *const T) -> Self; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/lib.rs:144:17 [INFO] [stdout] | [INFO] [stdout] 144 | pub fn load(&self) -> SwapArcGuard { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 144 | pub fn load(&self) -> SwapArcGuard<'_, T, D, METADATA_BITS> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/lib.rs:198:21 [INFO] [stdout] | [INFO] [stdout] 198 | parent: &LocalData, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the lifetime is elided here [INFO] [stdout] 199 | ) -> SwapArcGuard { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 199 | ) -> SwapArcGuard<'_, T, D, META_DATA_BITS> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/lib.rs:509:22 [INFO] [stdout] | [INFO] [stdout] 509 | fn load_strongly(&self) -> SwapArcStrongGuard { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 509 | fn load_strongly(&self) -> SwapArcStrongGuard<'_, T, D, METADATA_BITS> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/lib.rs:1751:18 [INFO] [stdout] | [INFO] [stdout] 1751 | fn load_hook(sa: &Arc>) -> SwapArcGuard { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 1751 | fn load_hook(sa: &Arc>) -> SwapArcGuard<'_, usize> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `compare_exchange_inner` is never used [INFO] [stdout] --> src/lib.rs:887:15 [INFO] [stdout] | [INFO] [stdout] 89 | / impl, const METADATA_BITS: u32> [INFO] [stdout] 90 | | SwapArcAnyMeta [INFO] [stdout] | |_______________________________________- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 887 | unsafe fn compare_exchange_inner( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `inner` is never read [INFO] [stdout] --> src/lib.rs:1241:13 [INFO] [stdout] | [INFO] [stdout] 1240 | struct SwapArcFullPtrGuard = Arc, const METADATA_BITS: u32 = 0> { [INFO] [stdout] | ------------------- field in this struct [INFO] [stdout] 1241 | inner: D, [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `propagate_new_replace` is never used [INFO] [stdout] --> src/lib.rs:1455:15 [INFO] [stdout] | [INFO] [stdout] 1445 | impl> LocalDataInner { [INFO] [stdout] | --------------------------------------------------------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 1455 | unsafe fn propagate_new_replace(&mut self, replace: *mut T) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `val` is never used [INFO] [stdout] --> src/lib.rs:1558:8 [INFO] [stdout] | [INFO] [stdout] 1556 | impl> LocalCounted { [INFO] [stdout] | ------------------------------------------------------------- method in this implementation [INFO] [stdout] 1557 | #[inline] [INFO] [stdout] 1558 | fn val(&self) -> ManuallyDrop { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/lib.rs:1503:30 [INFO] [stdout] | [INFO] [stdout] 1501 | impl> OwnedData { [INFO] [stdout] | ---------------------------------------------------------- associated function in this implementation [INFO] [stdout] 1502 | #[inline] [INFO] [stdout] 1503 | pub(crate) unsafe fn new(val: *mut T) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `from_exposed_addr` is never used [INFO] [stdout] --> src/lib.rs:1710:19 [INFO] [stdout] | [INFO] [stdout] 1710 | pub(crate) fn from_exposed_addr(exposed_addr: usize) -> *const T { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `from_exposed_addr_mut` is never used [INFO] [stdout] --> src/lib.rs:1715:19 [INFO] [stdout] | [INFO] [stdout] 1715 | pub(crate) fn from_exposed_addr_mut(exposed_addr: usize) -> *mut T { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:410:13 [INFO] [stdout] | [INFO] [stdout] 410 | / return SwapArcGuard { [INFO] [stdout] 411 | | parent, [INFO] [stdout] 412 | | fake_ref, [INFO] [stdout] 413 | | idx, [INFO] [stdout] 414 | | }; [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 410 ~ SwapArcGuard { [INFO] [stdout] 411 + parent, [INFO] [stdout] 412 + fake_ref, [INFO] [stdout] 413 + idx, [INFO] [stdout] 414 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:340:29 [INFO] [stdout] | [INFO] [stdout] 340 | parent: &parent, [INFO] [stdout] | ^^^^^^^ help: change this to: `parent` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lib.rs:624:9 [INFO] [stdout] | [INFO] [stdout] 624 | / match self.intermediate_ref_cnt.compare_exchange( [INFO] [stdout] 625 | | 0, [INFO] [stdout] 626 | | Self::UPDATE | Self::OTHER_UPDATE, [INFO] [stdout] 627 | | Ordering::Acquire, [INFO] [stdout] ... | [INFO] [stdout] 668 | | Err(_) => {} [INFO] [stdout] 669 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 624 ~ if let Ok(_) = self.intermediate_ref_cnt.compare_exchange( [INFO] [stdout] 625 + 0, [INFO] [stdout] 626 + Self::UPDATE | Self::OTHER_UPDATE, [INFO] [stdout] 627 + Ordering::Acquire, [INFO] [stdout] 628 + Ordering::Relaxed, [INFO] [stdout] 629 + ) { [INFO] [stdout] 630 + // take the update [INFO] [stdout] 631 + [INFO] [stdout] 632 + // ORDERING: this is `Acquire` in order to establish a happens-before relationship with [INFO] [stdout] 633 + // to previous updates and thus ensure that the initialization has already happened when [INFO] [stdout] 634 + // we acquire the value of `updated`. [INFO] [stdout] 635 + let update = self.updated.swap(null_mut(), Ordering::Acquire); [INFO] [stdout] 636 + // check if we even have an update [INFO] [stdout] 637 + if update.is_null() { [INFO] [stdout] 638 + // unset the update flags as there's no update to be applied here [INFO] [stdout] 639 + [INFO] [stdout] 640 + // ORDERING: This is `Release` in order to establish a happens-before relationship [INFO] [stdout] 641 + // with loads of this counter and thus ensure that on the load of this counter [INFO] [stdout] 642 + // the critical section (in this case the swap of `updated`) has ended. [INFO] [stdout] 643 + self.intermediate_ref_cnt [INFO] [stdout] 644 + .fetch_and(!(Self::UPDATE | Self::OTHER_UPDATE), Ordering::Release); [INFO] [stdout] 645 + return; [INFO] [stdout] 646 + } [INFO] [stdout] 647 + [INFO] [stdout] 648 + // FIXME: ordering comment [INFO] [stdout] 649 + let metadata = Self::get_metadata(self.intermediate_ptr.load(Ordering::Acquire)); [INFO] [stdout] 650 + let update = Self::merge_ptr_and_metadata(update, metadata).cast_mut(); [INFO] [stdout] 651 + // FIXME: ordering comment [INFO] [stdout] 652 + self.intermediate_ptr.store(update, Ordering::Release); [INFO] [stdout] 653 + // unset the update flag [INFO] [stdout] 654 + [INFO] [stdout] 655 + // ORDERING: This is `Release` in order to establish a happens-before relationship [INFO] [stdout] 656 + // with loads of this counter and thus ensure that on the load of this counter [INFO] [stdout] 657 + // the critical section (in this case the swap of `updated` and the load + store [INFO] [stdout] 658 + // of `intermediate_ptr`) has ended. [INFO] [stdout] 659 + self.intermediate_ref_cnt [INFO] [stdout] 660 + .fetch_and(!Self::UPDATE, Ordering::Release); [INFO] [stdout] 661 + // try finishing the update up [INFO] [stdout] 662 + // FIXME: safety comment! [INFO] [stdout] 663 + unsafe { [INFO] [stdout] 664 + self.update_curr(update); [INFO] [stdout] 665 + } [INFO] [stdout] 666 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:904:15 [INFO] [stdout] | [INFO] [stdout] 904 | while !self [INFO] [stdout] | _______________^ [INFO] [stdout] 905 | | .intermediate_ref_cnt [INFO] [stdout] 906 | | .compare_exchange_weak( [INFO] [stdout] 907 | | 0, [INFO] [stdout] ... | [INFO] [stdout] 912 | | .is_ok() [INFO] [stdout] | |____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 904 ~ while self [INFO] [stdout] 905 + .intermediate_ref_cnt [INFO] [stdout] 906 + .compare_exchange_weak( [INFO] [stdout] 907 + 0, [INFO] [stdout] 908 + Self::UPDATE | Self::OTHER_UPDATE, [INFO] [stdout] 909 + Ordering::Acquire, [INFO] [stdout] 910 + Ordering::Relaxed, [INFO] [stdout] 911 + ).is_err() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `new` usually take no `self` [INFO] [stdout] --> src/lib.rs:1475:12 [INFO] [stdout] | [INFO] [stdout] 1475 | fn new(&self) -> &LocalCounted { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] = note: `#[warn(clippy::wrong_self_convention)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `new` usually return `Self` [INFO] [stdout] --> src/lib.rs:1475:5 [INFO] [stdout] | [INFO] [stdout] 1475 | / fn new(&self) -> &LocalCounted { [INFO] [stdout] 1476 | | unsafe { self.cache.get_unchecked(1 - self.curr_idx) } [INFO] [stdout] 1477 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_ret_no_self [INFO] [stdout] = note: `#[warn(clippy::new_ret_no_self)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: docs for unsafe trait missing `# Safety` section [INFO] [stdout] --> src/lib.rs:1597:1 [INFO] [stdout] | [INFO] [stdout] 1597 | pub unsafe trait RefCnt: Send + Sync + Clone {} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc [INFO] [stdout] = note: `#[warn(clippy::missing_safety_doc)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unsafe function's docs are missing a `# Safety` section [INFO] [stdout] --> src/lib.rs:1607:5 [INFO] [stdout] | [INFO] [stdout] 1607 | unsafe fn from(ptr: *const T) -> Self; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/lib.rs:144:17 [INFO] [stdout] | [INFO] [stdout] 144 | pub fn load(&self) -> SwapArcGuard { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 144 | pub fn load(&self) -> SwapArcGuard<'_, T, D, METADATA_BITS> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/lib.rs:198:21 [INFO] [stdout] | [INFO] [stdout] 198 | parent: &LocalData, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the lifetime is elided here [INFO] [stdout] 199 | ) -> SwapArcGuard { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 199 | ) -> SwapArcGuard<'_, T, D, META_DATA_BITS> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/lib.rs:509:22 [INFO] [stdout] | [INFO] [stdout] 509 | fn load_strongly(&self) -> SwapArcStrongGuard { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 509 | fn load_strongly(&self) -> SwapArcStrongGuard<'_, T, D, METADATA_BITS> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/lib.rs:1751:18 [INFO] [stdout] | [INFO] [stdout] 1751 | fn load_hook(sa: &Arc>) -> SwapArcGuard { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 1751 | fn load_hook(sa: &Arc>) -> SwapArcGuard<'_, usize> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `arc_swap::ArcSwap` [INFO] [stdout] --> benches/swap_arc.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use arc_swap::ArcSwap; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 16.73s [INFO] running `Command { std: "docker" "inspect" "ec0c7908d94f637578e115aff1e847c697b56021f50029b28a3c86db36121a9c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "ec0c7908d94f637578e115aff1e847c697b56021f50029b28a3c86db36121a9c", kill_on_drop: false }` [INFO] [stdout] ec0c7908d94f637578e115aff1e847c697b56021f50029b28a3c86db36121a9c