[INFO] fetching crate swap-arc 0.1.1... [INFO] linting swap-arc-0.1.1 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate swap-arc 0.1.1 into /workspace/builds/worker-3-tc1/source [INFO] started tweaking crates.io crate swap-arc 0.1.1 [INFO] finished tweaking crates.io crate swap-arc 0.1.1 [INFO] tweaked toml for crates.io crate swap-arc 0.1.1 written to /workspace/builds/worker-3-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate swap-arc 0.1.1 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] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "generate-lockfile" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Locking 21 packages to latest compatible versions [INFO] [stderr] Adding rand v0.8.5 (available: v0.10.0) [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] Downloading crates ... [INFO] [stderr] Downloaded likely_stable v0.1.3 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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] 5edb462fd9fb00f11ec27e5fbbab26d18b61833c31df96143e7cf03ee7fac719 [INFO] running `Command { std: "docker" "start" "-a" "5edb462fd9fb00f11ec27e5fbbab26d18b61833c31df96143e7cf03ee7fac719", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "5edb462fd9fb00f11ec27e5fbbab26d18b61833c31df96143e7cf03ee7fac719", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "5edb462fd9fb00f11ec27e5fbbab26d18b61833c31df96143e7cf03ee7fac719", kill_on_drop: false }` [INFO] [stdout] 5edb462fd9fb00f11ec27e5fbbab26d18b61833c31df96143e7cf03ee7fac719 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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] 99046741b1bfaefb234abbd200dc9b11543a23186d30c35e03c241c64526e56b [INFO] running `Command { std: "docker" "start" "-a" "99046741b1bfaefb234abbd200dc9b11543a23186d30c35e03c241c64526e56b", kill_on_drop: false }` [INFO] [stderr] warning: invalid feature `arc-swap` in required-features of target `swap_arc`: `arc-swap` is not present in [features] section [INFO] [stderr] warning: invalid feature `rand` in required-features of target `swap_arc`: `rand` is not present in [features] section [INFO] [stderr] Compiling likely_stable v0.1.3 [INFO] [stderr] Checking swap-arc v0.1.1 (/opt/rustwide/workdir) [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/lib.rs:51:1 [INFO] [stdout] | [INFO] [stdout] 51 | / /// to cache previous reads. [INFO] [stdout] 52 | | [INFO] [stdout] | |_^ [INFO] [stdout] 53 | /// Note: `SwapArc` has wait-free reads. [INFO] [stdout] 54 | 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] 52 | /// [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/lib.rs:51:1 [INFO] [stdout] | [INFO] [stdout] 51 | / /// to cache previous reads. [INFO] [stdout] 52 | | [INFO] [stdout] | |_^ [INFO] [stdout] 53 | /// Note: `SwapArc` has wait-free reads. [INFO] [stdout] 54 | 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] 52 | /// [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `compare_exchange_inner` is never used [INFO] [stdout] --> src/lib.rs:855:15 [INFO] [stdout] | [INFO] [stdout] 80 | / impl, const METADATA_BITS: u32> [INFO] [stdout] 81 | | SwapArcAnyMeta [INFO] [stdout] | |_______________________________________- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 855 | unsafe fn compare_exchange_inner(&self, old: *const T, new: *const T) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `from_exposed_addr` is never used [INFO] [stdout] --> src/lib.rs:1620:19 [INFO] [stdout] | [INFO] [stdout] 1620 | 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:1625:19 [INFO] [stdout] | [INFO] [stdout] 1625 | 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:393:13 [INFO] [stdout] | [INFO] [stdout] 393 | / return SwapArcGuard { [INFO] [stdout] 394 | | parent, [INFO] [stdout] 395 | | fake_ref, [INFO] [stdout] 396 | | gen_cnt, [INFO] [stdout] 397 | | }; [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] 393 ~ SwapArcGuard { [INFO] [stdout] 394 + parent, [INFO] [stdout] 395 + fake_ref, [INFO] [stdout] 396 + gen_cnt, [INFO] [stdout] 397 ~ } [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:332:29 [INFO] [stdout] | [INFO] [stdout] 332 | 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:604:9 [INFO] [stdout] | [INFO] [stdout] 604 | / match self.intermediate_ref_cnt.compare_exchange( [INFO] [stdout] 605 | | 0, [INFO] [stdout] 606 | | Self::UPDATE | Self::OTHER_UPDATE, [INFO] [stdout] 607 | | Ordering::Acquire, [INFO] [stdout] ... | [INFO] [stdout] 647 | | Err(_) => {} [INFO] [stdout] 648 | | } [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] 604 ~ if let Ok(_) = self.intermediate_ref_cnt.compare_exchange( [INFO] [stdout] 605 + 0, [INFO] [stdout] 606 + Self::UPDATE | Self::OTHER_UPDATE, [INFO] [stdout] 607 + Ordering::Acquire, [INFO] [stdout] 608 + Ordering::Relaxed, [INFO] [stdout] 609 + ) { [INFO] [stdout] 610 + // take the update [INFO] [stdout] 611 + [INFO] [stdout] 612 + // ORDERING: this is `Acquire` in order to establish a happens-before relationship with [INFO] [stdout] 613 + // to previous updates and thus ensure that the initialization has already happened when [INFO] [stdout] 614 + // we acquire the value of `updated`. [INFO] [stdout] 615 + let update = self.updated.swap(null_mut(), Ordering::Acquire); [INFO] [stdout] 616 + // check if we even have an update [INFO] [stdout] 617 + if update.is_null() { [INFO] [stdout] 618 + // unset the update flags as there's no update to be applied here [INFO] [stdout] 619 + [INFO] [stdout] 620 + // ORDERING: This is `Release` in order to establish a happens-before relationship [INFO] [stdout] 621 + // with loads of this counter and thus ensure that on the load of this counter [INFO] [stdout] 622 + // the critical section (in this case the swap of `updated`) has ended. [INFO] [stdout] 623 + self.intermediate_ref_cnt [INFO] [stdout] 624 + .fetch_and(!(Self::UPDATE | Self::OTHER_UPDATE), Ordering::Release); [INFO] [stdout] 625 + return; [INFO] [stdout] 626 + } [INFO] [stdout] 627 + [INFO] [stdout] 628 + // FIXME: ordering comment [INFO] [stdout] 629 + let metadata = [INFO] [stdout] 630 + Self::get_metadata(self.intermediate_ptr.load(Ordering::Acquire)); [INFO] [stdout] 631 + let update = Self::merge_ptr_and_metadata(update, metadata).cast_mut(); [INFO] [stdout] 632 + // FIXME: ordering comment [INFO] [stdout] 633 + self.intermediate_ptr.store(update, Ordering::Release); [INFO] [stdout] 634 + // unset the update flag [INFO] [stdout] 635 + [INFO] [stdout] 636 + // ORDERING: This is `Release` in order to establish a happens-before relationship [INFO] [stdout] 637 + // with loads of this counter and thus ensure that on the load of this counter [INFO] [stdout] 638 + // the critical section (in this case the swap of `updated` and the load + store [INFO] [stdout] 639 + // of `intermediate_ptr`) has ended. [INFO] [stdout] 640 + self.intermediate_ref_cnt [INFO] [stdout] 641 + .fetch_and(!Self::UPDATE, Ordering::Release); [INFO] [stdout] 642 + // try finishing the update up [INFO] [stdout] 643 + // FIXME: safety comment! [INFO] [stdout] 644 + unsafe { self.update_curr(update); } [INFO] [stdout] 645 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:868:15 [INFO] [stdout] | [INFO] [stdout] 868 | while !self [INFO] [stdout] | _______________^ [INFO] [stdout] 869 | | .intermediate_ref_cnt [INFO] [stdout] 870 | | .compare_exchange_weak( [INFO] [stdout] 871 | | 0, [INFO] [stdout] ... | [INFO] [stdout] 874 | | Ordering::Relaxed, [INFO] [stdout] 875 | | ).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] 868 ~ while self [INFO] [stdout] 869 + .intermediate_ref_cnt [INFO] [stdout] 870 + .compare_exchange_weak( [INFO] [stdout] 871 + 0, [INFO] [stdout] 872 + Self::UPDATE | Self::OTHER_UPDATE, [INFO] [stdout] 873 + Ordering::Acquire, [INFO] [stdout] 874 + Ordering::Relaxed, [INFO] [stdout] 875 ~ ).is_err() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lib.rs:1256:17 [INFO] [stdout] | [INFO] [stdout] 1256 | / if data.new.ref_cnt == 0 { [INFO] [stdout] 1257 | | if data.intermediate.ref_cnt != 0 { [INFO] [stdout] 1258 | | // increase the ref count of the new value [INFO] [stdout] 1259 | | data.intermediate.val().increase_ref_cnt(); [INFO] [stdout] ... | [INFO] [stdout] 1270 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1256 ~ if data.new.ref_cnt == 0 [INFO] [stdout] 1257 ~ && data.intermediate.ref_cnt != 0 { [INFO] [stdout] 1258 | // increase the ref count of the new value [INFO] [stdout] ... [INFO] [stdout] 1268 | .fetch_sub(1, Ordering::Release); [INFO] [stdout] 1269 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lib.rs:1450:9 [INFO] [stdout] | [INFO] [stdout] 1450 | / if DROP { [INFO] [stdout] 1451 | | if !self.ptr.is_null() { [INFO] [stdout] ... | [INFO] [stdout] 1458 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1450 ~ if DROP [INFO] [stdout] 1451 ~ && !self.ptr.is_null() { [INFO] [stdout] 1452 | // SAFETY: the person defining this struct has to make sure that [INFO] [stdout] ... [INFO] [stdout] 1456 | } [INFO] [stdout] 1457 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lib.rs:1494:9 [INFO] [stdout] | [INFO] [stdout] 1494 | / if DROP { [INFO] [stdout] 1495 | | if !self.ptr.is_null() { [INFO] [stdout] ... | [INFO] [stdout] 1502 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1494 ~ if DROP [INFO] [stdout] 1495 ~ && !self.ptr.is_null() { [INFO] [stdout] 1496 | // SAFETY: the person defining this struct has to make sure that [INFO] [stdout] ... [INFO] [stdout] 1500 | } [INFO] [stdout] 1501 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: docs for unsafe trait missing `# Safety` section [INFO] [stdout] --> src/lib.rs:1514:1 [INFO] [stdout] | [INFO] [stdout] 1514 | 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:1524:5 [INFO] [stdout] | [INFO] [stdout] 1524 | 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:134:17 [INFO] [stdout] | [INFO] [stdout] 134 | 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] 134 | 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:491:22 [INFO] [stdout] | [INFO] [stdout] 491 | 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] 491 | fn load_strongly(&self) -> SwapArcStrongGuard<'_, T, D, METADATA_BITS> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `compare_exchange_inner` is never used [INFO] [stdout] --> src/lib.rs:855:15 [INFO] [stdout] | [INFO] [stdout] 80 | / impl, const METADATA_BITS: u32> [INFO] [stdout] 81 | | SwapArcAnyMeta [INFO] [stdout] | |_______________________________________- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 855 | unsafe fn compare_exchange_inner(&self, old: *const T, new: *const T) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `from_exposed_addr` is never used [INFO] [stdout] --> src/lib.rs:1620:19 [INFO] [stdout] | [INFO] [stdout] 1620 | 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:1625:19 [INFO] [stdout] | [INFO] [stdout] 1625 | 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:393:13 [INFO] [stdout] | [INFO] [stdout] 393 | / return SwapArcGuard { [INFO] [stdout] 394 | | parent, [INFO] [stdout] 395 | | fake_ref, [INFO] [stdout] 396 | | gen_cnt, [INFO] [stdout] 397 | | }; [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] 393 ~ SwapArcGuard { [INFO] [stdout] 394 + parent, [INFO] [stdout] 395 + fake_ref, [INFO] [stdout] 396 + gen_cnt, [INFO] [stdout] 397 ~ } [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:332:29 [INFO] [stdout] | [INFO] [stdout] 332 | 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] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.87s [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:604:9 [INFO] [stdout] | [INFO] [stdout] 604 | / match self.intermediate_ref_cnt.compare_exchange( [INFO] [stdout] 605 | | 0, [INFO] [stdout] 606 | | Self::UPDATE | Self::OTHER_UPDATE, [INFO] [stdout] 607 | | Ordering::Acquire, [INFO] [stdout] ... | [INFO] [stdout] 647 | | Err(_) => {} [INFO] [stdout] 648 | | } [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] 604 ~ if let Ok(_) = self.intermediate_ref_cnt.compare_exchange( [INFO] [stdout] 605 + 0, [INFO] [stdout] 606 + Self::UPDATE | Self::OTHER_UPDATE, [INFO] [stdout] 607 + Ordering::Acquire, [INFO] [stdout] 608 + Ordering::Relaxed, [INFO] [stdout] 609 + ) { [INFO] [stdout] 610 + // take the update [INFO] [stdout] 611 + [INFO] [stdout] 612 + // ORDERING: this is `Acquire` in order to establish a happens-before relationship with [INFO] [stdout] 613 + // to previous updates and thus ensure that the initialization has already happened when [INFO] [stdout] 614 + // we acquire the value of `updated`. [INFO] [stdout] 615 + let update = self.updated.swap(null_mut(), Ordering::Acquire); [INFO] [stdout] 616 + // check if we even have an update [INFO] [stdout] 617 + if update.is_null() { [INFO] [stdout] 618 + // unset the update flags as there's no update to be applied here [INFO] [stdout] 619 + [INFO] [stdout] 620 + // ORDERING: This is `Release` in order to establish a happens-before relationship [INFO] [stdout] 621 + // with loads of this counter and thus ensure that on the load of this counter [INFO] [stdout] 622 + // the critical section (in this case the swap of `updated`) has ended. [INFO] [stdout] 623 + self.intermediate_ref_cnt [INFO] [stdout] 624 + .fetch_and(!(Self::UPDATE | Self::OTHER_UPDATE), Ordering::Release); [INFO] [stdout] 625 + return; [INFO] [stdout] 626 + } [INFO] [stdout] 627 + [INFO] [stdout] 628 + // FIXME: ordering comment [INFO] [stdout] 629 + let metadata = [INFO] [stdout] 630 + Self::get_metadata(self.intermediate_ptr.load(Ordering::Acquire)); [INFO] [stdout] 631 + let update = Self::merge_ptr_and_metadata(update, metadata).cast_mut(); [INFO] [stdout] 632 + // FIXME: ordering comment [INFO] [stdout] 633 + self.intermediate_ptr.store(update, Ordering::Release); [INFO] [stdout] 634 + // unset the update flag [INFO] [stdout] 635 + [INFO] [stdout] 636 + // ORDERING: This is `Release` in order to establish a happens-before relationship [INFO] [stdout] 637 + // with loads of this counter and thus ensure that on the load of this counter [INFO] [stdout] 638 + // the critical section (in this case the swap of `updated` and the load + store [INFO] [stdout] 639 + // of `intermediate_ptr`) has ended. [INFO] [stdout] 640 + self.intermediate_ref_cnt [INFO] [stdout] 641 + .fetch_and(!Self::UPDATE, Ordering::Release); [INFO] [stdout] 642 + // try finishing the update up [INFO] [stdout] 643 + // FIXME: safety comment! [INFO] [stdout] 644 + unsafe { self.update_curr(update); } [INFO] [stdout] 645 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:868:15 [INFO] [stdout] | [INFO] [stdout] 868 | while !self [INFO] [stdout] | _______________^ [INFO] [stdout] 869 | | .intermediate_ref_cnt [INFO] [stdout] 870 | | .compare_exchange_weak( [INFO] [stdout] 871 | | 0, [INFO] [stdout] ... | [INFO] [stdout] 874 | | Ordering::Relaxed, [INFO] [stdout] 875 | | ).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] 868 ~ while self [INFO] [stdout] 869 + .intermediate_ref_cnt [INFO] [stdout] 870 + .compare_exchange_weak( [INFO] [stdout] 871 + 0, [INFO] [stdout] 872 + Self::UPDATE | Self::OTHER_UPDATE, [INFO] [stdout] 873 + Ordering::Acquire, [INFO] [stdout] 874 + Ordering::Relaxed, [INFO] [stdout] 875 ~ ).is_err() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lib.rs:1256:17 [INFO] [stdout] | [INFO] [stdout] 1256 | / if data.new.ref_cnt == 0 { [INFO] [stdout] 1257 | | if data.intermediate.ref_cnt != 0 { [INFO] [stdout] 1258 | | // increase the ref count of the new value [INFO] [stdout] 1259 | | data.intermediate.val().increase_ref_cnt(); [INFO] [stdout] ... | [INFO] [stdout] 1270 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1256 ~ if data.new.ref_cnt == 0 [INFO] [stdout] 1257 ~ && data.intermediate.ref_cnt != 0 { [INFO] [stdout] 1258 | // increase the ref count of the new value [INFO] [stdout] ... [INFO] [stdout] 1268 | .fetch_sub(1, Ordering::Release); [INFO] [stdout] 1269 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lib.rs:1450:9 [INFO] [stdout] | [INFO] [stdout] 1450 | / if DROP { [INFO] [stdout] 1451 | | if !self.ptr.is_null() { [INFO] [stdout] ... | [INFO] [stdout] 1458 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1450 ~ if DROP [INFO] [stdout] 1451 ~ && !self.ptr.is_null() { [INFO] [stdout] 1452 | // SAFETY: the person defining this struct has to make sure that [INFO] [stdout] ... [INFO] [stdout] 1456 | } [INFO] [stdout] 1457 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lib.rs:1494:9 [INFO] [stdout] | [INFO] [stdout] 1494 | / if DROP { [INFO] [stdout] 1495 | | if !self.ptr.is_null() { [INFO] [stdout] ... | [INFO] [stdout] 1502 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1494 ~ if DROP [INFO] [stdout] 1495 ~ && !self.ptr.is_null() { [INFO] [stdout] 1496 | // SAFETY: the person defining this struct has to make sure that [INFO] [stdout] ... [INFO] [stdout] 1500 | } [INFO] [stdout] 1501 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: docs for unsafe trait missing `# Safety` section [INFO] [stdout] --> src/lib.rs:1514:1 [INFO] [stdout] | [INFO] [stdout] 1514 | 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:1524:5 [INFO] [stdout] | [INFO] [stdout] 1524 | 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:134:17 [INFO] [stdout] | [INFO] [stdout] 134 | 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] 134 | 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:491:22 [INFO] [stdout] | [INFO] [stdout] 491 | 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] 491 | fn load_strongly(&self) -> SwapArcStrongGuard<'_, T, D, METADATA_BITS> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] running `Command { std: "docker" "inspect" "99046741b1bfaefb234abbd200dc9b11543a23186d30c35e03c241c64526e56b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "99046741b1bfaefb234abbd200dc9b11543a23186d30c35e03c241c64526e56b", kill_on_drop: false }` [INFO] [stdout] 99046741b1bfaefb234abbd200dc9b11543a23186d30c35e03c241c64526e56b