[INFO] fetching crate blastfig 0.3.3... [INFO] linting blastfig-0.3.3 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate blastfig 0.3.3 into /workspace/builds/worker-3-tc1/source [INFO] started tweaking crates.io crate blastfig 0.3.3 [INFO] finished tweaking crates.io crate blastfig 0.3.3 [INFO] tweaked toml for crates.io crate blastfig 0.3.3 written to /workspace/builds/worker-3-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate blastfig 0.3.3 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 20 packages to latest compatible versions [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] warning: `package.edition` is unspecified, defaulting to `2015` while the latest is `2024` [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded term v0.5.2 [INFO] [stderr] Downloaded clippy v0.0.302 [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] 859f8cab6d042f727b90c46b57858f079e43c01ef5e00e50834e37c43653e70e [INFO] running `Command { std: "docker" "start" "-a" "859f8cab6d042f727b90c46b57858f079e43c01ef5e00e50834e37c43653e70e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "859f8cab6d042f727b90c46b57858f079e43c01ef5e00e50834e37c43653e70e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "859f8cab6d042f727b90c46b57858f079e43c01ef5e00e50834e37c43653e70e", kill_on_drop: false }` [INFO] [stdout] 859f8cab6d042f727b90c46b57858f079e43c01ef5e00e50834e37c43653e70e [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] 877051aaca0c1d6758558595ac947fb4e3c37a50d7f9bad6e4b9292ee68bcb10 [INFO] running `Command { std: "docker" "start" "-a" "877051aaca0c1d6758558595ac947fb4e3c37a50d7f9bad6e4b9292ee68bcb10", kill_on_drop: false }` [INFO] [stderr] warning: `package.edition` is unspecified, defaulting to `2015` while the latest is `2024` [INFO] [stderr] Checking blastfig v0.3.3 (/opt/rustwide/workdir) [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/lib.rs:134:1 [INFO] [stdout] | [INFO] [stdout] 134 | / /// if they are. [INFO] [stdout] 135 | | [INFO] [stdout] | |_^ [INFO] [stdout] 136 | #[macro_export] [INFO] [stdout] 137 | macro_rules! bitflags { [INFO] [stdout] | --------------------- the comment documents this macro definition [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 comment should document the crate use an inner doc comment [INFO] [stdout] | [INFO] [stdout] 16 ~ //! The `bitflags!` macro generates a `struct` that holds a set of C-style [INFO] [stdout] 17 ~ //! bitmask flags. It is useful for creating typesafe wrappers for C APIs. [INFO] [stdout] 18 ~ //! [INFO] [stdout] 19 ~ //! The flags should only be defined for integer types, otherwise unexpected [INFO] [stdout] 20 ~ //! type errors may occur at compile time. [INFO] [stdout] 21 ~ //! [INFO] [stdout] 22 ~ //! # Example [INFO] [stdout] 23 ~ //! [INFO] [stdout] 24 ~ //! ```{.rust} [INFO] [stdout] 25 ~ //! #[macro_use] [INFO] [stdout] 26 ~ //! extern crate blastfig; [INFO] [stdout] 27 ~ //! [INFO] [stdout] 28 ~ //! bitflags! { [INFO] [stdout] 29 ~ //! flags Flags: u32 { [INFO] [stdout] 30 ~ //! const FLAG_A = 0b00000001, [INFO] [stdout] 31 ~ //! const FLAG_B = 0b00000010, [INFO] [stdout] 32 ~ //! const FLAG_C = 0b00000100, [INFO] [stdout] 33 ~ //! const FLAG_ABC = FLAG_A.bits [INFO] [stdout] 34 ~ //! | FLAG_B.bits [INFO] [stdout] 35 ~ //! | FLAG_C.bits, [INFO] [stdout] 36 ~ //! } [INFO] [stdout] 37 ~ //! } [INFO] [stdout] 38 ~ //! [INFO] [stdout] 39 ~ //! fn main() { [INFO] [stdout] 40 ~ //! let e1 = FLAG_A | FLAG_C; [INFO] [stdout] 41 ~ //! let e2 = FLAG_B | FLAG_C; [INFO] [stdout] 42 ~ //! assert!((e1 | e2) == FLAG_ABC); // union [INFO] [stdout] 43 ~ //! assert!((e1 & e2) == FLAG_C); // intersection [INFO] [stdout] 44 ~ //! assert!((e1 - e2) == FLAG_A); // set difference [INFO] [stdout] 45 ~ //! assert!(!e2 == FLAG_A); // set complement [INFO] [stdout] 46 ~ //! } [INFO] [stdout] 47 ~ //! ``` [INFO] [stdout] 48 ~ //! [INFO] [stdout] 49 ~ //! The generated `struct`s can also be extended with type and trait [INFO] [stdout] 50 ~ //! implementations: [INFO] [stdout] 51 ~ //! [INFO] [stdout] 52 ~ //! ```{.rust} [INFO] [stdout] 53 ~ //! #[macro_use] [INFO] [stdout] 54 ~ //! extern crate blastfig; [INFO] [stdout] 55 ~ //! [INFO] [stdout] 56 ~ //! use std::fmt; [INFO] [stdout] 57 ~ //! [INFO] [stdout] 58 ~ //! bitflags! { [INFO] [stdout] 59 ~ //! flags Flags: u32 { [INFO] [stdout] 60 ~ //! const FLAG_A = 0b00000001, [INFO] [stdout] 61 ~ //! const FLAG_B = 0b00000010, [INFO] [stdout] 62 ~ //! } [INFO] [stdout] 63 ~ //! } [INFO] [stdout] 64 ~ //! [INFO] [stdout] 65 ~ //! impl Flags { [INFO] [stdout] 66 ~ //! pub fn clear(&mut self) { [INFO] [stdout] 67 ~ //! self.bits = 0; // The `bits` field can be accessed from within the [INFO] [stdout] 68 ~ //! // same module where the `bitflags!` macro was invoked. [INFO] [stdout] 69 ~ //! } [INFO] [stdout] 70 ~ //! } [INFO] [stdout] 71 ~ //! [INFO] [stdout] 72 ~ //! impl fmt::Display for Flags { [INFO] [stdout] 73 ~ //! fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { [INFO] [stdout] 74 ~ //! write!(f, "hi!") [INFO] [stdout] 75 ~ //! } [INFO] [stdout] 76 ~ //! } [INFO] [stdout] 77 ~ //! [INFO] [stdout] 78 ~ //! fn main() { [INFO] [stdout] 79 ~ //! let mut flags = FLAG_A | FLAG_B; [INFO] [stdout] 80 ~ //! flags.clear(); [INFO] [stdout] 81 ~ //! assert!(flags.is_empty()); [INFO] [stdout] 82 ~ //! assert_eq!(format!("{}", flags), "hi!"); [INFO] [stdout] 83 ~ //! assert_eq!(format!("{:?}", FLAG_A | FLAG_B), "FLAG_A | FLAG_B"); [INFO] [stdout] 84 ~ //! assert_eq!(format!("{:?}", FLAG_B), "FLAG_B"); [INFO] [stdout] 85 ~ //! } [INFO] [stdout] 86 ~ //! ``` [INFO] [stdout] 87 ~ //! [INFO] [stdout] 88 ~ //! # Attributes [INFO] [stdout] 89 ~ //! [INFO] [stdout] 90 ~ //! Attributes can be attached to the generated `struct` by placing them [INFO] [stdout] 91 ~ //! before the `flags` keyword. [INFO] [stdout] 92 ~ //! [INFO] [stdout] 93 ~ //! # Trait implementations [INFO] [stdout] 94 ~ //! [INFO] [stdout] 95 ~ //! The `Copy`, `Clone`, `PartialEq`, `Eq`, `PartialOrd`, `Ord` and `Hash` [INFO] [stdout] 96 ~ //! traits automatically derived for the `struct` using the `derive` attribute. [INFO] [stdout] 97 ~ //! Additional traits can be derived by providing an explicit `derive` [INFO] [stdout] 98 ~ //! attribute on `flags`. [INFO] [stdout] 99 ~ //! [INFO] [stdout] 100 ~ //! The `FromIterator` trait is implemented for the `struct`, too, calculating [INFO] [stdout] 101 ~ //! the union of the instances of the `struct` iterated over. [INFO] [stdout] 102 ~ //! [INFO] [stdout] 103 ~ //! The `Debug` trait is also implemented by displaying the bits value of the [INFO] [stdout] 104 ~ //! internal struct. [INFO] [stdout] 105 ~ //! [INFO] [stdout] 106 ~ //! ## Operators [INFO] [stdout] 107 ~ //! [INFO] [stdout] 108 ~ //! The following operator traits are implemented for the generated `struct`: [INFO] [stdout] 109 ~ //! [INFO] [stdout] 110 ~ //! - `BitOr`: union [INFO] [stdout] 111 ~ //! - `BitAnd`: intersection [INFO] [stdout] 112 ~ //! - `BitXor`: toggle [INFO] [stdout] 113 ~ //! - `Sub`: set difference [INFO] [stdout] 114 ~ //! - `Not`: set complement [INFO] [stdout] 115 ~ //! [INFO] [stdout] 116 ~ //! # Methods [INFO] [stdout] 117 ~ //! [INFO] [stdout] 118 ~ //! The following methods are defined for the generated `struct`: [INFO] [stdout] 119 ~ //! [INFO] [stdout] 120 ~ //! - `empty`: an empty set of flags [INFO] [stdout] 121 ~ //! - `all`: the set of all flags [INFO] [stdout] 122 ~ //! - `bits`: the raw value of the flags currently stored [INFO] [stdout] 123 ~ //! - `from_bits`: convert from underlying bit representation, unless that [INFO] [stdout] 124 ~ //! representation contains bits that do not correspond to a flag [INFO] [stdout] 125 ~ //! - `from_bits_truncate`: convert from underlying bit representation, dropping [INFO] [stdout] 126 ~ //! any bits that do not correspond to flags [INFO] [stdout] 127 ~ //! - `is_empty`: `true` if no flags are currently stored [INFO] [stdout] 128 ~ //! - `is_all`: `true` if all flags are currently set [INFO] [stdout] 129 ~ //! - `intersects`: `true` if there are flags common to both `self` and `other` [INFO] [stdout] 130 ~ //! - `contains`: `true` all of the flags in `other` are contained within `self` [INFO] [stdout] 131 ~ //! - `insert`: inserts the specified flags in-place [INFO] [stdout] 132 ~ //! - `remove`: removes the specified flags in-place [INFO] [stdout] 133 ~ //! - `toggle`: the specified flags will be inserted if not present, and removed [INFO] [stdout] 134 ~ //! if they are. [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated macro `try`: use the `?` operator instead [INFO] [stdout] --> src/lib.rs:182:33 [INFO] [stdout] | [INFO] [stdout] 182 | try!(f.write_str(stringify!($Flag))); [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 361 | / bitflags! { [INFO] [stdout] 362 | | #[doc = "> The first principle is that you must not fool yourself \u{2014} and"] [INFO] [stdout] 363 | | #[doc = "> you are the easiest person to fool."] [INFO] [stdout] 364 | | #[doc = "> "] [INFO] [stdout] ... | [INFO] [stdout] 378 | | } [INFO] [stdout] | |_____- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(deprecated)]` on by default [INFO] [stdout] = note: this warning originates in the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated macro `try`: use the `?` operator instead [INFO] [stdout] --> src/lib.rs:178:37 [INFO] [stdout] | [INFO] [stdout] 178 | try!(f.write_str(" | ")); [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 361 | / bitflags! { [INFO] [stdout] 362 | | #[doc = "> The first principle is that you must not fool yourself \u{2014} and"] [INFO] [stdout] 363 | | #[doc = "> you are the easiest person to fool."] [INFO] [stdout] 364 | | #[doc = "> "] [INFO] [stdout] ... | [INFO] [stdout] 378 | | } [INFO] [stdout] | |_____- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = note: this warning originates in the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:230:61 [INFO] [stdout] | [INFO] [stdout] 230 | ::std::option::Option::Some($BitFlags { bits: bits }) [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `bits` [INFO] [stdout] ... [INFO] [stdout] 361 | / bitflags! { [INFO] [stdout] 362 | | #[doc = "> The first principle is that you must not fool yourself \u{2014} and"] [INFO] [stdout] 363 | | #[doc = "> you are the easiest person to fool."] [INFO] [stdout] 364 | | #[doc = "> "] [INFO] [stdout] ... | [INFO] [stdout] 378 | | } [INFO] [stdout] | |_____- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] = note: this warning originates in the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:238:29 [INFO] [stdout] | [INFO] [stdout] 238 | $BitFlags { bits: bits } & $BitFlags::all() [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `bits` [INFO] [stdout] ... [INFO] [stdout] 361 | / bitflags! { [INFO] [stdout] 362 | | #[doc = "> The first principle is that you must not fool yourself \u{2014} and"] [INFO] [stdout] 363 | | #[doc = "> you are the easiest person to fool."] [INFO] [stdout] 364 | | #[doc = "> "] [INFO] [stdout] ... | [INFO] [stdout] 378 | | } [INFO] [stdout] | |_____- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: this warning originates in the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated macro `try`: use the `?` operator instead [INFO] [stdout] --> src/lib.rs:182:33 [INFO] [stdout] | [INFO] [stdout] 182 | try!(f.write_str(stringify!($Flag))); [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 380 | / bitflags! { [INFO] [stdout] 381 | | flags _CfgFlags: u32 { [INFO] [stdout] 382 | | #[cfg(windows)] [INFO] [stdout] 383 | | const _CfgA = 0b01, [INFO] [stdout] ... | [INFO] [stdout] 389 | | } [INFO] [stdout] | |_____- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = note: this warning originates in the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated macro `try`: use the `?` operator instead [INFO] [stdout] --> src/lib.rs:178:37 [INFO] [stdout] | [INFO] [stdout] 178 | try!(f.write_str(" | ")); [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 380 | / bitflags! { [INFO] [stdout] 381 | | flags _CfgFlags: u32 { [INFO] [stdout] 382 | | #[cfg(windows)] [INFO] [stdout] 383 | | const _CfgA = 0b01, [INFO] [stdout] ... | [INFO] [stdout] 389 | | } [INFO] [stdout] | |_____- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = note: this warning originates in the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:230:61 [INFO] [stdout] | [INFO] [stdout] 230 | ::std::option::Option::Some($BitFlags { bits: bits }) [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `bits` [INFO] [stdout] ... [INFO] [stdout] 380 | / bitflags! { [INFO] [stdout] 381 | | flags _CfgFlags: u32 { [INFO] [stdout] 382 | | #[cfg(windows)] [INFO] [stdout] 383 | | const _CfgA = 0b01, [INFO] [stdout] ... | [INFO] [stdout] 389 | | } [INFO] [stdout] | |_____- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: this warning originates in the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:238:29 [INFO] [stdout] | [INFO] [stdout] 238 | $BitFlags { bits: bits } & $BitFlags::all() [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `bits` [INFO] [stdout] ... [INFO] [stdout] 380 | / bitflags! { [INFO] [stdout] 381 | | flags _CfgFlags: u32 { [INFO] [stdout] 382 | | #[cfg(windows)] [INFO] [stdout] 383 | | const _CfgA = 0b01, [INFO] [stdout] ... | [INFO] [stdout] 389 | | } [INFO] [stdout] | |_____- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: this warning originates in the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated macro `try`: use the `?` operator instead [INFO] [stdout] --> src/lib.rs:182:33 [INFO] [stdout] | [INFO] [stdout] 182 | try!(f.write_str(stringify!($Flag))); [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 391 | / bitflags! { [INFO] [stdout] 392 | | flags AnotherSetOfFlags: i8 { [INFO] [stdout] 393 | | const AnotherFlag = -1_i8, [INFO] [stdout] 394 | | } [INFO] [stdout] 395 | | } [INFO] [stdout] | |_____- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = note: this warning originates in the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated macro `try`: use the `?` operator instead [INFO] [stdout] --> src/lib.rs:178:37 [INFO] [stdout] | [INFO] [stdout] 178 | try!(f.write_str(" | ")); [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 391 | / bitflags! { [INFO] [stdout] 392 | | flags AnotherSetOfFlags: i8 { [INFO] [stdout] 393 | | const AnotherFlag = -1_i8, [INFO] [stdout] 394 | | } [INFO] [stdout] 395 | | } [INFO] [stdout] | |_____- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = note: this warning originates in the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:230:61 [INFO] [stdout] | [INFO] [stdout] 230 | ::std::option::Option::Some($BitFlags { bits: bits }) [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `bits` [INFO] [stdout] ... [INFO] [stdout] 391 | / bitflags! { [INFO] [stdout] 392 | | flags AnotherSetOfFlags: i8 { [INFO] [stdout] 393 | | const AnotherFlag = -1_i8, [INFO] [stdout] 394 | | } [INFO] [stdout] 395 | | } [INFO] [stdout] | |_____- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: this warning originates in the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:238:29 [INFO] [stdout] | [INFO] [stdout] 238 | $BitFlags { bits: bits } & $BitFlags::all() [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `bits` [INFO] [stdout] ... [INFO] [stdout] 391 | / bitflags! { [INFO] [stdout] 392 | | flags AnotherSetOfFlags: i8 { [INFO] [stdout] 393 | | const AnotherFlag = -1_i8, [INFO] [stdout] 394 | | } [INFO] [stdout] 395 | | } [INFO] [stdout] | |_____- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: this warning originates in the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated struct `std::hash::SipHasher`: use `std::hash::DefaultHasher` instead [INFO] [stdout] --> src/lib.rs:359:21 [INFO] [stdout] | [INFO] [stdout] 359 | use std::hash::{SipHasher, Hash, Hasher}; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated struct `std::hash::SipHasher`: use `std::hash::DefaultHasher` instead [INFO] [stdout] --> src/lib.rs:567:21 [INFO] [stdout] | [INFO] [stdout] 567 | let mut s = SipHasher::new_with_keys(0, 0); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/lib.rs:134:1 [INFO] [stdout] | [INFO] [stdout] 134 | / /// if they are. [INFO] [stdout] 135 | | [INFO] [stdout] | |_^ [INFO] [stdout] 136 | #[macro_export] [INFO] [stdout] 137 | macro_rules! bitflags { [INFO] [stdout] | --------------------- the comment documents this macro definition [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 comment should document the crate use an inner doc comment [INFO] [stdout] | [INFO] [stdout] 16 ~ //! The `bitflags!` macro generates a `struct` that holds a set of C-style [INFO] [stdout] 17 ~ //! bitmask flags. It is useful for creating typesafe wrappers for C APIs. [INFO] [stdout] 18 ~ //! [INFO] [stdout] 19 ~ //! The flags should only be defined for integer types, otherwise unexpected [INFO] [stdout] 20 ~ //! type errors may occur at compile time. [INFO] [stdout] 21 ~ //! [INFO] [stdout] 22 ~ //! # Example [INFO] [stdout] 23 ~ //! [INFO] [stdout] 24 ~ //! ```{.rust} [INFO] [stdout] 25 ~ //! #[macro_use] [INFO] [stdout] 26 ~ //! extern crate blastfig; [INFO] [stdout] 27 ~ //! [INFO] [stdout] 28 ~ //! bitflags! { [INFO] [stdout] 29 ~ //! flags Flags: u32 { [INFO] [stdout] 30 ~ //! const FLAG_A = 0b00000001, [INFO] [stdout] 31 ~ //! const FLAG_B = 0b00000010, [INFO] [stdout] 32 ~ //! const FLAG_C = 0b00000100, [INFO] [stdout] 33 ~ //! const FLAG_ABC = FLAG_A.bits [INFO] [stdout] 34 ~ //! | FLAG_B.bits [INFO] [stdout] 35 ~ //! | FLAG_C.bits, [INFO] [stdout] 36 ~ //! } [INFO] [stdout] 37 ~ //! } [INFO] [stdout] 38 ~ //! [INFO] [stdout] 39 ~ //! fn main() { [INFO] [stdout] 40 ~ //! let e1 = FLAG_A | FLAG_C; [INFO] [stdout] 41 ~ //! let e2 = FLAG_B | FLAG_C; [INFO] [stdout] 42 ~ //! assert!((e1 | e2) == FLAG_ABC); // union [INFO] [stdout] 43 ~ //! assert!((e1 & e2) == FLAG_C); // intersection [INFO] [stdout] 44 ~ //! assert!((e1 - e2) == FLAG_A); // set difference [INFO] [stdout] 45 ~ //! assert!(!e2 == FLAG_A); // set complement [INFO] [stdout] 46 ~ //! } [INFO] [stdout] 47 ~ //! ``` [INFO] [stdout] 48 ~ //! [INFO] [stdout] 49 ~ //! The generated `struct`s can also be extended with type and trait [INFO] [stdout] 50 ~ //! implementations: [INFO] [stdout] 51 ~ //! [INFO] [stdout] 52 ~ //! ```{.rust} [INFO] [stdout] 53 ~ //! #[macro_use] [INFO] [stdout] 54 ~ //! extern crate blastfig; [INFO] [stdout] 55 ~ //! [INFO] [stdout] 56 ~ //! use std::fmt; [INFO] [stdout] 57 ~ //! [INFO] [stdout] 58 ~ //! bitflags! { [INFO] [stdout] 59 ~ //! flags Flags: u32 { [INFO] [stdout] 60 ~ //! const FLAG_A = 0b00000001, [INFO] [stdout] 61 ~ //! const FLAG_B = 0b00000010, [INFO] [stdout] 62 ~ //! } [INFO] [stdout] 63 ~ //! } [INFO] [stdout] 64 ~ //! [INFO] [stdout] 65 ~ //! impl Flags { [INFO] [stdout] 66 ~ //! pub fn clear(&mut self) { [INFO] [stdout] 67 ~ //! self.bits = 0; // The `bits` field can be accessed from within the [INFO] [stdout] 68 ~ //! // same module where the `bitflags!` macro was invoked. [INFO] [stdout] 69 ~ //! } [INFO] [stdout] 70 ~ //! } [INFO] [stdout] 71 ~ //! [INFO] [stdout] 72 ~ //! impl fmt::Display for Flags { [INFO] [stdout] 73 ~ //! fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { [INFO] [stdout] 74 ~ //! write!(f, "hi!") [INFO] [stdout] 75 ~ //! } [INFO] [stdout] 76 ~ //! } [INFO] [stdout] 77 ~ //! [INFO] [stdout] 78 ~ //! fn main() { [INFO] [stdout] 79 ~ //! let mut flags = FLAG_A | FLAG_B; [INFO] [stdout] 80 ~ //! flags.clear(); [INFO] [stdout] 81 ~ //! assert!(flags.is_empty()); [INFO] [stdout] 82 ~ //! assert_eq!(format!("{}", flags), "hi!"); [INFO] [stdout] 83 ~ //! assert_eq!(format!("{:?}", FLAG_A | FLAG_B), "FLAG_A | FLAG_B"); [INFO] [stdout] 84 ~ //! assert_eq!(format!("{:?}", FLAG_B), "FLAG_B"); [INFO] [stdout] 85 ~ //! } [INFO] [stdout] 86 ~ //! ``` [INFO] [stdout] 87 ~ //! [INFO] [stdout] 88 ~ //! # Attributes [INFO] [stdout] 89 ~ //! [INFO] [stdout] 90 ~ //! Attributes can be attached to the generated `struct` by placing them [INFO] [stdout] 91 ~ //! before the `flags` keyword. [INFO] [stdout] 92 ~ //! [INFO] [stdout] 93 ~ //! # Trait implementations [INFO] [stdout] 94 ~ //! [INFO] [stdout] 95 ~ //! The `Copy`, `Clone`, `PartialEq`, `Eq`, `PartialOrd`, `Ord` and `Hash` [INFO] [stdout] 96 ~ //! traits automatically derived for the `struct` using the `derive` attribute. [INFO] [stdout] 97 ~ //! Additional traits can be derived by providing an explicit `derive` [INFO] [stdout] 98 ~ //! attribute on `flags`. [INFO] [stdout] 99 ~ //! [INFO] [stdout] 100 ~ //! The `FromIterator` trait is implemented for the `struct`, too, calculating [INFO] [stdout] 101 ~ //! the union of the instances of the `struct` iterated over. [INFO] [stdout] 102 ~ //! [INFO] [stdout] 103 ~ //! The `Debug` trait is also implemented by displaying the bits value of the [INFO] [stdout] 104 ~ //! internal struct. [INFO] [stdout] 105 ~ //! [INFO] [stdout] 106 ~ //! ## Operators [INFO] [stdout] 107 ~ //! [INFO] [stdout] 108 ~ //! The following operator traits are implemented for the generated `struct`: [INFO] [stdout] 109 ~ //! [INFO] [stdout] 110 ~ //! - `BitOr`: union [INFO] [stdout] 111 ~ //! - `BitAnd`: intersection [INFO] [stdout] 112 ~ //! - `BitXor`: toggle [INFO] [stdout] 113 ~ //! - `Sub`: set difference [INFO] [stdout] 114 ~ //! - `Not`: set complement [INFO] [stdout] 115 ~ //! [INFO] [stdout] 116 ~ //! # Methods [INFO] [stdout] 117 ~ //! [INFO] [stdout] 118 ~ //! The following methods are defined for the generated `struct`: [INFO] [stdout] 119 ~ //! [INFO] [stdout] 120 ~ //! - `empty`: an empty set of flags [INFO] [stdout] 121 ~ //! - `all`: the set of all flags [INFO] [stdout] 122 ~ //! - `bits`: the raw value of the flags currently stored [INFO] [stdout] 123 ~ //! - `from_bits`: convert from underlying bit representation, unless that [INFO] [stdout] 124 ~ //! representation contains bits that do not correspond to a flag [INFO] [stdout] 125 ~ //! - `from_bits_truncate`: convert from underlying bit representation, dropping [INFO] [stdout] 126 ~ //! any bits that do not correspond to flags [INFO] [stdout] 127 ~ //! - `is_empty`: `true` if no flags are currently stored [INFO] [stdout] 128 ~ //! - `is_all`: `true` if all flags are currently set [INFO] [stdout] 129 ~ //! - `intersects`: `true` if there are flags common to both `self` and `other` [INFO] [stdout] 130 ~ //! - `contains`: `true` all of the flags in `other` are contained within `self` [INFO] [stdout] 131 ~ //! - `insert`: inserts the specified flags in-place [INFO] [stdout] 132 ~ //! - `remove`: removes the specified flags in-place [INFO] [stdout] 133 ~ //! - `toggle`: the specified flags will be inserted if not present, and removed [INFO] [stdout] 134 ~ //! if they are. [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> src/lib.rs:124:5 [INFO] [stdout] | [INFO] [stdout] 124 | /// representation contains bits that do not correspond to a flag [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] = note: `#[warn(clippy::doc_overindented_list_items)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> src/lib.rs:126:5 [INFO] [stdout] | [INFO] [stdout] 126 | /// any bits that do not correspond to flags [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> src/lib.rs:134:5 [INFO] [stdout] | [INFO] [stdout] 134 | /// if they are. [INFO] [stdout] | ^^^^^^^^^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated associated function `std::hash::SipHasher::new_with_keys`: use `std::hash::DefaultHasher` instead [INFO] [stdout] --> src/lib.rs:567:32 [INFO] [stdout] | [INFO] [stdout] 567 | let mut s = SipHasher::new_with_keys(0, 0); [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> src/lib.rs:124:5 [INFO] [stdout] | [INFO] [stdout] 124 | /// representation contains bits that do not correspond to a flag [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] = note: `#[warn(clippy::doc_overindented_list_items)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> src/lib.rs:126:5 [INFO] [stdout] | [INFO] [stdout] 126 | /// any bits that do not correspond to flags [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> src/lib.rs:134:5 [INFO] [stdout] | [INFO] [stdout] 134 | /// if they are. [INFO] [stdout] | ^^^^^^^^^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/lib.rs:413:17 [INFO] [stdout] | [INFO] [stdout] 413 | assert!(Flags::from_bits(0b1000) == None); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `Flags::from_bits(0b1000).is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] = note: `#[warn(clippy::partialeq_to_none)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:543:17 [INFO] [stdout] | [INFO] [stdout] 543 | assert!(!(a < b) && !(b < a)); [INFO] [stdout] | ^^^^^^^^ help: try: `(a >= b)` [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] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:543:29 [INFO] [stdout] | [INFO] [stdout] 543 | assert!(!(a < b) && !(b < a)); [INFO] [stdout] | ^^^^^^^^ help: try: `(b >= a)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:547:17 [INFO] [stdout] | [INFO] [stdout] 547 | assert!(!(a < b) && b < a); [INFO] [stdout] | ^^^^^^^^ help: try: `(a >= b)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this binary expression can be simplified [INFO] [stdout] --> src/lib.rs:557:17 [INFO] [stdout] | [INFO] [stdout] 557 | assert!(a <= b && a >= b); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `a == b` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_comparisons [INFO] [stdout] = note: `#[warn(clippy::double_comparisons)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.27s [INFO] running `Command { std: "docker" "inspect" "877051aaca0c1d6758558595ac947fb4e3c37a50d7f9bad6e4b9292ee68bcb10", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "877051aaca0c1d6758558595ac947fb4e3c37a50d7f9bad6e4b9292ee68bcb10", kill_on_drop: false }` [INFO] [stdout] 877051aaca0c1d6758558595ac947fb4e3c37a50d7f9bad6e4b9292ee68bcb10