[INFO] fetching crate gll 0.0.2... [INFO] linting gll-0.0.2 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate gll 0.0.2 into /workspace/builds/worker-6-tc1/source [INFO] started tweaking crates.io crate gll 0.0.2 [INFO] finished tweaking crates.io crate gll 0.0.2 [INFO] tweaked toml for crates.io crate gll 0.0.2 written to /workspace/builds/worker-6-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate gll 0.0.2 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 4 packages to latest compatible versions [INFO] [stderr] Adding indexing v0.3.2 (available: v0.4.1) [INFO] [stderr] Adding ordermap v0.3.5 (available: v1.1.0) [INFO] [stderr] Adding proc-macro2 v0.4.30 (available: v1.0.106) [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 indexing v0.3.2 [INFO] [stderr] Downloaded ordermap v0.3.5 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 1c8347163eefec1a95a2aa5625cbf611b69c420e004a44c52fef1858ec7ed1d4 [INFO] running `Command { std: "docker" "start" "-a" "1c8347163eefec1a95a2aa5625cbf611b69c420e004a44c52fef1858ec7ed1d4", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "1c8347163eefec1a95a2aa5625cbf611b69c420e004a44c52fef1858ec7ed1d4", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "1c8347163eefec1a95a2aa5625cbf611b69c420e004a44c52fef1858ec7ed1d4", kill_on_drop: false }` [INFO] [stdout] 1c8347163eefec1a95a2aa5625cbf611b69c420e004a44c52fef1858ec7ed1d4 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 70aa045d9155e31c29ea7be270719cf36a91b5d188a83c448ed2b31fffdb6069 [INFO] running `Command { std: "docker" "start" "-a" "70aa045d9155e31c29ea7be270719cf36a91b5d188a83c448ed2b31fffdb6069", kill_on_drop: false }` [INFO] [stderr] warning: `package.edition` is unspecified, defaulting to `2015` while the latest is `2024` [INFO] [stderr] Compiling indexing v0.3.2 [INFO] [stderr] Compiling proc-macro2 v0.4.30 [INFO] [stderr] Compiling ordermap v0.3.5 [INFO] [stderr] Checking unicode-xid v0.1.0 [INFO] [stderr] Compiling gll v0.0.2 (/opt/rustwide/workdir) [INFO] [stdout] warning: `cfg_attr` is deprecated for rustfmt and got replaced by tool attributes [INFO] [stdout] --> src/generate/rust.rs:230:1 [INFO] [stdout] | [INFO] [stdout] 230 | #[cfg_attr(rustfmt, rustfmt_skip)] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `#[rustfmt::skip]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_cfg_attr [INFO] [stdout] = note: `#[warn(clippy::deprecated_cfg_attr)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `cfg_attr` is deprecated for rustfmt and got replaced by tool attributes [INFO] [stdout] --> src/generate/rust.rs:1090:5 [INFO] [stdout] | [INFO] [stdout] 1090 | #[cfg_attr(rustfmt, rustfmt_skip)] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `#[rustfmt::skip]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_cfg_attr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `cfg_attr` is deprecated for rustfmt and got replaced by tool attributes [INFO] [stdout] --> src/generate/rust.rs:1343:5 [INFO] [stdout] | [INFO] [stdout] 1343 | #[cfg_attr(rustfmt, rustfmt_skip)] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `#[rustfmt::skip]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_cfg_attr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/generate/rust.rs:34:10 [INFO] [stdout] | [INFO] [stdout] 34 | ) -> Option>, &str, OrderMap<&str, OrderSet>>)>> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/generate/rust.rs:45:24 [INFO] [stdout] | [INFO] [stdout] 45 | if path.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `path.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: comparison to empty slice [INFO] [stdout] --> src/generate/rust.rs:49:28 [INFO] [stdout] | [INFO] [stdout] 49 | if variants[path[0]].1 != "" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!variants[path[0]].1.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] = note: `#[warn(clippy::comparison_to_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/generate/rust.rs:62:40 [INFO] [stdout] | [INFO] [stdout] 62 | if variants.iter().any(|x| x.1 == "") { [INFO] [stdout] | ^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `x.1.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/generate/rust.rs:108:22 [INFO] [stdout] | [INFO] [stdout] 108 | parse_nodes: &RefCell< [INFO] [stdout] | ______________________^ [INFO] [stdout] 109 | | OrderMap>)>, [INFO] [stdout] 110 | | >, [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/generate/rust.rs:168:22 [INFO] [stdout] | [INFO] [stdout] 168 | parse_nodes: &RefCell< [INFO] [stdout] | ______________________^ [INFO] [stdout] 169 | | OrderMap>)>, [INFO] [stdout] 170 | | >, [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take` [INFO] [stdout] --> src/generate/rust.rs:253:27 [INFO] [stdout] | [INFO] [stdout] 253 | let out_imports = mem::replace(&mut out, String::new()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `std::mem::take(&mut out)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mem_replace_with_default [INFO] [stdout] = note: `#[warn(clippy::mem_replace_with_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/generate/rust.rs:633:64 [INFO] [stdout] | [INFO] [stdout] 633 | ... if rule.field_pathset_is_refutable(&paths) { [INFO] [stdout] | ^^^^^^ help: change this to: `paths` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference [INFO] [stdout] --> src/generate/rust.rs:1059:18 [INFO] [stdout] | [INFO] [stdout] 1059 | fn to_inline(&mut self) -> &mut String { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] = note: `#[warn(clippy::wrong_self_convention)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference [INFO] [stdout] --> src/generate/rust.rs:1079:17 [INFO] [stdout] | [INFO] [stdout] 1079 | fn to_label(&mut self) -> &mut CodeLabel { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> src/generate/rust.rs:1289:24 [INFO] [stdout] | [INFO] [stdout] 1289 | if let None = nested_frames[child_cont.nested_frames.len() - 1] { [INFO] [stdout] | -------^^^^---------------------------------------------------- help: try: `if nested_frames[child_cont.nested_frames.len() - 1].is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take` [INFO] [stdout] --> src/generate/rust.rs:1319:29 [INFO] [stdout] | [INFO] [stdout] 1319 | let nested_frames = mem::replace(&mut cont.nested_frames, vec![]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `std::mem::take(&mut cont.nested_frames)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mem_replace_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/generate/rust.rs:1346:22 [INFO] [stdout] | [INFO] [stdout] 1346 | parse_nodes: Option<&'a RefCell>)>>> [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/generate/rust.rs:1452:22 [INFO] [stdout] | [INFO] [stdout] 1452 | parse_nodes: &RefCell< [INFO] [stdout] | ______________________^ [INFO] [stdout] 1453 | | OrderMap, (ParseNodeKind, Option>)>, [INFO] [stdout] 1454 | | >, [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/grammar.rs:552:23 [INFO] [stdout] | [INFO] [stdout] 552 | let is_leaf = match &*self.rule { [INFO] [stdout] | _______________________^ [INFO] [stdout] 553 | | Rule::Empty | Rule::Eat(_) | Rule::NegativeLookahead(_) | Rule::Call(_) => true, [INFO] [stdout] 554 | | _ => false, [INFO] [stdout] 555 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 552 - let is_leaf = match &*self.rule { [INFO] [stdout] 553 - Rule::Empty | Rule::Eat(_) | Rule::NegativeLookahead(_) | Rule::Call(_) => true, [INFO] [stdout] 554 - _ => false, [INFO] [stdout] 555 - }; [INFO] [stdout] 552 + let is_leaf = matches!(&*self.rule, Rule::Empty | Rule::Eat(_) | Rule::NegativeLookahead(_) | Rule::Call(_)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/scannerless.rs:19:6 [INFO] [stdout] | [INFO] [stdout] 19 | impl<'a, C> From<&'a str> for Pat { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 19 - impl<'a, C> From<&'a str> for Pat { [INFO] [stdout] 19 + impl From<&str> for Pat { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> build.rs:121:15 [INFO] [stdout] | [INFO] [stdout] 121 | fs::write(&out_dir.join("parse_grammar.rs"), grammar.generate_rust()).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `out_dir.join("parse_grammar.rs")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/generate/rust.rs:1049:14 [INFO] [stdout] | [INFO] [stdout] 1049 | fn clone(&mut self) -> Continuation { [INFO] [stdout] | ^^^^^^^^^ ^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 1049 | fn clone(&mut self) -> Continuation<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/generate/rust.rs:1477:21 [INFO] [stdout] | [INFO] [stdout] 1477 | / write!( [INFO] [stdout] 1478 | | s, [INFO] [stdout] 1479 | | "{} _{}: {} => {},", [INFO] [stdout] 1480 | | i, [INFO] [stdout] ... | [INFO] [stdout] 1483 | | rule.generate_traverse_shape(true, parse_nodes) [INFO] [stdout] 1484 | | ); [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 1477 | let _ = write!( [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/generate/rust.rs:1486:17 [INFO] [stdout] | [INFO] [stdout] 1486 | write!(s, " }}"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 1486 | let _ = write!(s, " }}"); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `cfg_attr` is deprecated for rustfmt and got replaced by tool attributes [INFO] [stdout] --> src/generate/rust.rs:230:1 [INFO] [stdout] | [INFO] [stdout] 230 | #[cfg_attr(rustfmt, rustfmt_skip)] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `#[rustfmt::skip]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_cfg_attr [INFO] [stdout] = note: `#[warn(clippy::deprecated_cfg_attr)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `cfg_attr` is deprecated for rustfmt and got replaced by tool attributes [INFO] [stdout] --> src/generate/rust.rs:1090:5 [INFO] [stdout] | [INFO] [stdout] 1090 | #[cfg_attr(rustfmt, rustfmt_skip)] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `#[rustfmt::skip]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_cfg_attr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `cfg_attr` is deprecated for rustfmt and got replaced by tool attributes [INFO] [stdout] --> src/generate/rust.rs:1343:5 [INFO] [stdout] | [INFO] [stdout] 1343 | #[cfg_attr(rustfmt, rustfmt_skip)] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `#[rustfmt::skip]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_cfg_attr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `cfg_attr` is deprecated for rustfmt and got replaced by tool attributes [INFO] [stdout] --> src/generate/rust.rs:230:1 [INFO] [stdout] | [INFO] [stdout] 230 | #[cfg_attr(rustfmt, rustfmt_skip)] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `#[rustfmt::skip]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_cfg_attr [INFO] [stdout] = note: `#[warn(clippy::deprecated_cfg_attr)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `cfg_attr` is deprecated for rustfmt and got replaced by tool attributes [INFO] [stdout] --> src/generate/rust.rs:1090:5 [INFO] [stdout] | [INFO] [stdout] 1090 | #[cfg_attr(rustfmt, rustfmt_skip)] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `#[rustfmt::skip]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_cfg_attr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `cfg_attr` is deprecated for rustfmt and got replaced by tool attributes [INFO] [stdout] --> src/generate/rust.rs:1343:5 [INFO] [stdout] | [INFO] [stdout] 1343 | #[cfg_attr(rustfmt, rustfmt_skip)] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `#[rustfmt::skip]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_cfg_attr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait objects without an explicit `dyn` are deprecated [INFO] [stdout] --> src/runtime.rs:425:43 [INFO] [stdout] | [INFO] [stdout] 425 | pub fn dump_graphviz(&self, out: &mut Write) -> io::Result<()> { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: `#[warn(bare_trait_objects)]` (part of `#[warn(rust_2021_compatibility)]`) on by default [INFO] [stdout] help: if this is a dyn-compatible trait, use `dyn` [INFO] [stdout] | [INFO] [stdout] 425 | pub fn dump_graphviz(&self, out: &mut dyn Write) -> io::Result<()> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait objects without an explicit `dyn` are deprecated [INFO] [stdout] --> src/runtime.rs:575:43 [INFO] [stdout] | [INFO] [stdout] 575 | pub fn dump_graphviz(&self, out: &mut Write) -> io::Result<()> { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: if this is a dyn-compatible trait, use `dyn` [INFO] [stdout] | [INFO] [stdout] 575 | pub fn dump_graphviz(&self, out: &mut dyn Write) -> io::Result<()> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait objects without an explicit `dyn` are deprecated [INFO] [stdout] --> src/runtime.rs:425:43 [INFO] [stdout] | [INFO] [stdout] 425 | pub fn dump_graphviz(&self, out: &mut Write) -> io::Result<()> { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: `#[warn(bare_trait_objects)]` (part of `#[warn(rust_2021_compatibility)]`) on by default [INFO] [stdout] help: if this is a dyn-compatible trait, use `dyn` [INFO] [stdout] | [INFO] [stdout] 425 | pub fn dump_graphviz(&self, out: &mut dyn Write) -> io::Result<()> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait objects without an explicit `dyn` are deprecated [INFO] [stdout] --> src/runtime.rs:575:43 [INFO] [stdout] | [INFO] [stdout] 575 | pub fn dump_graphviz(&self, out: &mut Write) -> io::Result<()> { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: if this is a dyn-compatible trait, use `dyn` [INFO] [stdout] | [INFO] [stdout] 575 | pub fn dump_graphviz(&self, out: &mut dyn Write) -> io::Result<()> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/generate/rust.rs:34:10 [INFO] [stdout] | [INFO] [stdout] 34 | ) -> Option>, &str, OrderMap<&str, OrderSet>>)>> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/generate/rust.rs:45:24 [INFO] [stdout] | [INFO] [stdout] 45 | if path.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `path.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: comparison to empty slice [INFO] [stdout] --> src/generate/rust.rs:49:28 [INFO] [stdout] | [INFO] [stdout] 49 | if variants[path[0]].1 != "" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!variants[path[0]].1.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] = note: `#[warn(clippy::comparison_to_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/generate/rust.rs:62:40 [INFO] [stdout] | [INFO] [stdout] 62 | if variants.iter().any(|x| x.1 == "") { [INFO] [stdout] | ^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `x.1.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/generate/rust.rs:108:22 [INFO] [stdout] | [INFO] [stdout] 108 | parse_nodes: &RefCell< [INFO] [stdout] | ______________________^ [INFO] [stdout] 109 | | OrderMap>)>, [INFO] [stdout] 110 | | >, [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/generate/rust.rs:168:22 [INFO] [stdout] | [INFO] [stdout] 168 | parse_nodes: &RefCell< [INFO] [stdout] | ______________________^ [INFO] [stdout] 169 | | OrderMap>)>, [INFO] [stdout] 170 | | >, [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this seems like a manual implementation of the non-exhaustive pattern [INFO] [stdout] --> src/generate/rust.rs:223:1 [INFO] [stdout] | [INFO] [stdout] 223 | / pub struct Options { [INFO] [stdout] 224 | | /// Disable generating macros (e.g. `P!(...)` sugar for `_P::...`). [INFO] [stdout] 225 | | pub no_macros: bool, [INFO] [stdout] ... | [INFO] [stdout] 228 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] help: remove this field [INFO] [stdout] --> src/generate/rust.rs:227:5 [INFO] [stdout] | [INFO] [stdout] 227 | _nonexhaustive: (), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_non_exhaustive [INFO] [stdout] = note: `#[warn(clippy::manual_non_exhaustive)]` on by default [INFO] [stdout] help: use the `#[non_exhaustive]` attribute instead [INFO] [stdout] | [INFO] [stdout] 223 + #[non_exhaustive] [INFO] [stdout] 224 | pub struct Options { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take` [INFO] [stdout] --> src/generate/rust.rs:253:27 [INFO] [stdout] | [INFO] [stdout] 253 | let out_imports = mem::replace(&mut out, String::new()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `std::mem::take(&mut out)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mem_replace_with_default [INFO] [stdout] = note: `#[warn(clippy::mem_replace_with_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/generate/rust.rs:633:64 [INFO] [stdout] | [INFO] [stdout] 633 | ... if rule.field_pathset_is_refutable(&paths) { [INFO] [stdout] | ^^^^^^ help: change this to: `paths` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference [INFO] [stdout] --> src/generate/rust.rs:1059:18 [INFO] [stdout] | [INFO] [stdout] 1059 | fn to_inline(&mut self) -> &mut String { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] = note: `#[warn(clippy::wrong_self_convention)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference [INFO] [stdout] --> src/generate/rust.rs:1079:17 [INFO] [stdout] | [INFO] [stdout] 1079 | fn to_label(&mut self) -> &mut CodeLabel { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> src/generate/rust.rs:1289:24 [INFO] [stdout] | [INFO] [stdout] 1289 | if let None = nested_frames[child_cont.nested_frames.len() - 1] { [INFO] [stdout] | -------^^^^---------------------------------------------------- help: try: `if nested_frames[child_cont.nested_frames.len() - 1].is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take` [INFO] [stdout] --> src/generate/rust.rs:1319:29 [INFO] [stdout] | [INFO] [stdout] 1319 | let nested_frames = mem::replace(&mut cont.nested_frames, vec![]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `std::mem::take(&mut cont.nested_frames)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mem_replace_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/generate/rust.rs:1346:22 [INFO] [stdout] | [INFO] [stdout] 1346 | parse_nodes: Option<&'a RefCell>)>>> [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/generate/rust.rs:1452:22 [INFO] [stdout] | [INFO] [stdout] 1452 | parse_nodes: &RefCell< [INFO] [stdout] | ______________________^ [INFO] [stdout] 1453 | | OrderMap, (ParseNodeKind, Option>)>, [INFO] [stdout] 1454 | | >, [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Grammar` [INFO] [stdout] --> src/grammar.rs:43:5 [INFO] [stdout] | [INFO] [stdout] 43 | / pub fn new() -> Self { [INFO] [stdout] 44 | | Grammar { [INFO] [stdout] 45 | | rules: OrderMap::new(), [INFO] [stdout] 46 | | } [INFO] [stdout] 47 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 42 + impl Default for Grammar { [INFO] [stdout] 43 + fn default() -> Self { [INFO] [stdout] 44 + Self::new() [INFO] [stdout] 45 + } [INFO] [stdout] 46 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/generate/rust.rs:34:10 [INFO] [stdout] | [INFO] [stdout] 34 | ) -> Option>, &str, OrderMap<&str, OrderSet>>)>> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/grammar.rs:552:23 [INFO] [stdout] | [INFO] [stdout] 552 | let is_leaf = match &*self.rule { [INFO] [stdout] | _______________________^ [INFO] [stdout] 553 | | Rule::Empty | Rule::Eat(_) | Rule::NegativeLookahead(_) | Rule::Call(_) => true, [INFO] [stdout] 554 | | _ => false, [INFO] [stdout] 555 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 552 - let is_leaf = match &*self.rule { [INFO] [stdout] 553 - Rule::Empty | Rule::Eat(_) | Rule::NegativeLookahead(_) | Rule::Call(_) => true, [INFO] [stdout] 554 - _ => false, [INFO] [stdout] 555 - }; [INFO] [stdout] 552 + let is_leaf = matches!(&*self.rule, Rule::Empty | Rule::Eat(_) | Rule::NegativeLookahead(_) | Rule::Call(_)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/generate/rust.rs:45:24 [INFO] [stdout] | [INFO] [stdout] 45 | if path.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `path.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: comparison to empty slice [INFO] [stdout] --> src/generate/rust.rs:49:28 [INFO] [stdout] | [INFO] [stdout] 49 | if variants[path[0]].1 != "" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!variants[path[0]].1.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] = note: `#[warn(clippy::comparison_to_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/generate/rust.rs:62:40 [INFO] [stdout] | [INFO] [stdout] 62 | if variants.iter().any(|x| x.1 == "") { [INFO] [stdout] | ^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `x.1.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/generate/rust.rs:108:22 [INFO] [stdout] | [INFO] [stdout] 108 | parse_nodes: &RefCell< [INFO] [stdout] | ______________________^ [INFO] [stdout] 109 | | OrderMap>)>, [INFO] [stdout] 110 | | >, [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/generate/rust.rs:168:22 [INFO] [stdout] | [INFO] [stdout] 168 | parse_nodes: &RefCell< [INFO] [stdout] | ______________________^ [INFO] [stdout] 169 | | OrderMap>)>, [INFO] [stdout] 170 | | >, [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this seems like a manual implementation of the non-exhaustive pattern [INFO] [stdout] --> src/generate/rust.rs:223:1 [INFO] [stdout] | [INFO] [stdout] 223 | / pub struct Options { [INFO] [stdout] 224 | | /// Disable generating macros (e.g. `P!(...)` sugar for `_P::...`). [INFO] [stdout] 225 | | pub no_macros: bool, [INFO] [stdout] ... | [INFO] [stdout] 228 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] help: remove this field [INFO] [stdout] --> src/generate/rust.rs:227:5 [INFO] [stdout] | [INFO] [stdout] 227 | _nonexhaustive: (), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_non_exhaustive [INFO] [stdout] = note: `#[warn(clippy::manual_non_exhaustive)]` on by default [INFO] [stdout] help: use the `#[non_exhaustive]` attribute instead [INFO] [stdout] | [INFO] [stdout] 223 + #[non_exhaustive] [INFO] [stdout] 224 | pub struct Options { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/proc_macro.rs:150:17 [INFO] [stdout] | [INFO] [stdout] 150 | ch.map_or(true, |b| a.as_char() == b) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_none_or` instead [INFO] [stdout] | [INFO] [stdout] 150 - ch.map_or(true, |b| a.as_char() == b) [INFO] [stdout] 150 + ch.is_none_or(|b| a.as_char() == b) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/proc_macro.rs:151:24 [INFO] [stdout] | [INFO] [stdout] 151 | && joint.map_or(true, |b| (a.spacing() == Spacing::Joint) == b) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_none_or` instead [INFO] [stdout] | [INFO] [stdout] 151 - && joint.map_or(true, |b| (a.spacing() == Spacing::Joint) == b) [INFO] [stdout] 151 + && joint.is_none_or(|b| (a.spacing() == Spacing::Joint) == b) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-canonical implementation of `partial_cmp` on an `Ord` type [INFO] [stdout] --> src/runtime.rs:23:1 [INFO] [stdout] | [INFO] [stdout] 23 | / impl<'i> PartialOrd for Range<'i> { [INFO] [stdout] 24 | | fn partial_cmp(&self, other: &Self) -> Option { [INFO] [stdout] 25 | | (self.start(), self.end()).partial_cmp(&(other.start(), other.end())) [INFO] [stdout] 26 | | } [INFO] [stdout] 27 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_canonical_partial_ord_impl [INFO] [stdout] = note: `#[warn(clippy::non_canonical_partial_ord_impl)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 24 - fn partial_cmp(&self, other: &Self) -> Option { [INFO] [stdout] 25 - (self.start(), self.end()).partial_cmp(&(other.start(), other.end())) [INFO] [stdout] 26 - } [INFO] [stdout] 24 + fn partial_cmp(&self, other: &Self) -> Option { Some(self.cmp(other)) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `offset` with a `usize` casted to an `isize` [INFO] [stdout] --> src/runtime.rs:103:18 [INFO] [stdout] | [INFO] [stdout] 103 | unsafe { self.begin().offset(self.0.len() as isize) } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_offset_with_cast [INFO] [stdout] = note: `#[warn(clippy::ptr_offset_with_cast)]` on by default [INFO] [stdout] help: use `add` instead [INFO] [stdout] | [INFO] [stdout] 103 - unsafe { self.begin().offset(self.0.len() as isize) } [INFO] [stdout] 103 + unsafe { self.begin().add(self.0.len()) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/runtime.rs:125:6 [INFO] [stdout] | [INFO] [stdout] 125 | impl<'a, T> Input for &'a [T] { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 125 - impl<'a, T> Input for &'a [T] { [INFO] [stdout] 125 + impl Input for &[T] { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take` [INFO] [stdout] --> src/generate/rust.rs:253:27 [INFO] [stdout] | [INFO] [stdout] 253 | let out_imports = mem::replace(&mut out, String::new()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `std::mem::take(&mut out)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mem_replace_with_default [INFO] [stdout] = note: `#[warn(clippy::mem_replace_with_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/runtime.rs:178:6 [INFO] [stdout] | [INFO] [stdout] 178 | impl<'a, T: PartialEq> InputMatch<&'a [T]> for [T] { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 178 - impl<'a, T: PartialEq> InputMatch<&'a [T]> for [T] { [INFO] [stdout] 178 + impl InputMatch<&[T]> for [T] { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/runtime.rs:214:6 [INFO] [stdout] | [INFO] [stdout] 214 | impl<'a> InputMatch<&'a str> for str { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 214 - impl<'a> InputMatch<&'a str> for str { [INFO] [stdout] 214 + impl InputMatch<&str> for str { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual backwards iteration [INFO] [stdout] --> src/runtime.rs:241:29 [INFO] [stdout] | [INFO] [stdout] 241 | let c = self.chars().rev().next()?; [INFO] [stdout] | ^^^^^^^^^^^^^ help: use: `.next_back()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_next_back [INFO] [stdout] = note: `#[warn(clippy::manual_next_back)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/runtime.rs:368:24 [INFO] [stdout] | [INFO] [stdout] 368 | if !t.range.contains(old.range.start()).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `t.range.contains(old.range.start()).is_none()` [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: manual backwards iteration [INFO] [stdout] --> src/runtime.rs:365:43 [INFO] [stdout] | [INFO] [stdout] 365 | let old = self.seen.iter().rev().next().cloned(); [INFO] [stdout] | ^^^^^^^^^^^^^ help: use: `.next_back()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_next_back [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual backwards iteration [INFO] [stdout] --> src/runtime.rs:465:27 [INFO] [stdout] | [INFO] [stdout] 465 | self.results(call).rev().next() [INFO] [stdout] | ^^^^^^^^^^^^^ help: use: `.next_back()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_next_back [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Id` [INFO] [stdout] --> src/runtime.rs:739:9 [INFO] [stdout] | [INFO] [stdout] 739 | / pub fn new() -> Self { [INFO] [stdout] 740 | | Id(PhantomData) [INFO] [stdout] 741 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 738 ~ impl Default for Id { [INFO] [stdout] 739 + fn default() -> Self { [INFO] [stdout] 740 + Self::new() [INFO] [stdout] 741 + } [INFO] [stdout] 742 + } [INFO] [stdout] 743 + [INFO] [stdout] 744 ~ impl Id { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/generate/rust.rs:633:64 [INFO] [stdout] | [INFO] [stdout] 633 | ... if rule.field_pathset_is_refutable(&paths) { [INFO] [stdout] | ^^^^^^ help: change this to: `paths` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/scannerless.rs:19:6 [INFO] [stdout] | [INFO] [stdout] 19 | impl<'a, C> From<&'a str> for Pat { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 19 - impl<'a, C> From<&'a str> for Pat { [INFO] [stdout] 19 + impl From<&str> for Pat { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> /opt/rustwide/target/debug/build/gll-65da16036aa661eb/out/parse_grammar.rs:958:31 [INFO] [stdout] | [INFO] [stdout] 958 | fn one_list_head(self) -> ListHead, Handle<'a, 'i, I, [T]>), Ambiguity>> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> /opt/rustwide/target/debug/build/gll-65da16036aa661eb/out/parse_grammar.rs:971:36 [INFO] [stdout] | [INFO] [stdout] 971 | fn all_list_heads(mut self) -> ListHead, Handle<'a, 'i, I, [T]>)>> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference [INFO] [stdout] --> src/generate/rust.rs:1059:18 [INFO] [stdout] | [INFO] [stdout] 1059 | fn to_inline(&mut self) -> &mut String { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] = note: `#[warn(clippy::wrong_self_convention)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference [INFO] [stdout] --> src/generate/rust.rs:1079:17 [INFO] [stdout] | [INFO] [stdout] 1079 | fn to_label(&mut self) -> &mut CodeLabel { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> src/generate/rust.rs:1289:24 [INFO] [stdout] | [INFO] [stdout] 1289 | if let None = nested_frames[child_cont.nested_frames.len() - 1] { [INFO] [stdout] | -------^^^^---------------------------------------------------- help: try: `if nested_frames[child_cont.nested_frames.len() - 1].is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take` [INFO] [stdout] --> src/generate/rust.rs:1319:29 [INFO] [stdout] | [INFO] [stdout] 1319 | let nested_frames = mem::replace(&mut cont.nested_frames, vec![]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `std::mem::take(&mut cont.nested_frames)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mem_replace_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/generate/rust.rs:1346:22 [INFO] [stdout] | [INFO] [stdout] 1346 | parse_nodes: Option<&'a RefCell>)>>> [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: try not to call a closure in the expression where it is declared [INFO] [stdout] --> /opt/rustwide/target/debug/build/gll-65da16036aa661eb/out/parse_grammar.rs:1793:9 [INFO] [stdout] | [INFO] [stdout] 1793 | / (|| Ok({ [INFO] [stdout] 1794 | | let sppf = &self.parser.sppf; [INFO] [stdout] 1795 | | let node = self.node.unpack_alias(); [INFO] [stdout] 1796 | | let r = traverse!(one(sppf, node) _); [INFO] [stdout] 1797 | | Or::from_sppf(self.parser, node, r) [INFO] [stdout] 1798 | | }))().map_err(|::gll::runtime::MoreThanOne| Ambiguity(self)) [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_call [INFO] [stdout] = note: `#[warn(clippy::redundant_closure_call)]` on by default [INFO] [stdout] help: try doing something like [INFO] [stdout] | [INFO] [stdout] 1793 ~ Ok({ [INFO] [stdout] 1794 + let sppf = &self.parser.sppf; [INFO] [stdout] 1795 + let node = self.node.unpack_alias(); [INFO] [stdout] 1796 + let r = traverse!(one(sppf, node) _); [INFO] [stdout] 1797 + Or::from_sppf(self.parser, node, r) [INFO] [stdout] 1798 ~ }).map_err(|::gll::runtime::MoreThanOne| Ambiguity(self)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: try not to call a closure in the expression where it is declared [INFO] [stdout] --> /opt/rustwide/target/debug/build/gll-65da16036aa661eb/out/parse_grammar.rs:1894:9 [INFO] [stdout] | [INFO] [stdout] 1894 | / (|| Ok({ [INFO] [stdout] 1895 | | let sppf = &self.parser.sppf; [INFO] [stdout] 1896 | | let node = self.node.unpack_alias(); [INFO] [stdout] 1897 | | let r = traverse!(one(sppf, node) _); [INFO] [stdout] 1898 | | Concat::from_sppf(self.parser, node, r) [INFO] [stdout] 1899 | | }))().map_err(|::gll::runtime::MoreThanOne| Ambiguity(self)) [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_call [INFO] [stdout] help: try doing something like [INFO] [stdout] | [INFO] [stdout] 1894 ~ Ok({ [INFO] [stdout] 1895 + let sppf = &self.parser.sppf; [INFO] [stdout] 1896 + let node = self.node.unpack_alias(); [INFO] [stdout] 1897 + let r = traverse!(one(sppf, node) _); [INFO] [stdout] 1898 + Concat::from_sppf(self.parser, node, r) [INFO] [stdout] 1899 ~ }).map_err(|::gll::runtime::MoreThanOne| Ambiguity(self)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/generate/rust.rs:1452:22 [INFO] [stdout] | [INFO] [stdout] 1452 | parse_nodes: &RefCell< [INFO] [stdout] | ______________________^ [INFO] [stdout] 1453 | | OrderMap, (ParseNodeKind, Option>)>, [INFO] [stdout] 1454 | | >, [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Grammar` [INFO] [stdout] --> src/grammar.rs:43:5 [INFO] [stdout] | [INFO] [stdout] 43 | / pub fn new() -> Self { [INFO] [stdout] 44 | | Grammar { [INFO] [stdout] 45 | | rules: OrderMap::new(), [INFO] [stdout] 46 | | } [INFO] [stdout] 47 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 42 + impl Default for Grammar { [INFO] [stdout] 43 + fn default() -> Self { [INFO] [stdout] 44 + Self::new() [INFO] [stdout] 45 + } [INFO] [stdout] 46 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/grammar.rs:552:23 [INFO] [stdout] | [INFO] [stdout] 552 | let is_leaf = match &*self.rule { [INFO] [stdout] | _______________________^ [INFO] [stdout] 553 | | Rule::Empty | Rule::Eat(_) | Rule::NegativeLookahead(_) | Rule::Call(_) => true, [INFO] [stdout] 554 | | _ => false, [INFO] [stdout] 555 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 552 - let is_leaf = match &*self.rule { [INFO] [stdout] 553 - Rule::Empty | Rule::Eat(_) | Rule::NegativeLookahead(_) | Rule::Call(_) => true, [INFO] [stdout] 554 - _ => false, [INFO] [stdout] 555 - }; [INFO] [stdout] 552 + let is_leaf = matches!(&*self.rule, Rule::Empty | Rule::Eat(_) | Rule::NegativeLookahead(_) | Rule::Call(_)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/proc_macro.rs:150:17 [INFO] [stdout] | [INFO] [stdout] 150 | ch.map_or(true, |b| a.as_char() == b) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_none_or` instead [INFO] [stdout] | [INFO] [stdout] 150 - ch.map_or(true, |b| a.as_char() == b) [INFO] [stdout] 150 + ch.is_none_or(|b| a.as_char() == b) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> /opt/rustwide/target/debug/build/gll-65da16036aa661eb/out/parse_grammar.rs:2781:21 [INFO] [stdout] | [INFO] [stdout] 2781 | / if p.input_consume_left(_range, " ").is_none() { [INFO] [stdout] 2782 | | if p.input_consume_left(_range, "\t").is_none() { [INFO] [stdout] 2783 | | if p.input_consume_left(_range, "\n").is_none() { [INFO] [stdout] 2784 | | if p.input_consume_left(_range, "\r").is_none() { [INFO] [stdout] ... | [INFO] [stdout] 2793 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2781 ~ if p.input_consume_left(_range, " ").is_none() [INFO] [stdout] 2782 ~ && p.input_consume_left(_range, "\t").is_none() { [INFO] [stdout] 2783 | if p.input_consume_left(_range, "\n").is_none() { [INFO] [stdout] ... [INFO] [stdout] 2791 | } [INFO] [stdout] 2792 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> /opt/rustwide/target/debug/build/gll-65da16036aa661eb/out/parse_grammar.rs:2782:25 [INFO] [stdout] | [INFO] [stdout] 2782 | / if p.input_consume_left(_range, "\t").is_none() { [INFO] [stdout] 2783 | | if p.input_consume_left(_range, "\n").is_none() { [INFO] [stdout] 2784 | | if p.input_consume_left(_range, "\r").is_none() { [INFO] [stdout] 2785 | | if p.input_consume_left(_range, "//").is_none() { [INFO] [stdout] ... | [INFO] [stdout] 2792 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2782 ~ if p.input_consume_left(_range, "\t").is_none() [INFO] [stdout] 2783 ~ && p.input_consume_left(_range, "\n").is_none() { [INFO] [stdout] 2784 | if p.input_consume_left(_range, "\r").is_none() { [INFO] [stdout] ... [INFO] [stdout] 2790 | } [INFO] [stdout] 2791 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> /opt/rustwide/target/debug/build/gll-65da16036aa661eb/out/parse_grammar.rs:2783:29 [INFO] [stdout] | [INFO] [stdout] 2783 | / ... if p.input_consume_left(_range, "\n").is_none() { [INFO] [stdout] 2784 | | ... if p.input_consume_left(_range, "\r").is_none() { [INFO] [stdout] 2785 | | ... if p.input_consume_left(_range, "//").is_none() { [INFO] [stdout] 2786 | | ... if p.input_consume_left(_range, "/*").is_none() { [INFO] [stdout] ... | [INFO] [stdout] 2791 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2783 ~ if p.input_consume_left(_range, "\n").is_none() [INFO] [stdout] 2784 ~ && p.input_consume_left(_range, "\r").is_none() { [INFO] [stdout] 2785 | if p.input_consume_left(_range, "//").is_none() { [INFO] [stdout] ... [INFO] [stdout] 2789 | } [INFO] [stdout] 2790 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> /opt/rustwide/target/debug/build/gll-65da16036aa661eb/out/parse_grammar.rs:2784:33 [INFO] [stdout] | [INFO] [stdout] 2784 | / ... if p.input_consume_left(_range, "\r").is_none() { [INFO] [stdout] 2785 | | ... if p.input_consume_left(_range, "//").is_none() { [INFO] [stdout] 2786 | | ... if p.input_consume_left(_range, "/*").is_none() { [INFO] [stdout] 2787 | | ... p.ret(c, _range); [INFO] [stdout] ... | [INFO] [stdout] 2790 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2784 ~ if p.input_consume_left(_range, "\r").is_none() [INFO] [stdout] 2785 ~ && p.input_consume_left(_range, "//").is_none() { [INFO] [stdout] 2786 | if p.input_consume_left(_range, "/*").is_none() { [INFO] [stdout] 2787 | p.ret(c, _range); [INFO] [stdout] 2788 | } [INFO] [stdout] 2789 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> /opt/rustwide/target/debug/build/gll-65da16036aa661eb/out/parse_grammar.rs:2785:37 [INFO] [stdout] | [INFO] [stdout] 2785 | / ... if p.input_consume_left(_range, "//").is_none() { [INFO] [stdout] 2786 | | ... if p.input_consume_left(_range, "/*").is_none() { [INFO] [stdout] 2787 | | ... p.ret(c, _range); [INFO] [stdout] 2788 | | ... } [INFO] [stdout] 2789 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2785 ~ if p.input_consume_left(_range, "//").is_none() [INFO] [stdout] 2786 ~ && p.input_consume_left(_range, "/*").is_none() { [INFO] [stdout] 2787 | p.ret(c, _range); [INFO] [stdout] 2788 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/proc_macro.rs:151:24 [INFO] [stdout] | [INFO] [stdout] 151 | && joint.map_or(true, |b| (a.spacing() == Spacing::Joint) == b) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_none_or` instead [INFO] [stdout] | [INFO] [stdout] 151 - && joint.map_or(true, |b| (a.spacing() == Spacing::Joint) == b) [INFO] [stdout] 151 + && joint.is_none_or(|b| (a.spacing() == Spacing::Joint) == b) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-canonical implementation of `partial_cmp` on an `Ord` type [INFO] [stdout] --> src/runtime.rs:23:1 [INFO] [stdout] | [INFO] [stdout] 23 | / impl<'i> PartialOrd for Range<'i> { [INFO] [stdout] 24 | | fn partial_cmp(&self, other: &Self) -> Option { [INFO] [stdout] 25 | | (self.start(), self.end()).partial_cmp(&(other.start(), other.end())) [INFO] [stdout] 26 | | } [INFO] [stdout] 27 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_canonical_partial_ord_impl [INFO] [stdout] = note: `#[warn(clippy::non_canonical_partial_ord_impl)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 24 - fn partial_cmp(&self, other: &Self) -> Option { [INFO] [stdout] 25 - (self.start(), self.end()).partial_cmp(&(other.start(), other.end())) [INFO] [stdout] 26 - } [INFO] [stdout] 24 + fn partial_cmp(&self, other: &Self) -> Option { Some(self.cmp(other)) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> /opt/rustwide/target/debug/build/gll-65da16036aa661eb/out/parse_grammar.rs:2925:21 [INFO] [stdout] | [INFO] [stdout] 2925 | / if p.input_consume_left(_range, 'a'..='z').is_none() { [INFO] [stdout] 2926 | | if p.input_consume_left(_range, 'A'..='Z').is_none() { [INFO] [stdout] 2927 | | if p.input_consume_left(_range, "_").is_none() { [INFO] [stdout] 2928 | | if p.input_consume_left(_range, '0'..='9').is_none() { [INFO] [stdout] ... | [INFO] [stdout] 2933 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2925 ~ if p.input_consume_left(_range, 'a'..='z').is_none() [INFO] [stdout] 2926 ~ && p.input_consume_left(_range, 'A'..='Z').is_none() { [INFO] [stdout] 2927 | if p.input_consume_left(_range, "_").is_none() { [INFO] [stdout] ... [INFO] [stdout] 2931 | } [INFO] [stdout] 2932 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> /opt/rustwide/target/debug/build/gll-65da16036aa661eb/out/parse_grammar.rs:2926:25 [INFO] [stdout] | [INFO] [stdout] 2926 | / if p.input_consume_left(_range, 'A'..='Z').is_none() { [INFO] [stdout] 2927 | | if p.input_consume_left(_range, "_").is_none() { [INFO] [stdout] 2928 | | if p.input_consume_left(_range, '0'..='9').is_none() { [INFO] [stdout] 2929 | | p.ret(c, _range); [INFO] [stdout] ... | [INFO] [stdout] 2932 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2926 ~ if p.input_consume_left(_range, 'A'..='Z').is_none() [INFO] [stdout] 2927 ~ && p.input_consume_left(_range, "_").is_none() { [INFO] [stdout] 2928 | if p.input_consume_left(_range, '0'..='9').is_none() { [INFO] [stdout] 2929 | p.ret(c, _range); [INFO] [stdout] 2930 | } [INFO] [stdout] 2931 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> /opt/rustwide/target/debug/build/gll-65da16036aa661eb/out/parse_grammar.rs:2927:29 [INFO] [stdout] | [INFO] [stdout] 2927 | / ... if p.input_consume_left(_range, "_").is_none() { [INFO] [stdout] 2928 | | ... if p.input_consume_left(_range, '0'..='9').is_none() { [INFO] [stdout] 2929 | | ... p.ret(c, _range); [INFO] [stdout] 2930 | | ... } [INFO] [stdout] 2931 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2927 ~ if p.input_consume_left(_range, "_").is_none() [INFO] [stdout] 2928 ~ && p.input_consume_left(_range, '0'..='9').is_none() { [INFO] [stdout] 2929 | p.ret(c, _range); [INFO] [stdout] 2930 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> /opt/rustwide/target/debug/build/gll-65da16036aa661eb/out/parse_grammar.rs:2976:21 [INFO] [stdout] | [INFO] [stdout] 2976 | / if p.input_consume_left(_range, "\\").is_none() { [INFO] [stdout] 2977 | | if p.input_consume_left(_range, "\"").is_none() { [INFO] [stdout] 2978 | | if let Some(_range) = p.input_consume_left(_range, '\0'..='\u{10ffff}') { [INFO] [stdout] 2979 | | c.code = _C::StrLit__1__1; [INFO] [stdout] ... | [INFO] [stdout] 2983 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2976 ~ if p.input_consume_left(_range, "\\").is_none() [INFO] [stdout] 2977 ~ && p.input_consume_left(_range, "\"").is_none() { [INFO] [stdout] 2978 | if let Some(_range) = p.input_consume_left(_range, '\0'..='\u{10ffff}') { [INFO] [stdout] ... [INFO] [stdout] 2981 | } [INFO] [stdout] 2982 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> /opt/rustwide/target/debug/build/gll-65da16036aa661eb/out/parse_grammar.rs:3004:25 [INFO] [stdout] | [INFO] [stdout] 3004 | / if p.input_consume_left(_range, "\\").is_none() { [INFO] [stdout] 3005 | | if p.input_consume_left(_range, "'").is_none() { [INFO] [stdout] 3006 | | if let Some(_range) = p.input_consume_left(_range, '\0'..='\u{10ffff}') { [INFO] [stdout] 3007 | | c.code = _C::CharLit__0; [INFO] [stdout] ... | [INFO] [stdout] 3011 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 3004 ~ if p.input_consume_left(_range, "\\").is_none() [INFO] [stdout] 3005 ~ && p.input_consume_left(_range, "'").is_none() { [INFO] [stdout] 3006 | if let Some(_range) = p.input_consume_left(_range, '\0'..='\u{10ffff}') { [INFO] [stdout] ... [INFO] [stdout] 3009 | } [INFO] [stdout] 3010 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `offset` with a `usize` casted to an `isize` [INFO] [stdout] --> src/runtime.rs:103:18 [INFO] [stdout] | [INFO] [stdout] 103 | unsafe { self.begin().offset(self.0.len() as isize) } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_offset_with_cast [INFO] [stdout] = note: `#[warn(clippy::ptr_offset_with_cast)]` on by default [INFO] [stdout] help: use `add` instead [INFO] [stdout] | [INFO] [stdout] 103 - unsafe { self.begin().offset(self.0.len() as isize) } [INFO] [stdout] 103 + unsafe { self.begin().add(self.0.len()) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/runtime.rs:125:6 [INFO] [stdout] | [INFO] [stdout] 125 | impl<'a, T> Input for &'a [T] { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 125 - impl<'a, T> Input for &'a [T] { [INFO] [stdout] 125 + impl Input for &[T] { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/runtime.rs:178:6 [INFO] [stdout] | [INFO] [stdout] 178 | impl<'a, T: PartialEq> InputMatch<&'a [T]> for [T] { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 178 - impl<'a, T: PartialEq> InputMatch<&'a [T]> for [T] { [INFO] [stdout] 178 + impl InputMatch<&[T]> for [T] { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/runtime.rs:214:6 [INFO] [stdout] | [INFO] [stdout] 214 | impl<'a> InputMatch<&'a str> for str { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 214 - impl<'a> InputMatch<&'a str> for str { [INFO] [stdout] 214 + impl InputMatch<&str> for str { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual backwards iteration [INFO] [stdout] --> src/runtime.rs:241:29 [INFO] [stdout] | [INFO] [stdout] 241 | let c = self.chars().rev().next()?; [INFO] [stdout] | ^^^^^^^^^^^^^ help: use: `.next_back()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_next_back [INFO] [stdout] = note: `#[warn(clippy::manual_next_back)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/runtime.rs:368:24 [INFO] [stdout] | [INFO] [stdout] 368 | if !t.range.contains(old.range.start()).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `t.range.contains(old.range.start()).is_none()` [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: manual backwards iteration [INFO] [stdout] --> src/runtime.rs:365:43 [INFO] [stdout] | [INFO] [stdout] 365 | let old = self.seen.iter().rev().next().cloned(); [INFO] [stdout] | ^^^^^^^^^^^^^ help: use: `.next_back()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_next_back [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual backwards iteration [INFO] [stdout] --> src/runtime.rs:465:27 [INFO] [stdout] | [INFO] [stdout] 465 | self.results(call).rev().next() [INFO] [stdout] | ^^^^^^^^^^^^^ help: use: `.next_back()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_next_back [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Id` [INFO] [stdout] --> src/runtime.rs:739:9 [INFO] [stdout] | [INFO] [stdout] 739 | / pub fn new() -> Self { [INFO] [stdout] 740 | | Id(PhantomData) [INFO] [stdout] 741 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 738 ~ impl Default for Id { [INFO] [stdout] 739 + fn default() -> Self { [INFO] [stdout] 740 + Self::new() [INFO] [stdout] 741 + } [INFO] [stdout] 742 + } [INFO] [stdout] 743 + [INFO] [stdout] 744 ~ impl Id { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/scannerless.rs:19:6 [INFO] [stdout] | [INFO] [stdout] 19 | impl<'a, C> From<&'a str> for Pat { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 19 - impl<'a, C> From<&'a str> for Pat { [INFO] [stdout] 19 + impl From<&str> for Pat { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/generate/rust.rs:1049:14 [INFO] [stdout] | [INFO] [stdout] 1049 | fn clone(&mut self) -> Continuation { [INFO] [stdout] | ^^^^^^^^^ ^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 1049 | fn clone(&mut self) -> Continuation<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/generate/rust.rs:1477:21 [INFO] [stdout] | [INFO] [stdout] 1477 | / write!( [INFO] [stdout] 1478 | | s, [INFO] [stdout] 1479 | | "{} _{}: {} => {},", [INFO] [stdout] 1480 | | i, [INFO] [stdout] ... | [INFO] [stdout] 1483 | | rule.generate_traverse_shape(true, parse_nodes) [INFO] [stdout] 1484 | | ); [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 1477 | let _ = write!( [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/generate/rust.rs:1486:17 [INFO] [stdout] | [INFO] [stdout] 1486 | write!(s, " }}"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 1486 | let _ = write!(s, " }}"); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> /opt/rustwide/target/debug/build/gll-65da16036aa661eb/out/parse_grammar.rs:958:31 [INFO] [stdout] | [INFO] [stdout] 958 | fn one_list_head(self) -> ListHead, Handle<'a, 'i, I, [T]>), Ambiguity>> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> /opt/rustwide/target/debug/build/gll-65da16036aa661eb/out/parse_grammar.rs:971:36 [INFO] [stdout] | [INFO] [stdout] 971 | fn all_list_heads(mut self) -> ListHead, Handle<'a, 'i, I, [T]>)>> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: try not to call a closure in the expression where it is declared [INFO] [stdout] --> /opt/rustwide/target/debug/build/gll-65da16036aa661eb/out/parse_grammar.rs:1793:9 [INFO] [stdout] | [INFO] [stdout] 1793 | / (|| Ok({ [INFO] [stdout] 1794 | | let sppf = &self.parser.sppf; [INFO] [stdout] 1795 | | let node = self.node.unpack_alias(); [INFO] [stdout] 1796 | | let r = traverse!(one(sppf, node) _); [INFO] [stdout] 1797 | | Or::from_sppf(self.parser, node, r) [INFO] [stdout] 1798 | | }))().map_err(|::gll::runtime::MoreThanOne| Ambiguity(self)) [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_call [INFO] [stdout] = note: `#[warn(clippy::redundant_closure_call)]` on by default [INFO] [stdout] help: try doing something like [INFO] [stdout] | [INFO] [stdout] 1793 ~ Ok({ [INFO] [stdout] 1794 + let sppf = &self.parser.sppf; [INFO] [stdout] 1795 + let node = self.node.unpack_alias(); [INFO] [stdout] 1796 + let r = traverse!(one(sppf, node) _); [INFO] [stdout] 1797 + Or::from_sppf(self.parser, node, r) [INFO] [stdout] 1798 ~ }).map_err(|::gll::runtime::MoreThanOne| Ambiguity(self)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: try not to call a closure in the expression where it is declared [INFO] [stdout] --> /opt/rustwide/target/debug/build/gll-65da16036aa661eb/out/parse_grammar.rs:1894:9 [INFO] [stdout] | [INFO] [stdout] 1894 | / (|| Ok({ [INFO] [stdout] 1895 | | let sppf = &self.parser.sppf; [INFO] [stdout] 1896 | | let node = self.node.unpack_alias(); [INFO] [stdout] 1897 | | let r = traverse!(one(sppf, node) _); [INFO] [stdout] 1898 | | Concat::from_sppf(self.parser, node, r) [INFO] [stdout] 1899 | | }))().map_err(|::gll::runtime::MoreThanOne| Ambiguity(self)) [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_call [INFO] [stdout] help: try doing something like [INFO] [stdout] | [INFO] [stdout] 1894 ~ Ok({ [INFO] [stdout] 1895 + let sppf = &self.parser.sppf; [INFO] [stdout] 1896 + let node = self.node.unpack_alias(); [INFO] [stdout] 1897 + let r = traverse!(one(sppf, node) _); [INFO] [stdout] 1898 + Concat::from_sppf(self.parser, node, r) [INFO] [stdout] 1899 ~ }).map_err(|::gll::runtime::MoreThanOne| Ambiguity(self)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> /opt/rustwide/target/debug/build/gll-65da16036aa661eb/out/parse_grammar.rs:2781:21 [INFO] [stdout] | [INFO] [stdout] 2781 | / if p.input_consume_left(_range, " ").is_none() { [INFO] [stdout] 2782 | | if p.input_consume_left(_range, "\t").is_none() { [INFO] [stdout] 2783 | | if p.input_consume_left(_range, "\n").is_none() { [INFO] [stdout] 2784 | | if p.input_consume_left(_range, "\r").is_none() { [INFO] [stdout] ... | [INFO] [stdout] 2793 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2781 ~ if p.input_consume_left(_range, " ").is_none() [INFO] [stdout] 2782 ~ && p.input_consume_left(_range, "\t").is_none() { [INFO] [stdout] 2783 | if p.input_consume_left(_range, "\n").is_none() { [INFO] [stdout] ... [INFO] [stdout] 2791 | } [INFO] [stdout] 2792 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> /opt/rustwide/target/debug/build/gll-65da16036aa661eb/out/parse_grammar.rs:2782:25 [INFO] [stdout] | [INFO] [stdout] 2782 | / if p.input_consume_left(_range, "\t").is_none() { [INFO] [stdout] 2783 | | if p.input_consume_left(_range, "\n").is_none() { [INFO] [stdout] 2784 | | if p.input_consume_left(_range, "\r").is_none() { [INFO] [stdout] 2785 | | if p.input_consume_left(_range, "//").is_none() { [INFO] [stdout] ... | [INFO] [stdout] 2792 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2782 ~ if p.input_consume_left(_range, "\t").is_none() [INFO] [stdout] 2783 ~ && p.input_consume_left(_range, "\n").is_none() { [INFO] [stdout] 2784 | if p.input_consume_left(_range, "\r").is_none() { [INFO] [stdout] ... [INFO] [stdout] 2790 | } [INFO] [stdout] 2791 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> /opt/rustwide/target/debug/build/gll-65da16036aa661eb/out/parse_grammar.rs:2783:29 [INFO] [stdout] | [INFO] [stdout] 2783 | / ... if p.input_consume_left(_range, "\n").is_none() { [INFO] [stdout] 2784 | | ... if p.input_consume_left(_range, "\r").is_none() { [INFO] [stdout] 2785 | | ... if p.input_consume_left(_range, "//").is_none() { [INFO] [stdout] 2786 | | ... if p.input_consume_left(_range, "/*").is_none() { [INFO] [stdout] ... | [INFO] [stdout] 2791 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2783 ~ if p.input_consume_left(_range, "\n").is_none() [INFO] [stdout] 2784 ~ && p.input_consume_left(_range, "\r").is_none() { [INFO] [stdout] 2785 | if p.input_consume_left(_range, "//").is_none() { [INFO] [stdout] ... [INFO] [stdout] 2789 | } [INFO] [stdout] 2790 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> /opt/rustwide/target/debug/build/gll-65da16036aa661eb/out/parse_grammar.rs:2784:33 [INFO] [stdout] | [INFO] [stdout] 2784 | / ... if p.input_consume_left(_range, "\r").is_none() { [INFO] [stdout] 2785 | | ... if p.input_consume_left(_range, "//").is_none() { [INFO] [stdout] 2786 | | ... if p.input_consume_left(_range, "/*").is_none() { [INFO] [stdout] 2787 | | ... p.ret(c, _range); [INFO] [stdout] ... | [INFO] [stdout] 2790 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2784 ~ if p.input_consume_left(_range, "\r").is_none() [INFO] [stdout] 2785 ~ && p.input_consume_left(_range, "//").is_none() { [INFO] [stdout] 2786 | if p.input_consume_left(_range, "/*").is_none() { [INFO] [stdout] 2787 | p.ret(c, _range); [INFO] [stdout] 2788 | } [INFO] [stdout] 2789 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> /opt/rustwide/target/debug/build/gll-65da16036aa661eb/out/parse_grammar.rs:2785:37 [INFO] [stdout] | [INFO] [stdout] 2785 | / ... if p.input_consume_left(_range, "//").is_none() { [INFO] [stdout] 2786 | | ... if p.input_consume_left(_range, "/*").is_none() { [INFO] [stdout] 2787 | | ... p.ret(c, _range); [INFO] [stdout] 2788 | | ... } [INFO] [stdout] 2789 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2785 ~ if p.input_consume_left(_range, "//").is_none() [INFO] [stdout] 2786 ~ && p.input_consume_left(_range, "/*").is_none() { [INFO] [stdout] 2787 | p.ret(c, _range); [INFO] [stdout] 2788 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> /opt/rustwide/target/debug/build/gll-65da16036aa661eb/out/parse_grammar.rs:2925:21 [INFO] [stdout] | [INFO] [stdout] 2925 | / if p.input_consume_left(_range, 'a'..='z').is_none() { [INFO] [stdout] 2926 | | if p.input_consume_left(_range, 'A'..='Z').is_none() { [INFO] [stdout] 2927 | | if p.input_consume_left(_range, "_").is_none() { [INFO] [stdout] 2928 | | if p.input_consume_left(_range, '0'..='9').is_none() { [INFO] [stdout] ... | [INFO] [stdout] 2933 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2925 ~ if p.input_consume_left(_range, 'a'..='z').is_none() [INFO] [stdout] 2926 ~ && p.input_consume_left(_range, 'A'..='Z').is_none() { [INFO] [stdout] 2927 | if p.input_consume_left(_range, "_").is_none() { [INFO] [stdout] ... [INFO] [stdout] 2931 | } [INFO] [stdout] 2932 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> /opt/rustwide/target/debug/build/gll-65da16036aa661eb/out/parse_grammar.rs:2926:25 [INFO] [stdout] | [INFO] [stdout] 2926 | / if p.input_consume_left(_range, 'A'..='Z').is_none() { [INFO] [stdout] 2927 | | if p.input_consume_left(_range, "_").is_none() { [INFO] [stdout] 2928 | | if p.input_consume_left(_range, '0'..='9').is_none() { [INFO] [stdout] 2929 | | p.ret(c, _range); [INFO] [stdout] ... | [INFO] [stdout] 2932 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2926 ~ if p.input_consume_left(_range, 'A'..='Z').is_none() [INFO] [stdout] 2927 ~ && p.input_consume_left(_range, "_").is_none() { [INFO] [stdout] 2928 | if p.input_consume_left(_range, '0'..='9').is_none() { [INFO] [stdout] 2929 | p.ret(c, _range); [INFO] [stdout] 2930 | } [INFO] [stdout] 2931 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> /opt/rustwide/target/debug/build/gll-65da16036aa661eb/out/parse_grammar.rs:2927:29 [INFO] [stdout] | [INFO] [stdout] 2927 | / ... if p.input_consume_left(_range, "_").is_none() { [INFO] [stdout] 2928 | | ... if p.input_consume_left(_range, '0'..='9').is_none() { [INFO] [stdout] 2929 | | ... p.ret(c, _range); [INFO] [stdout] 2930 | | ... } [INFO] [stdout] 2931 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2927 ~ if p.input_consume_left(_range, "_").is_none() [INFO] [stdout] 2928 ~ && p.input_consume_left(_range, '0'..='9').is_none() { [INFO] [stdout] 2929 | p.ret(c, _range); [INFO] [stdout] 2930 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> /opt/rustwide/target/debug/build/gll-65da16036aa661eb/out/parse_grammar.rs:2976:21 [INFO] [stdout] | [INFO] [stdout] 2976 | / if p.input_consume_left(_range, "\\").is_none() { [INFO] [stdout] 2977 | | if p.input_consume_left(_range, "\"").is_none() { [INFO] [stdout] 2978 | | if let Some(_range) = p.input_consume_left(_range, '\0'..='\u{10ffff}') { [INFO] [stdout] 2979 | | c.code = _C::StrLit__1__1; [INFO] [stdout] ... | [INFO] [stdout] 2983 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2976 ~ if p.input_consume_left(_range, "\\").is_none() [INFO] [stdout] 2977 ~ && p.input_consume_left(_range, "\"").is_none() { [INFO] [stdout] 2978 | if let Some(_range) = p.input_consume_left(_range, '\0'..='\u{10ffff}') { [INFO] [stdout] ... [INFO] [stdout] 2981 | } [INFO] [stdout] 2982 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> /opt/rustwide/target/debug/build/gll-65da16036aa661eb/out/parse_grammar.rs:3004:25 [INFO] [stdout] | [INFO] [stdout] 3004 | / if p.input_consume_left(_range, "\\").is_none() { [INFO] [stdout] 3005 | | if p.input_consume_left(_range, "'").is_none() { [INFO] [stdout] 3006 | | if let Some(_range) = p.input_consume_left(_range, '\0'..='\u{10ffff}') { [INFO] [stdout] 3007 | | c.code = _C::CharLit__0; [INFO] [stdout] ... | [INFO] [stdout] 3011 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 3004 ~ if p.input_consume_left(_range, "\\").is_none() [INFO] [stdout] 3005 ~ && p.input_consume_left(_range, "'").is_none() { [INFO] [stdout] 3006 | if let Some(_range) = p.input_consume_left(_range, '\0'..='\u{10ffff}') { [INFO] [stdout] ... [INFO] [stdout] 3009 | } [INFO] [stdout] 3010 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/generate/rust.rs:1049:14 [INFO] [stdout] | [INFO] [stdout] 1049 | fn clone(&mut self) -> Continuation { [INFO] [stdout] | ^^^^^^^^^ ^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 1049 | fn clone(&mut self) -> Continuation<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/generate/rust.rs:1477:21 [INFO] [stdout] | [INFO] [stdout] 1477 | / write!( [INFO] [stdout] 1478 | | s, [INFO] [stdout] 1479 | | "{} _{}: {} => {},", [INFO] [stdout] 1480 | | i, [INFO] [stdout] ... | [INFO] [stdout] 1483 | | rule.generate_traverse_shape(true, parse_nodes) [INFO] [stdout] 1484 | | ); [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 1477 | let _ = write!( [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/generate/rust.rs:1486:17 [INFO] [stdout] | [INFO] [stdout] 1486 | write!(s, " }}"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 1486 | let _ = write!(s, " }}"); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 9.92s [INFO] running `Command { std: "docker" "inspect" "70aa045d9155e31c29ea7be270719cf36a91b5d188a83c448ed2b31fffdb6069", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "70aa045d9155e31c29ea7be270719cf36a91b5d188a83c448ed2b31fffdb6069", kill_on_drop: false }` [INFO] [stdout] 70aa045d9155e31c29ea7be270719cf36a91b5d188a83c448ed2b31fffdb6069