[INFO] fetching crate sway-conf 0.3.0... [INFO] linting sway-conf-0.3.0 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate sway-conf 0.3.0 into /workspace/builds/worker-7-tc1/source [INFO] started tweaking crates.io crate sway-conf 0.3.0 [INFO] finished tweaking crates.io crate sway-conf 0.3.0 [INFO] tweaked toml for crates.io crate sway-conf 0.3.0 written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate sway-conf 0.3.0 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 36 packages to latest compatible versions [INFO] [stderr] Adding bitflags v1.3.2 (available: v2.11.0) [INFO] [stderr] Adding memchr v2.3.4 (available: v2.8.0) [INFO] [stderr] Adding nom v6.2.2 (available: v8.0.0) [INFO] [stderr] Adding nom_locate v3.0.2 (available: v5.0.0) [INFO] [stderr] Adding pretty_assertions v0.6.1 (available: v1.4.1) [INFO] [stderr] Adding test-case v1.2.3 (available: v3.3.1) [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 radium v0.5.3 [INFO] [stderr] Downloaded pretty_assertions v0.6.1 [INFO] [stderr] Downloaded ctor v0.1.26 [INFO] [stderr] Downloaded test-case v1.2.3 [INFO] [stderr] Downloaded conch-parser v0.1.1 [INFO] [stderr] Downloaded nom_locate v3.0.2 [INFO] [stderr] Downloaded bitvec v0.19.6 [INFO] [stderr] Downloaded nom v6.2.2 [INFO] [stderr] Downloaded difference v2.0.0 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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] 8ca1cdfd0c36a686569bde4b8dccacb80f90640d8177d25779f22c1b570a3924 [INFO] running `Command { std: "docker" "start" "-a" "8ca1cdfd0c36a686569bde4b8dccacb80f90640d8177d25779f22c1b570a3924", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "8ca1cdfd0c36a686569bde4b8dccacb80f90640d8177d25779f22c1b570a3924", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "8ca1cdfd0c36a686569bde4b8dccacb80f90640d8177d25779f22c1b570a3924", kill_on_drop: false }` [INFO] [stdout] 8ca1cdfd0c36a686569bde4b8dccacb80f90640d8177d25779f22c1b570a3924 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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] f1f049f71f22dc13a6fdc7533faa9264f9b851b2c837c4a61b1ba0d38c0713e0 [INFO] running `Command { std: "docker" "start" "-a" "f1f049f71f22dc13a6fdc7533faa9264f9b851b2c837c4a61b1ba0d38c0713e0", kill_on_drop: false }` [INFO] [stderr] Compiling memchr v2.3.4 [INFO] [stderr] Compiling radium v0.5.3 [INFO] [stderr] Checking wyz v0.2.0 [INFO] [stderr] Checking funty v1.1.0 [INFO] [stderr] Checking tap v1.0.1 [INFO] [stderr] Compiling syn v1.0.109 [INFO] [stderr] Compiling serde v1.0.228 [INFO] [stderr] Checking void v1.0.2 [INFO] [stderr] Compiling serde_core v1.0.228 [INFO] [stderr] Compiling nom v6.2.2 [INFO] [stderr] Compiling test-case v1.2.3 [INFO] [stderr] Checking ansi_term v0.11.0 [INFO] [stderr] Compiling syn v2.0.117 [INFO] [stderr] Checking glob v0.3.3 [INFO] [stderr] Checking difference v2.0.0 [INFO] [stderr] Checking pretty_assertions v0.6.1 [INFO] [stderr] Checking conch-parser v0.1.1 [INFO] [stderr] Checking bitvec v0.19.6 [INFO] [stderr] Compiling serde_derive v1.0.228 [INFO] [stderr] Checking serde_json v1.0.149 [INFO] [stderr] Checking nom_locate v3.0.2 [INFO] [stderr] Checking sway-conf v0.3.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: associated constant `NAME` is never used [INFO] [stdout] --> src/compiler.rs:26:11 [INFO] [stdout] | [INFO] [stdout] 25 | pub(crate) trait Pass { [INFO] [stdout] | ---- associated constant in this trait [INFO] [stdout] 26 | const NAME: &'static str; [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 16 [INFO] [stdout] --> src/primitives.rs:48:49 [INFO] [stdout] | [INFO] [stdout] 48 | let (s, b) = take_while_m_n(2, 2, |c: char| c.is_digit(16))(input)?; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `c.is_ascii_hexdigit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] = note: `#[warn(clippy::is_digit_ascii_radix)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/primitives.rs:126:1 [INFO] [stdout] | [INFO] [stdout] 126 | impl Into for AtomContent { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] = note: `#[warn(clippy::from_over_into)]` on by default [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 126 ~ impl From for String { [INFO] [stdout] 127 ~ fn from(val: AtomContent) -> Self { [INFO] [stdout] 128 ~ match val { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/primitives.rs:143:42 [INFO] [stdout] | [INFO] [stdout] 143 | AtomContent::Rgb(r, g, b) => String::from(format!("#{:02X}{:02X}{:02X}", r, g, b)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `format!("#{:02X}{:02X}{:02X}", r, g, b)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/primitives.rs:219:5 [INFO] [stdout] | [INFO] [stdout] 219 | / return Err(nom::Err::Error(nom::error::Error::new( [INFO] [stdout] 220 | | s, [INFO] [stdout] 221 | | nom::error::ErrorKind::Tag, [INFO] [stdout] 222 | | ))); [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] 219 ~ Err(nom::Err::Error(nom::error::Error::new( [INFO] [stdout] 220 + s, [INFO] [stdout] 221 + nom::error::ErrorKind::Tag, [INFO] [stdout] 222 ~ ))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/primitives.rs:290:8 [INFO] [stdout] | [INFO] [stdout] 290 | if v.fragment().len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `v.fragment().is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/ast/bind.rs:33:1 [INFO] [stdout] | [INFO] [stdout] 33 | impl Into for Key { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 33 ~ impl From for String { [INFO] [stdout] 34 ~ fn from(val: Key) -> Self { [INFO] [stdout] 35 ~ match val { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> src/ast/bind.rs:47:17 [INFO] [stdout] | [INFO] [stdout] 47 | fn parse_keyset<'a>(atom: Atom) -> Result, &'static str> { [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] = note: `#[warn(clippy::extra_unused_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/ast/bind.rs:53:30 [INFO] [stdout] | [INFO] [stdout] 53 | Key::Var(s[1..].to_string()) [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/ast/bind.rs:52:17 [INFO] [stdout] | [INFO] [stdout] 52 | if s.starts_with("$") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] = note: `#[warn(clippy::manual_strip)]` on by default [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 52 ~ if let Some() = s.strip_prefix("$") { [INFO] [stdout] 53 ~ Key::Var(.to_string()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/ast/bind.rs:64:78 [INFO] [stdout] | [INFO] [stdout] 64 | pub(super) fn parse<'a>(line: primitives::Line<'a>, mut atoms: Vec) -> Result, Err> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 232 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `ast::Err<'_>`, for example by boxing large elements or replacing it with `Box>` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] = note: `#[warn(clippy::result_large_err)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/ast/bind.rs:72:12 [INFO] [stdout] | [INFO] [stdout] 72 | if args.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!args.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [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/ast/bind.rs:77:9 [INFO] [stdout] | [INFO] [stdout] 77 | / match &atom.content { [INFO] [stdout] 78 | | AtomContent::Arg(a) => match a.to_lowercase().as_str() { [INFO] [stdout] 79 | | "--release" => { [INFO] [stdout] 80 | | flags |= FLAGS::RELEASE; [INFO] [stdout] ... | [INFO] [stdout] 117 | | _ => {} [INFO] [stdout] 118 | | } [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] 77 ~ if let AtomContent::Arg(a) = &atom.content { match a.to_lowercase().as_str() { [INFO] [stdout] 78 + "--release" => { [INFO] [stdout] 79 + flags |= FLAGS::RELEASE; [INFO] [stdout] 80 + continue; [INFO] [stdout] 81 + } [INFO] [stdout] 82 + "--locked" => { [INFO] [stdout] 83 + flags |= FLAGS::LOCKED; [INFO] [stdout] 84 + continue; [INFO] [stdout] 85 + } [INFO] [stdout] 86 + "--inhibited" => { [INFO] [stdout] 87 + flags |= FLAGS::INHIBITED; [INFO] [stdout] 88 + continue; [INFO] [stdout] 89 + } [INFO] [stdout] 90 + "--whole-window" => { [INFO] [stdout] 91 + flags |= FLAGS::BORDER | FLAGS::CONTENTS | FLAGS::TITLEBAR; [INFO] [stdout] 92 + continue; [INFO] [stdout] 93 + } [INFO] [stdout] 94 + "--border" => { [INFO] [stdout] 95 + flags |= FLAGS::BORDER; [INFO] [stdout] 96 + continue; [INFO] [stdout] 97 + } [INFO] [stdout] 98 + "--to-code" => { [INFO] [stdout] 99 + flags |= FLAGS::CODE; [INFO] [stdout] 100 + continue; [INFO] [stdout] 101 + } [INFO] [stdout] 102 + "--exclude-titlebar" => { [INFO] [stdout] 103 + flags |= FLAGS::EXCLUDE_TITLEBAR; [INFO] [stdout] 104 + continue; [INFO] [stdout] 105 + } [INFO] [stdout] 106 + "--no-warn" => { [INFO] [stdout] 107 + flags |= FLAGS::NOWARN; [INFO] [stdout] 108 + continue; [INFO] [stdout] 109 + } [INFO] [stdout] 110 + "--no-repeat" => { [INFO] [stdout] 111 + flags |= FLAGS::NOREPEAT; [INFO] [stdout] 112 + continue; [INFO] [stdout] 113 + } [INFO] [stdout] 114 + _ => {} [INFO] [stdout] 115 + } } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/ast.rs:238:6 [INFO] [stdout] | [INFO] [stdout] 238 | ) -> Result, Err> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 232 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `ast::Err<'_>`, for example by boxing large elements or replacing it with `Box>` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/ast.rs:239:18 [INFO] [stdout] | [INFO] [stdout] 239 | let cmd = if atoms.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!atoms.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/ast.rs:321:6 [INFO] [stdout] | [INFO] [stdout] 321 | ) -> Result, Err> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 232 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `ast::Err<'_>`, for example by boxing large elements or replacing it with `Box>` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this closure is very large [INFO] [stdout] --> src/ast.rs:338:22 [INFO] [stdout] | [INFO] [stdout] 338 | .map(|s| { [INFO] [stdout] | ______________________^ [INFO] [stdout] 339 | | let mut atoms = outer_prefix_atoms.clone(); [INFO] [stdout] 340 | | atoms.extend_from_slice(&prefix_atoms); [INFO] [stdout] 341 | | parse_inner(s, atoms) [INFO] [stdout] 342 | | }) [INFO] [stdout] | |_________________^ the `Err`-variant is at least 232 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `ast::Err<'_>`, for example by boxing large elements or replacing it with `Box>` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/ast.rs:354:51 [INFO] [stdout] | [INFO] [stdout] 354 | pub fn parse(stanzas: Vec>) -> Result>, Err> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 232 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `ast::Err<'_>`, for example by boxing large elements or replacing it with `Box>` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this closure is very large [INFO] [stdout] --> src/ast.rs:357:14 [INFO] [stdout] | [INFO] [stdout] 357 | .map(|s| parse_inner(s, Vec::new())) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 232 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `ast::Err<'_>`, for example by boxing large elements or replacing it with `Box>` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/compiler/includes.rs:19:22 [INFO] [stdout] | [INFO] [stdout] 19 | .map_err(|e| Err::IO(e))? [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Err::IO` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this closure is very large [INFO] [stdout] --> src/compiler/includes.rs:24:31 [INFO] [stdout] | [INFO] [stdout] 24 | i.visit::(move |i| { [INFO] [stdout] | _______________________________^ [INFO] [stdout] 25 | | if let Item::Include(i) = i { [INFO] [stdout] 26 | | let glob: String = i.glob.content.clone().into(); [INFO] [stdout] ... | [INFO] [stdout] 67 | | Ok(()) [INFO] [stdout] 68 | | }) [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] ::: src/compiler.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 14 | / IncludeBadAST { [INFO] [stdout] 15 | | path: PathBuf, [INFO] [stdout] 16 | | err: crate::ast::Err<'static>, [INFO] [stdout] 17 | | }, [INFO] [stdout] | |_____- the largest variant contains at least 256 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `compiler::Err`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/compiler/includes.rs:42:34 [INFO] [stdout] | [INFO] [stdout] 42 | .map_err(|e| Err::IO(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Err::IO` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/compiler/includes.rs:36:74 [INFO] [stdout] | [INFO] [stdout] 36 | ... if parent_dir.is_relative() && parent_dir != PathBuf::from("") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `""` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] = note: `#[warn(clippy::cmp_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/compiler/includes.rs:86:10 [INFO] [stdout] | [INFO] [stdout] 86 | ) -> Result<(), Err> { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/compiler.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 14 | / IncludeBadAST { [INFO] [stdout] 15 | | path: PathBuf, [INFO] [stdout] 16 | | err: crate::ast::Err<'static>, [INFO] [stdout] 17 | | }, [INFO] [stdout] | |_____- the largest variant contains at least 256 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `compiler::Err`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/compiler/includes.rs:97:30 [INFO] [stdout] | [INFO] [stdout] 97 | .map_err(|e| Err::IO(e))? [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Err::IO` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this closure is very large [INFO] [stdout] --> src/compiler/includes.rs:111:35 [INFO] [stdout] | [INFO] [stdout] 111 | i.visit::(move |i| { [INFO] [stdout] | ___________________________________^ [INFO] [stdout] 112 | | if let Item::Include(i) = i { [INFO] [stdout] 113 | | InlinerPass::handle_include_stmt(already_loaded, i)?; [INFO] [stdout] 114 | | }; [INFO] [stdout] 115 | | Ok(()) [INFO] [stdout] 116 | | }) [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] ::: src/compiler.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 14 | / IncludeBadAST { [INFO] [stdout] 15 | | path: PathBuf, [INFO] [stdout] 16 | | err: crate::ast::Err<'static>, [INFO] [stdout] 17 | | }, [INFO] [stdout] | |_____- the largest variant contains at least 256 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `compiler::Err`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this closure is very large [INFO] [stdout] --> src/compiler/includes.rs:137:31 [INFO] [stdout] | [INFO] [stdout] 137 | i.visit::(move |i| { [INFO] [stdout] | _______________________________^ [INFO] [stdout] 138 | | if let Item::Include(i) = i { [INFO] [stdout] 139 | | InlinerPass::handle_include_stmt(already_loaded, i)?; [INFO] [stdout] 140 | | }; [INFO] [stdout] 141 | | Ok(()) [INFO] [stdout] 142 | | }) [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] ::: src/compiler.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 14 | / IncludeBadAST { [INFO] [stdout] 15 | | path: PathBuf, [INFO] [stdout] 16 | | err: crate::ast::Err<'static>, [INFO] [stdout] 17 | | }, [INFO] [stdout] | |_____- the largest variant contains at least 256 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `compiler::Err`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/compiler/vars.rs:14:10 [INFO] [stdout] | [INFO] [stdout] 14 | ) -> Result<(), Err> { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/compiler.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 14 | / IncludeBadAST { [INFO] [stdout] 15 | | path: PathBuf, [INFO] [stdout] 16 | | err: crate::ast::Err<'static>, [INFO] [stdout] 17 | | }, [INFO] [stdout] | |_____- the largest variant contains at least 256 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `compiler::Err`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this closure is very large [INFO] [stdout] --> src/compiler/vars.rs:18:31 [INFO] [stdout] | [INFO] [stdout] 18 | i.visit::(move |i| { [INFO] [stdout] | _______________________________^ [INFO] [stdout] 19 | | match i { [INFO] [stdout] 20 | | Item::Set(s) => { [INFO] [stdout] 21 | | let name = if let AtomContent::Var(name) = &s.variable.content { [INFO] [stdout] ... | [INFO] [stdout] 140 | | }) [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] ::: src/compiler.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 14 | / IncludeBadAST { [INFO] [stdout] 15 | | path: PathBuf, [INFO] [stdout] 16 | | err: crate::ast::Err<'static>, [INFO] [stdout] 17 | | }, [INFO] [stdout] | |_____- the largest variant contains at least 256 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `compiler::Err`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/compiler/vars.rs:32:30 [INFO] [stdout] | [INFO] [stdout] 32 | ... .map(|v| { [INFO] [stdout] | ________________________^ [INFO] [stdout] 33 | | ... if let AtomContent::Var(var) = &v.content { [INFO] [stdout] 34 | | ... if let Some(out_val) = namespace.get(var) { [INFO] [stdout] 35 | | ... out_val.resolved_values.clone().unwrap() [INFO] [stdout] ... | [INFO] [stdout] 42 | | ... }) [INFO] [stdout] 43 | | ... .flatten() [INFO] [stdout] | |________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] help: try replacing `map` with `flat_map` and remove the `.flatten()` [INFO] [stdout] | [INFO] [stdout] 32 ~ .flat_map(|v| { [INFO] [stdout] 33 + if let AtomContent::Var(var) = &v.content { [INFO] [stdout] 34 + if let Some(out_val) = namespace.get(var) { [INFO] [stdout] 35 + out_val.resolved_values.clone().unwrap() [INFO] [stdout] 36 + } else { [INFO] [stdout] 37 + vec![v.clone()] [INFO] [stdout] 38 + } [INFO] [stdout] 39 + } else { [INFO] [stdout] 40 + vec![v.clone()] [INFO] [stdout] 41 + } [INFO] [stdout] 42 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/compiler/vars.rs:56:30 [INFO] [stdout] | [INFO] [stdout] 56 | ... .map(|v| { [INFO] [stdout] | ________________________^ [INFO] [stdout] 57 | | ... if let bind::Key::Var(var) = &v { [INFO] [stdout] 58 | | ... if let Some(out_val) = namespace.get(var) { [INFO] [stdout] ... | [INFO] [stdout] 74 | | ... }) [INFO] [stdout] 75 | | ... .flatten() [INFO] [stdout] | |________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] help: try replacing `map` with `flat_map` and remove the `.flatten()` [INFO] [stdout] | [INFO] [stdout] 56 ~ .flat_map(|v| { [INFO] [stdout] 57 + if let bind::Key::Var(var) = &v { [INFO] [stdout] 58 + if let Some(out_val) = namespace.get(var) { [INFO] [stdout] 59 + // TODO: Parse each bit of the variable properly, so [INFO] [stdout] 60 + // as to support values like '+ Control'. [INFO] [stdout] 61 + out_val [INFO] [stdout] 62 + .resolved_values [INFO] [stdout] 63 + .clone() [INFO] [stdout] 64 + .unwrap() [INFO] [stdout] 65 + .into_iter() [INFO] [stdout] 66 + .map(|a| bind::Key::Key(a.content.into())) [INFO] [stdout] 67 + .collect() [INFO] [stdout] 68 + } else { [INFO] [stdout] 69 + vec![v.clone()] [INFO] [stdout] 70 + } [INFO] [stdout] 71 + } else { [INFO] [stdout] 72 + vec![v.clone()] [INFO] [stdout] 73 + } [INFO] [stdout] 74 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/compiler/vars.rs:88:30 [INFO] [stdout] | [INFO] [stdout] 88 | ... .map(|v| { [INFO] [stdout] | ________________________^ [INFO] [stdout] 89 | | ... if let AtomContent::Var(var) = &v.content { [INFO] [stdout] 90 | | ... if let Some(out_val) = namespace.get(var) { [INFO] [stdout] 91 | | ... out_val.resolved_values.clone().unwrap() [INFO] [stdout] ... | [INFO] [stdout] 98 | | ... }) [INFO] [stdout] 99 | | ... .flatten() [INFO] [stdout] | |________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] help: try replacing `map` with `flat_map` and remove the `.flatten()` [INFO] [stdout] | [INFO] [stdout] 88 ~ .flat_map(|v| { [INFO] [stdout] 89 + if let AtomContent::Var(var) = &v.content { [INFO] [stdout] 90 + if let Some(out_val) = namespace.get(var) { [INFO] [stdout] 91 + out_val.resolved_values.clone().unwrap() [INFO] [stdout] 92 + } else { [INFO] [stdout] 93 + vec![v.clone()] [INFO] [stdout] 94 + } [INFO] [stdout] 95 + } else { [INFO] [stdout] 96 + vec![v.clone()] [INFO] [stdout] 97 + } [INFO] [stdout] 98 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/compiler/vars.rs:111:38 [INFO] [stdout] | [INFO] [stdout] 111 | ... .map(|v| { [INFO] [stdout] | ________________________^ [INFO] [stdout] 112 | | ... if let AtomContent::Var(var) = &v.content { [INFO] [stdout] 113 | | ... if let Some(out_val) = namespace.get(var) { [INFO] [stdout] 114 | | ... out_val.resolved_values.clone().unwrap() [INFO] [stdout] ... | [INFO] [stdout] 121 | | ... }) [INFO] [stdout] 122 | | ... .flatten() [INFO] [stdout] | |________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] help: try replacing `map` with `flat_map` and remove the `.flatten()` [INFO] [stdout] | [INFO] [stdout] 111 ~ .flat_map(|v| { [INFO] [stdout] 112 + if let AtomContent::Var(var) = &v.content { [INFO] [stdout] 113 + if let Some(out_val) = namespace.get(var) { [INFO] [stdout] 114 + out_val.resolved_values.clone().unwrap() [INFO] [stdout] 115 + } else { [INFO] [stdout] 116 + vec![v.clone()] [INFO] [stdout] 117 + } [INFO] [stdout] 118 + } else { [INFO] [stdout] 119 + vec![v.clone()] [INFO] [stdout] 120 + } [INFO] [stdout] 121 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/compiler.rs:28:74 [INFO] [stdout] | [INFO] [stdout] 14 | / IncludeBadAST { [INFO] [stdout] 15 | | path: PathBuf, [INFO] [stdout] 16 | | err: crate::ast::Err<'static>, [INFO] [stdout] 17 | | }, [INFO] [stdout] | |_____- the largest variant contains at least 256 bytes [INFO] [stdout] ... [INFO] [stdout] 28 | fn exec<'a>(&mut self, config: &mut Vec>, path: PathBuf) -> Result<(), Err>; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `compiler::Err`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/compiler.rs:31:84 [INFO] [stdout] | [INFO] [stdout] 14 | / IncludeBadAST { [INFO] [stdout] 15 | | path: PathBuf, [INFO] [stdout] 16 | | err: crate::ast::Err<'static>, [INFO] [stdout] 17 | | }, [INFO] [stdout] | |_____- the largest variant contains at least 256 bytes [INFO] [stdout] ... [INFO] [stdout] 31 | fn do_pass<'a, P: Pass>(mut pass: P, config: &mut Vec>, path: PathBuf) -> Result<(), Err> { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `compiler::Err`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/compiler.rs:41:66 [INFO] [stdout] | [INFO] [stdout] 14 | / IncludeBadAST { [INFO] [stdout] 15 | | path: PathBuf, [INFO] [stdout] 16 | | err: crate::ast::Err<'static>, [INFO] [stdout] 17 | | }, [INFO] [stdout] | |_____- the largest variant contains at least 256 bytes [INFO] [stdout] ... [INFO] [stdout] 41 | pub fn compile<'a>(config: &mut Vec>, path: PathBuf) -> Result<(), Err> { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `compiler::Err`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this returns a `Result<_, ()>` [INFO] [stdout] --> src/lib.rs:23:1 [INFO] [stdout] | [INFO] [stdout] 23 | pub fn parse_layout<'a>(input: &'a str) -> Result>, ()> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: use a custom `Error` type instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err [INFO] [stdout] = note: `#[warn(clippy::result_unit_err)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's named elsewhere is confusing [INFO] [stdout] --> src/ast.rs:238:23 [INFO] [stdout] | [INFO] [stdout] 236 | line: primitives::Line<'a>, [INFO] [stdout] | -- the lifetime is named here [INFO] [stdout] 237 | mut atoms: Vec, [INFO] [stdout] 238 | ) -> Result, Err> { [INFO] [stdout] | -- ^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the same lifetime is named 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: consistently use `'a` [INFO] [stdout] | [INFO] [stdout] 238 | ) -> Result, Err<'a>> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's named elsewhere is confusing [INFO] [stdout] --> src/ast.rs:321:23 [INFO] [stdout] | [INFO] [stdout] 319 | stanza: layout::Stanza<'a>, [INFO] [stdout] | -- the lifetime is named here [INFO] [stdout] 320 | outer_prefix_atoms: Vec, [INFO] [stdout] 321 | ) -> Result, Err> { [INFO] [stdout] | -- ^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the same lifetime is named here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: consistently use `'a` [INFO] [stdout] | [INFO] [stdout] 321 | ) -> Result, Err<'a>> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/ast.rs:354:42 [INFO] [stdout] | [INFO] [stdout] 354 | pub fn parse(stanzas: Vec>) -> Result>, Err> { [INFO] [stdout] | ^^ ^^ ^^^ the same lifetime is hidden here [INFO] [stdout] | | | [INFO] [stdout] | | the same lifetime is elided here [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: consistently use `'_` [INFO] [stdout] | [INFO] [stdout] 354 | pub fn parse(stanzas: Vec>) -> Result>, Err<'_>> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's named elsewhere is confusing [INFO] [stdout] --> src/ast/bind.rs:64:95 [INFO] [stdout] | [INFO] [stdout] 64 | pub(super) fn parse<'a>(line: primitives::Line<'a>, mut atoms: Vec) -> Result, Err> { [INFO] [stdout] | -- -- ^^^ the same lifetime is hidden here [INFO] [stdout] | | | [INFO] [stdout] | the lifetime is named here the same lifetime is named here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: consistently use `'a` [INFO] [stdout] | [INFO] [stdout] 64 | pub(super) fn parse<'a>(line: primitives::Line<'a>, mut atoms: Vec) -> Result, Err<'a>> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated constant `NAME` is never used [INFO] [stdout] --> src/compiler.rs:26:11 [INFO] [stdout] | [INFO] [stdout] 25 | pub(crate) trait Pass { [INFO] [stdout] | ---- associated constant in this trait [INFO] [stdout] 26 | const NAME: &'static str; [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 16 [INFO] [stdout] --> src/primitives.rs:48:49 [INFO] [stdout] | [INFO] [stdout] 48 | let (s, b) = take_while_m_n(2, 2, |c: char| c.is_digit(16))(input)?; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `c.is_ascii_hexdigit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] = note: `#[warn(clippy::is_digit_ascii_radix)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/primitives.rs:126:1 [INFO] [stdout] | [INFO] [stdout] 126 | impl Into for AtomContent { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] = note: `#[warn(clippy::from_over_into)]` on by default [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 126 ~ impl From for String { [INFO] [stdout] 127 ~ fn from(val: AtomContent) -> Self { [INFO] [stdout] 128 ~ match val { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/primitives.rs:143:42 [INFO] [stdout] | [INFO] [stdout] 143 | AtomContent::Rgb(r, g, b) => String::from(format!("#{:02X}{:02X}{:02X}", r, g, b)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `format!("#{:02X}{:02X}{:02X}", r, g, b)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/primitives.rs:219:5 [INFO] [stdout] | [INFO] [stdout] 219 | / return Err(nom::Err::Error(nom::error::Error::new( [INFO] [stdout] 220 | | s, [INFO] [stdout] 221 | | nom::error::ErrorKind::Tag, [INFO] [stdout] 222 | | ))); [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] 219 ~ Err(nom::Err::Error(nom::error::Error::new( [INFO] [stdout] 220 + s, [INFO] [stdout] 221 + nom::error::ErrorKind::Tag, [INFO] [stdout] 222 ~ ))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/primitives.rs:290:8 [INFO] [stdout] | [INFO] [stdout] 290 | if v.fragment().len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `v.fragment().is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/primitives.rs:457:13 [INFO] [stdout] | [INFO] [stdout] 457 | !output.is_ok(), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `output.is_err()` [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 assertion is always `false` [INFO] [stdout] --> src/primitives.rs:513:22 [INFO] [stdout] | [INFO] [stdout] 513 | _ => assert!(false, "Unexpected span index: {}", i), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: replace this with `panic!()` or `unreachable!()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] = note: `#[warn(clippy::assertions_on_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/ast/bind.rs:33:1 [INFO] [stdout] | [INFO] [stdout] 33 | impl Into for Key { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 33 ~ impl From for String { [INFO] [stdout] 34 ~ fn from(val: Key) -> Self { [INFO] [stdout] 35 ~ match val { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> src/ast/bind.rs:47:17 [INFO] [stdout] | [INFO] [stdout] 47 | fn parse_keyset<'a>(atom: Atom) -> Result, &'static str> { [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] = note: `#[warn(clippy::extra_unused_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/ast/bind.rs:53:30 [INFO] [stdout] | [INFO] [stdout] 53 | Key::Var(s[1..].to_string()) [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/ast/bind.rs:52:17 [INFO] [stdout] | [INFO] [stdout] 52 | if s.starts_with("$") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] = note: `#[warn(clippy::manual_strip)]` on by default [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 52 ~ if let Some() = s.strip_prefix("$") { [INFO] [stdout] 53 ~ Key::Var(.to_string()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/ast/bind.rs:64:78 [INFO] [stdout] | [INFO] [stdout] 64 | pub(super) fn parse<'a>(line: primitives::Line<'a>, mut atoms: Vec) -> Result, Err> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 232 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `ast::Err<'_>`, for example by boxing large elements or replacing it with `Box>` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] = note: `#[warn(clippy::result_large_err)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/ast/bind.rs:72:12 [INFO] [stdout] | [INFO] [stdout] 72 | if args.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!args.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [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/ast/bind.rs:77:9 [INFO] [stdout] | [INFO] [stdout] 77 | / match &atom.content { [INFO] [stdout] 78 | | AtomContent::Arg(a) => match a.to_lowercase().as_str() { [INFO] [stdout] 79 | | "--release" => { [INFO] [stdout] 80 | | flags |= FLAGS::RELEASE; [INFO] [stdout] ... | [INFO] [stdout] 117 | | _ => {} [INFO] [stdout] 118 | | } [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] 77 ~ if let AtomContent::Arg(a) = &atom.content { match a.to_lowercase().as_str() { [INFO] [stdout] 78 + "--release" => { [INFO] [stdout] 79 + flags |= FLAGS::RELEASE; [INFO] [stdout] 80 + continue; [INFO] [stdout] 81 + } [INFO] [stdout] 82 + "--locked" => { [INFO] [stdout] 83 + flags |= FLAGS::LOCKED; [INFO] [stdout] 84 + continue; [INFO] [stdout] 85 + } [INFO] [stdout] 86 + "--inhibited" => { [INFO] [stdout] 87 + flags |= FLAGS::INHIBITED; [INFO] [stdout] 88 + continue; [INFO] [stdout] 89 + } [INFO] [stdout] 90 + "--whole-window" => { [INFO] [stdout] 91 + flags |= FLAGS::BORDER | FLAGS::CONTENTS | FLAGS::TITLEBAR; [INFO] [stdout] 92 + continue; [INFO] [stdout] 93 + } [INFO] [stdout] 94 + "--border" => { [INFO] [stdout] 95 + flags |= FLAGS::BORDER; [INFO] [stdout] 96 + continue; [INFO] [stdout] 97 + } [INFO] [stdout] 98 + "--to-code" => { [INFO] [stdout] 99 + flags |= FLAGS::CODE; [INFO] [stdout] 100 + continue; [INFO] [stdout] 101 + } [INFO] [stdout] 102 + "--exclude-titlebar" => { [INFO] [stdout] 103 + flags |= FLAGS::EXCLUDE_TITLEBAR; [INFO] [stdout] 104 + continue; [INFO] [stdout] 105 + } [INFO] [stdout] 106 + "--no-warn" => { [INFO] [stdout] 107 + flags |= FLAGS::NOWARN; [INFO] [stdout] 108 + continue; [INFO] [stdout] 109 + } [INFO] [stdout] 110 + "--no-repeat" => { [INFO] [stdout] 111 + flags |= FLAGS::NOREPEAT; [INFO] [stdout] 112 + continue; [INFO] [stdout] 113 + } [INFO] [stdout] 114 + _ => {} [INFO] [stdout] 115 + } } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/ast.rs:238:6 [INFO] [stdout] | [INFO] [stdout] 238 | ) -> Result, Err> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 232 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `ast::Err<'_>`, for example by boxing large elements or replacing it with `Box>` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/ast.rs:239:18 [INFO] [stdout] | [INFO] [stdout] 239 | let cmd = if atoms.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!atoms.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/ast.rs:321:6 [INFO] [stdout] | [INFO] [stdout] 321 | ) -> Result, Err> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 232 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `ast::Err<'_>`, for example by boxing large elements or replacing it with `Box>` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this closure is very large [INFO] [stdout] --> src/ast.rs:338:22 [INFO] [stdout] | [INFO] [stdout] 338 | .map(|s| { [INFO] [stdout] | ______________________^ [INFO] [stdout] 339 | | let mut atoms = outer_prefix_atoms.clone(); [INFO] [stdout] 340 | | atoms.extend_from_slice(&prefix_atoms); [INFO] [stdout] 341 | | parse_inner(s, atoms) [INFO] [stdout] 342 | | }) [INFO] [stdout] | |_________________^ the `Err`-variant is at least 232 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `ast::Err<'_>`, for example by boxing large elements or replacing it with `Box>` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/ast.rs:354:51 [INFO] [stdout] | [INFO] [stdout] 354 | pub fn parse(stanzas: Vec>) -> Result>, Err> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 232 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `ast::Err<'_>`, for example by boxing large elements or replacing it with `Box>` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this closure is very large [INFO] [stdout] --> src/ast.rs:357:14 [INFO] [stdout] | [INFO] [stdout] 357 | .map(|s| parse_inner(s, Vec::new())) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 232 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `ast::Err<'_>`, for example by boxing large elements or replacing it with `Box>` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/compiler/includes.rs:19:22 [INFO] [stdout] | [INFO] [stdout] 19 | .map_err(|e| Err::IO(e))? [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Err::IO` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this closure is very large [INFO] [stdout] --> src/compiler/includes.rs:24:31 [INFO] [stdout] | [INFO] [stdout] 24 | i.visit::(move |i| { [INFO] [stdout] | _______________________________^ [INFO] [stdout] 25 | | if let Item::Include(i) = i { [INFO] [stdout] 26 | | let glob: String = i.glob.content.clone().into(); [INFO] [stdout] ... | [INFO] [stdout] 67 | | Ok(()) [INFO] [stdout] 68 | | }) [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] ::: src/compiler.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 14 | / IncludeBadAST { [INFO] [stdout] 15 | | path: PathBuf, [INFO] [stdout] 16 | | err: crate::ast::Err<'static>, [INFO] [stdout] 17 | | }, [INFO] [stdout] | |_____- the largest variant contains at least 256 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `compiler::Err`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/compiler/includes.rs:42:34 [INFO] [stdout] | [INFO] [stdout] 42 | .map_err(|e| Err::IO(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Err::IO` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/compiler/includes.rs:36:74 [INFO] [stdout] | [INFO] [stdout] 36 | ... if parent_dir.is_relative() && parent_dir != PathBuf::from("") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `""` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] = note: `#[warn(clippy::cmp_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/compiler/includes.rs:86:10 [INFO] [stdout] | [INFO] [stdout] 86 | ) -> Result<(), Err> { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/compiler.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 14 | / IncludeBadAST { [INFO] [stdout] 15 | | path: PathBuf, [INFO] [stdout] 16 | | err: crate::ast::Err<'static>, [INFO] [stdout] 17 | | }, [INFO] [stdout] | |_____- the largest variant contains at least 256 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `compiler::Err`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/compiler/includes.rs:97:30 [INFO] [stdout] | [INFO] [stdout] 97 | .map_err(|e| Err::IO(e))? [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Err::IO` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this closure is very large [INFO] [stdout] --> src/compiler/includes.rs:111:35 [INFO] [stdout] | [INFO] [stdout] 111 | i.visit::(move |i| { [INFO] [stdout] | ___________________________________^ [INFO] [stdout] 112 | | if let Item::Include(i) = i { [INFO] [stdout] 113 | | InlinerPass::handle_include_stmt(already_loaded, i)?; [INFO] [stdout] 114 | | }; [INFO] [stdout] 115 | | Ok(()) [INFO] [stdout] 116 | | }) [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] ::: src/compiler.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 14 | / IncludeBadAST { [INFO] [stdout] 15 | | path: PathBuf, [INFO] [stdout] 16 | | err: crate::ast::Err<'static>, [INFO] [stdout] 17 | | }, [INFO] [stdout] | |_____- the largest variant contains at least 256 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `compiler::Err`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this closure is very large [INFO] [stdout] --> src/compiler/includes.rs:137:31 [INFO] [stdout] | [INFO] [stdout] 137 | i.visit::(move |i| { [INFO] [stdout] | _______________________________^ [INFO] [stdout] 138 | | if let Item::Include(i) = i { [INFO] [stdout] 139 | | InlinerPass::handle_include_stmt(already_loaded, i)?; [INFO] [stdout] 140 | | }; [INFO] [stdout] 141 | | Ok(()) [INFO] [stdout] 142 | | }) [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] ::: src/compiler.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 14 | / IncludeBadAST { [INFO] [stdout] 15 | | path: PathBuf, [INFO] [stdout] 16 | | err: crate::ast::Err<'static>, [INFO] [stdout] 17 | | }, [INFO] [stdout] | |_____- the largest variant contains at least 256 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `compiler::Err`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/compiler/vars.rs:14:10 [INFO] [stdout] | [INFO] [stdout] 14 | ) -> Result<(), Err> { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/compiler.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 14 | / IncludeBadAST { [INFO] [stdout] 15 | | path: PathBuf, [INFO] [stdout] 16 | | err: crate::ast::Err<'static>, [INFO] [stdout] 17 | | }, [INFO] [stdout] | |_____- the largest variant contains at least 256 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `compiler::Err`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this closure is very large [INFO] [stdout] --> src/compiler/vars.rs:18:31 [INFO] [stdout] | [INFO] [stdout] 18 | i.visit::(move |i| { [INFO] [stdout] | _______________________________^ [INFO] [stdout] 19 | | match i { [INFO] [stdout] 20 | | Item::Set(s) => { [INFO] [stdout] 21 | | let name = if let AtomContent::Var(name) = &s.variable.content { [INFO] [stdout] ... | [INFO] [stdout] 140 | | }) [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] ::: src/compiler.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 14 | / IncludeBadAST { [INFO] [stdout] 15 | | path: PathBuf, [INFO] [stdout] 16 | | err: crate::ast::Err<'static>, [INFO] [stdout] 17 | | }, [INFO] [stdout] | |_____- the largest variant contains at least 256 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `compiler::Err`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/compiler/vars.rs:32:30 [INFO] [stdout] | [INFO] [stdout] 32 | ... .map(|v| { [INFO] [stdout] | ________________________^ [INFO] [stdout] 33 | | ... if let AtomContent::Var(var) = &v.content { [INFO] [stdout] 34 | | ... if let Some(out_val) = namespace.get(var) { [INFO] [stdout] 35 | | ... out_val.resolved_values.clone().unwrap() [INFO] [stdout] ... | [INFO] [stdout] 42 | | ... }) [INFO] [stdout] 43 | | ... .flatten() [INFO] [stdout] | |________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] help: try replacing `map` with `flat_map` and remove the `.flatten()` [INFO] [stdout] | [INFO] [stdout] 32 ~ .flat_map(|v| { [INFO] [stdout] 33 + if let AtomContent::Var(var) = &v.content { [INFO] [stdout] 34 + if let Some(out_val) = namespace.get(var) { [INFO] [stdout] 35 + out_val.resolved_values.clone().unwrap() [INFO] [stdout] 36 + } else { [INFO] [stdout] 37 + vec![v.clone()] [INFO] [stdout] 38 + } [INFO] [stdout] 39 + } else { [INFO] [stdout] 40 + vec![v.clone()] [INFO] [stdout] 41 + } [INFO] [stdout] 42 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/compiler/vars.rs:56:30 [INFO] [stdout] | [INFO] [stdout] 56 | ... .map(|v| { [INFO] [stdout] | ________________________^ [INFO] [stdout] 57 | | ... if let bind::Key::Var(var) = &v { [INFO] [stdout] 58 | | ... if let Some(out_val) = namespace.get(var) { [INFO] [stdout] ... | [INFO] [stdout] 74 | | ... }) [INFO] [stdout] 75 | | ... .flatten() [INFO] [stdout] | |________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] help: try replacing `map` with `flat_map` and remove the `.flatten()` [INFO] [stdout] | [INFO] [stdout] 56 ~ .flat_map(|v| { [INFO] [stdout] 57 + if let bind::Key::Var(var) = &v { [INFO] [stdout] 58 + if let Some(out_val) = namespace.get(var) { [INFO] [stdout] 59 + // TODO: Parse each bit of the variable properly, so [INFO] [stdout] 60 + // as to support values like '+ Control'. [INFO] [stdout] 61 + out_val [INFO] [stdout] 62 + .resolved_values [INFO] [stdout] 63 + .clone() [INFO] [stdout] 64 + .unwrap() [INFO] [stdout] 65 + .into_iter() [INFO] [stdout] 66 + .map(|a| bind::Key::Key(a.content.into())) [INFO] [stdout] 67 + .collect() [INFO] [stdout] 68 + } else { [INFO] [stdout] 69 + vec![v.clone()] [INFO] [stdout] 70 + } [INFO] [stdout] 71 + } else { [INFO] [stdout] 72 + vec![v.clone()] [INFO] [stdout] 73 + } [INFO] [stdout] 74 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/compiler/vars.rs:88:30 [INFO] [stdout] | [INFO] [stdout] 88 | ... .map(|v| { [INFO] [stdout] | ________________________^ [INFO] [stdout] 89 | | ... if let AtomContent::Var(var) = &v.content { [INFO] [stdout] 90 | | ... if let Some(out_val) = namespace.get(var) { [INFO] [stdout] 91 | | ... out_val.resolved_values.clone().unwrap() [INFO] [stdout] ... | [INFO] [stdout] 98 | | ... }) [INFO] [stdout] 99 | | ... .flatten() [INFO] [stdout] | |________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] help: try replacing `map` with `flat_map` and remove the `.flatten()` [INFO] [stdout] | [INFO] [stdout] 88 ~ .flat_map(|v| { [INFO] [stdout] 89 + if let AtomContent::Var(var) = &v.content { [INFO] [stdout] 90 + if let Some(out_val) = namespace.get(var) { [INFO] [stdout] 91 + out_val.resolved_values.clone().unwrap() [INFO] [stdout] 92 + } else { [INFO] [stdout] 93 + vec![v.clone()] [INFO] [stdout] 94 + } [INFO] [stdout] 95 + } else { [INFO] [stdout] 96 + vec![v.clone()] [INFO] [stdout] 97 + } [INFO] [stdout] 98 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/compiler/vars.rs:111:38 [INFO] [stdout] | [INFO] [stdout] 111 | ... .map(|v| { [INFO] [stdout] | ________________________^ [INFO] [stdout] 112 | | ... if let AtomContent::Var(var) = &v.content { [INFO] [stdout] 113 | | ... if let Some(out_val) = namespace.get(var) { [INFO] [stdout] 114 | | ... out_val.resolved_values.clone().unwrap() [INFO] [stdout] ... | [INFO] [stdout] 121 | | ... }) [INFO] [stdout] 122 | | ... .flatten() [INFO] [stdout] | |________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] help: try replacing `map` with `flat_map` and remove the `.flatten()` [INFO] [stdout] | [INFO] [stdout] 111 ~ .flat_map(|v| { [INFO] [stdout] 112 + if let AtomContent::Var(var) = &v.content { [INFO] [stdout] 113 + if let Some(out_val) = namespace.get(var) { [INFO] [stdout] 114 + out_val.resolved_values.clone().unwrap() [INFO] [stdout] 115 + } else { [INFO] [stdout] 116 + vec![v.clone()] [INFO] [stdout] 117 + } [INFO] [stdout] 118 + } else { [INFO] [stdout] 119 + vec![v.clone()] [INFO] [stdout] 120 + } [INFO] [stdout] 121 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/compiler.rs:28:74 [INFO] [stdout] | [INFO] [stdout] 14 | / IncludeBadAST { [INFO] [stdout] 15 | | path: PathBuf, [INFO] [stdout] 16 | | err: crate::ast::Err<'static>, [INFO] [stdout] 17 | | }, [INFO] [stdout] | |_____- the largest variant contains at least 256 bytes [INFO] [stdout] ... [INFO] [stdout] 28 | fn exec<'a>(&mut self, config: &mut Vec>, path: PathBuf) -> Result<(), Err>; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `compiler::Err`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/compiler.rs:31:84 [INFO] [stdout] | [INFO] [stdout] 14 | / IncludeBadAST { [INFO] [stdout] 15 | | path: PathBuf, [INFO] [stdout] 16 | | err: crate::ast::Err<'static>, [INFO] [stdout] 17 | | }, [INFO] [stdout] | |_____- the largest variant contains at least 256 bytes [INFO] [stdout] ... [INFO] [stdout] 31 | fn do_pass<'a, P: Pass>(mut pass: P, config: &mut Vec>, path: PathBuf) -> Result<(), Err> { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `compiler::Err`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/compiler.rs:41:66 [INFO] [stdout] | [INFO] [stdout] 14 | / IncludeBadAST { [INFO] [stdout] 15 | | path: PathBuf, [INFO] [stdout] 16 | | err: crate::ast::Err<'static>, [INFO] [stdout] 17 | | }, [INFO] [stdout] | |_____- the largest variant contains at least 256 bytes [INFO] [stdout] ... [INFO] [stdout] 41 | pub fn compile<'a>(config: &mut Vec>, path: PathBuf) -> Result<(), Err> { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `compiler::Err`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/compiler.rs:151:17 [INFO] [stdout] | [INFO] [stdout] 151 | resolved[0].ast.len() == 0 && resolved[1].ast.len() > 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `resolved[0].ast.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/compiler.rs:151:47 [INFO] [stdout] | [INFO] [stdout] 151 | resolved[0].ast.len() == 0 && resolved[1].ast.len() > 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!resolved[1].ast.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this returns a `Result<_, ()>` [INFO] [stdout] --> src/lib.rs:23:1 [INFO] [stdout] | [INFO] [stdout] 23 | pub fn parse_layout<'a>(input: &'a str) -> Result>, ()> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: use a custom `Error` type instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err [INFO] [stdout] = note: `#[warn(clippy::result_unit_err)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/lib.rs:138:21 [INFO] [stdout] | [INFO] [stdout] 138 | let mut s = String::from(d.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `d.clone()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's named elsewhere is confusing [INFO] [stdout] --> src/ast.rs:238:23 [INFO] [stdout] | [INFO] [stdout] 236 | line: primitives::Line<'a>, [INFO] [stdout] | -- the lifetime is named here [INFO] [stdout] 237 | mut atoms: Vec, [INFO] [stdout] 238 | ) -> Result, Err> { [INFO] [stdout] | -- ^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the same lifetime is named 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: consistently use `'a` [INFO] [stdout] | [INFO] [stdout] 238 | ) -> Result, Err<'a>> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's named elsewhere is confusing [INFO] [stdout] --> src/ast.rs:321:23 [INFO] [stdout] | [INFO] [stdout] 319 | stanza: layout::Stanza<'a>, [INFO] [stdout] | -- the lifetime is named here [INFO] [stdout] 320 | outer_prefix_atoms: Vec, [INFO] [stdout] 321 | ) -> Result, Err> { [INFO] [stdout] | -- ^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the same lifetime is named here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: consistently use `'a` [INFO] [stdout] | [INFO] [stdout] 321 | ) -> Result, Err<'a>> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/ast.rs:354:42 [INFO] [stdout] | [INFO] [stdout] 354 | pub fn parse(stanzas: Vec>) -> Result>, Err> { [INFO] [stdout] | ^^ ^^ ^^^ the same lifetime is hidden here [INFO] [stdout] | | | [INFO] [stdout] | | the same lifetime is elided here [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: consistently use `'_` [INFO] [stdout] | [INFO] [stdout] 354 | pub fn parse(stanzas: Vec>) -> Result>, Err<'_>> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's named elsewhere is confusing [INFO] [stdout] --> src/ast/bind.rs:64:95 [INFO] [stdout] | [INFO] [stdout] 64 | pub(super) fn parse<'a>(line: primitives::Line<'a>, mut atoms: Vec) -> Result, Err> { [INFO] [stdout] | -- -- ^^^ the same lifetime is hidden here [INFO] [stdout] | | | [INFO] [stdout] | the lifetime is named here the same lifetime is named here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: consistently use `'a` [INFO] [stdout] | [INFO] [stdout] 64 | pub(super) fn parse<'a>(line: primitives::Line<'a>, mut atoms: Vec) -> Result, Err<'a>> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 15.59s [INFO] [stderr] warning: the following packages contain code that will be rejected by a future version of Rust: conch-parser v0.1.1 [INFO] [stderr] note: to see what the problems were, use the option `--future-incompat-report`, or run `cargo report future-incompatibilities --id 1` [INFO] running `Command { std: "docker" "inspect" "f1f049f71f22dc13a6fdc7533faa9264f9b851b2c837c4a61b1ba0d38c0713e0", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "f1f049f71f22dc13a6fdc7533faa9264f9b851b2c837c4a61b1ba0d38c0713e0", kill_on_drop: false }` [INFO] [stdout] f1f049f71f22dc13a6fdc7533faa9264f9b851b2c837c4a61b1ba0d38c0713e0