[INFO] cloning repository https://github.com/Minigugus/skrull [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/Minigugus/skrull" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FMinigugus%2Fskrull", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FMinigugus%2Fskrull'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 685594995476e6a8ea4b4fddc5ee65146747b63e [INFO] linting Minigugus/skrull against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FMinigugus%2Fskrull" "/workspace/builds/worker-4-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-4-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/Minigugus/skrull [INFO] finished tweaking git repo https://github.com/Minigugus/skrull [INFO] tweaked toml for git repo https://github.com/Minigugus/skrull written to /workspace/builds/worker-4-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/Minigugus/skrull on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/Minigugus/skrull already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded clap_derive v4.5.5 [INFO] [stderr] Downloaded clap v4.5.5 [INFO] [stderr] Downloaded clap_builder v4.5.5 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-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] 4ee2243222c7805bc64537949f954ec73b27d93baf254c3e9a670d6582e10d2d [INFO] running `Command { std: "docker" "start" "-a" "4ee2243222c7805bc64537949f954ec73b27d93baf254c3e9a670d6582e10d2d", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "4ee2243222c7805bc64537949f954ec73b27d93baf254c3e9a670d6582e10d2d", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "4ee2243222c7805bc64537949f954ec73b27d93baf254c3e9a670d6582e10d2d", kill_on_drop: false }` [INFO] [stdout] 4ee2243222c7805bc64537949f954ec73b27d93baf254c3e9a670d6582e10d2d [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-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] 217d236ba27b694ae42c8867dfacab6a41d441772bcf241fcc5e6f2b5abdc387 [INFO] running `Command { std: "docker" "start" "-a" "217d236ba27b694ae42c8867dfacab6a41d441772bcf241fcc5e6f2b5abdc387", kill_on_drop: false }` [INFO] [stderr] Compiling syn v2.0.67 [INFO] [stderr] Checking clap_builder v4.5.5 [INFO] [stderr] Compiling clap_derive v4.5.5 [INFO] [stderr] Checking clap v4.5.5 [INFO] [stderr] Checking skrull v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `vec` [INFO] [stdout] --> src/printer/rust.rs:1:21 [INFO] [stdout] | [INFO] [stdout] 1 | use alloc::{format, vec}; [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `alloc::boxed::Box` [INFO] [stdout] --> src/printer/rust.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use alloc::boxed::Box; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `alloc::rc::Rc` [INFO] [stdout] --> src/printer/rust.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use alloc::rc::Rc; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `BlockExpression`, `Expression`, `Fields`, `FunctionDeclaration`, `FunctionPrototype`, `Mutability`, `Struct`, `VariableSymbolDeclaration`, `parse_enum`, `parse_function_declaration`, and `parse_struct` [INFO] [stdout] --> src/printer/rust.rs:8:21 [INFO] [stdout] | [INFO] [stdout] 8 | ...::{BlockExpression, Expression, Fields, FunctionDeclaration, FunctionPrototype, Mutability, parse_enum, parse_function_declaration, parse_struct, Struct, VariableSymbolDeclaration}; [INFO] [stdout] | ^^^^^^^^^^^^^^^ ^^^^^^^^^^ ^^^^^^ ^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ModuleBuilder` [INFO] [stdout] --> src/printer/rust.rs:9:69 [INFO] [stdout] | [INFO] [stdout] 9 | use crate::types::{EnumDef, EnumVariantFields, FunctionDef, Module, ModuleBuilder, PrimitiveType, Scope, StructDef, StructFields, Sym... [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `vec` [INFO] [stdout] --> src/printer/java.rs:3:21 [INFO] [stdout] | [INFO] [stdout] 3 | use alloc::{format, vec}; [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `alloc::boxed::Box` [INFO] [stdout] --> src/printer/java.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use alloc::boxed::Box; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Fields`, `Struct`, `parse_enum`, and `parse_struct` [INFO] [stdout] --> src/printer/java.rs:9:21 [INFO] [stdout] | [INFO] [stdout] 9 | use crate::parser::{Fields, parse_enum, parse_struct, Struct}; [INFO] [stdout] | ^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^ ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ModuleBuilder` [INFO] [stdout] --> src/printer/java.rs:10:69 [INFO] [stdout] | [INFO] [stdout] 10 | use crate::types::{EnumDef, EnumVariantFields, FunctionDef, Module, ModuleBuilder, PrimitiveType, Scope, StructDef, StructFields, Sy... [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::lexer::Token` [INFO] [stdout] --> src/transform/java.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 11 | use crate::lexer::Token; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `alloc::borrow::Cow` [INFO] [stdout] --> src/transform/java/match_op.rs:328:9 [INFO] [stdout] | [INFO] [stdout] 328 | use alloc::borrow::Cow; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `alloc::string::ToString` [INFO] [stdout] --> src/transform/java/match_op.rs:329:9 [INFO] [stdout] | [INFO] [stdout] 329 | use alloc::string::ToString; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::lexer::Token` [INFO] [stdout] --> src/transform/java/match_op.rs:331:9 [INFO] [stdout] | [INFO] [stdout] 331 | use crate::lexer::Token; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::types::Module` [INFO] [stdout] --> src/transform/java/match_op.rs:332:9 [INFO] [stdout] | [INFO] [stdout] 332 | use crate::types::Module; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `super::JavaModule` [INFO] [stdout] --> src/transform/java/match_op.rs:334:9 [INFO] [stdout] | [INFO] [stdout] 334 | use super::JavaModule; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::lexer::Token` [INFO] [stdout] --> src/transform/ts.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 11 | use crate::lexer::Token; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `alloc::borrow::Cow` [INFO] [stdout] --> src/transform/ts/match_op.rs:328:9 [INFO] [stdout] | [INFO] [stdout] 328 | use alloc::borrow::Cow; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `alloc::format` [INFO] [stdout] --> src/transform/ts/match_op.rs:329:9 [INFO] [stdout] | [INFO] [stdout] 329 | use alloc::format; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `alloc::string::ToString` [INFO] [stdout] --> src/transform/ts/match_op.rs:330:9 [INFO] [stdout] | [INFO] [stdout] 330 | use alloc::string::ToString; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::lexer::Token` [INFO] [stdout] --> src/transform/ts/match_op.rs:332:9 [INFO] [stdout] | [INFO] [stdout] 332 | use crate::lexer::Token; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::types::Module` [INFO] [stdout] --> src/transform/ts/match_op.rs:333:9 [INFO] [stdout] | [INFO] [stdout] 333 | use crate::types::Module; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `super::TsModule` [INFO] [stdout] --> src/transform/ts/match_op.rs:335:9 [INFO] [stdout] | [INFO] [stdout] 335 | use super::TsModule; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::parser::parse_function_declaration` [INFO] [stdout] --> src/eval.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use crate::parser::parse_function_declaration; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `ModuleBuilder` and `SymbolType` [INFO] [stdout] --> src/eval.rs:7:28 [INFO] [stdout] | [INFO] [stdout] 7 | use crate::types::{Module, ModuleBuilder, ResolverContext, StructFields, Symbol, SymbolRef, SymbolType}; [INFO] [stdout] | ^^^^^^^^^^^^^ ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Display` [INFO] [stdout] --> src/scope.rs:5:24 [INFO] [stdout] | [INFO] [stdout] 5 | use core::fmt::{Debug, Display, Formatter}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Hash` [INFO] [stdout] --> src/mlir/ops.rs:5:18 [INFO] [stdout] | [INFO] [stdout] 5 | use core::hash::{Hash, Hasher}; [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `alloc::format` [INFO] [stdout] --> src/mlir/ops.rs:348:9 [INFO] [stdout] | [INFO] [stdout] 348 | use alloc::format; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `alloc::vec::Vec` [INFO] [stdout] --> src/mlir/ops.rs:349:9 [INFO] [stdout] | [INFO] [stdout] 349 | use alloc::vec::Vec; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `BlockBuilder` and `Result` [INFO] [stdout] --> src/mlir/ops.rs:352:17 [INFO] [stdout] | [INFO] [stdout] 352 | use super::{BlockBuilder, Body, Printer, Result, RuntimeValue, Typed}; [INFO] [stdout] | ^^^^^^^^^^^^ ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider choosing a more descriptive name [INFO] [stdout] --> src/eval.rs:343:17 [INFO] [stdout] | [INFO] [stdout] 343 | let _1 = params.into_iter().next().expect("one parameter exactly"); [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#just_underscores_and_digits [INFO] [stdout] = note: `#[warn(clippy::just_underscores_and_digits)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider choosing a more descriptive name [INFO] [stdout] --> src/eval.rs:344:17 [INFO] [stdout] | [INFO] [stdout] 344 | let _2 = body.label(_1, "x")?; [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#just_underscores_and_digits [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider choosing a more descriptive name [INFO] [stdout] --> src/eval.rs:345:17 [INFO] [stdout] | [INFO] [stdout] 345 | let _3 = body.const_i64(2)?; [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#just_underscores_and_digits [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider choosing a more descriptive name [INFO] [stdout] --> src/eval.rs:346:17 [INFO] [stdout] | [INFO] [stdout] 346 | let _4 = body.neg(_2)?; [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#just_underscores_and_digits [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider choosing a more descriptive name [INFO] [stdout] --> src/eval.rs:347:17 [INFO] [stdout] | [INFO] [stdout] 347 | let _5 = body.add(_4, _3)?; [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#just_underscores_and_digits [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider choosing a more descriptive name [INFO] [stdout] --> src/eval.rs:348:17 [INFO] [stdout] | [INFO] [stdout] 348 | let _6 = body.label(_5.clone(), "y")?; [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#just_underscores_and_digits [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider choosing a more descriptive name [INFO] [stdout] --> src/eval.rs:349:17 [INFO] [stdout] | [INFO] [stdout] 349 | let _7 = body.const_i64(0)?; [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#just_underscores_and_digits [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider choosing a more descriptive name [INFO] [stdout] --> src/eval.rs:350:17 [INFO] [stdout] | [INFO] [stdout] 350 | let _8 = body.gt(_5, _7)?; [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#just_underscores_and_digits [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider choosing a more descriptive name [INFO] [stdout] --> src/eval.rs:355:21 [INFO] [stdout] | [INFO] [stdout] 355 | let _1_0 = bb.const_i64(0)?; [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#just_underscores_and_digits [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider choosing a more descriptive name [INFO] [stdout] --> src/eval.rs:358:17 [INFO] [stdout] | [INFO] [stdout] 358 | let _9 = body.if_expr(_8, _9_t, _9_f)?; [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#just_underscores_and_digits [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Display` [INFO] [stdout] --> src/scope.rs:5:24 [INFO] [stdout] | [INFO] [stdout] 5 | use core::fmt::{Debug, Display, Formatter}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Hash` [INFO] [stdout] --> src/mlir/ops.rs:5:18 [INFO] [stdout] | [INFO] [stdout] 5 | use core::hash::{Hash, Hasher}; [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider choosing a more descriptive name [INFO] [stdout] --> src/mlir/ops.rs:542:22 [INFO] [stdout] | [INFO] [stdout] 542 | let [_1] = *params.as_slice() else { return Err("expected 1 parameter")?; }; [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#just_underscores_and_digits [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider choosing a more descriptive name [INFO] [stdout] --> src/mlir/ops.rs:543:21 [INFO] [stdout] | [INFO] [stdout] 543 | let _2 = bb._const(ConstValue::Usize(1))?; [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#just_underscores_and_digits [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider choosing a more descriptive name [INFO] [stdout] --> src/mlir/ops.rs:544:21 [INFO] [stdout] | [INFO] [stdout] 544 | let _3 = bb.neg(_2)?; [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#just_underscores_and_digits [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider choosing a more descriptive name [INFO] [stdout] --> src/mlir/ops.rs:545:21 [INFO] [stdout] | [INFO] [stdout] 545 | let _4 = bb.add(_1, _3)?; [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#just_underscores_and_digits [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider choosing a more descriptive name [INFO] [stdout] --> src/mlir/ops.rs:548:29 [INFO] [stdout] | [INFO] [stdout] 548 | let _1_0 = bb._const(ConstValue::Bool(true))?; [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#just_underscores_and_digits [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider choosing a more descriptive name [INFO] [stdout] --> src/mlir/ops.rs:555:29 [INFO] [stdout] | [INFO] [stdout] 555 | let _1_0 = bb.op(Op::Const(ConstValue::Usize(0))); [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#just_underscores_and_digits [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider choosing a more descriptive name [INFO] [stdout] --> src/mlir/ops.rs:546:21 [INFO] [stdout] | [INFO] [stdout] 546 | let _5 = bb._if( [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#just_underscores_and_digits [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable call [INFO] [stdout] --> src/transform/ts.rs:970:17 [INFO] [stdout] | [INFO] [stdout] 970 | TsValueKind::TsType(match (l, r) { [INFO] [stdout] | _________________^^^^^^^^^^^^^^^^^^^_- [INFO] [stdout] | | | [INFO] [stdout] | | unreachable call [INFO] [stdout] 971 | | // (TsType::Number, TsType::Number) => TsType::Number, [INFO] [stdout] 972 | | [INFO] [stdout] 973 | | _ => return TsValueKind::Never [INFO] [stdout] 974 | | }) [INFO] [stdout] | |_________________- any code following this `match` expression is unreachable, as all arms diverge [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unreachable_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable expression [INFO] [stdout] --> src/eval.rs:335:5 [INFO] [stdout] | [INFO] [stdout] 332 | / match body.terminator_op() { [INFO] [stdout] 333 | | SkTerminatorOp::Yield(ref v) => return heap.get(v).ok_or("invalid ref in Yield terminator op".into()) [INFO] [stdout] 334 | | } [INFO] [stdout] | |_____- any code following this `match` expression is unreachable, as all arms diverge [INFO] [stdout] 335 | Err("missing Return op")? [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ unreachable expression [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Hasher` [INFO] [stdout] --> src/mlir/ops.rs:5:24 [INFO] [stdout] | [INFO] [stdout] 5 | use core::hash::{Hash, Hasher}; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable call [INFO] [stdout] --> src/transform/ts.rs:970:17 [INFO] [stdout] | [INFO] [stdout] 970 | TsValueKind::TsType(match (l, r) { [INFO] [stdout] | _________________^^^^^^^^^^^^^^^^^^^_- [INFO] [stdout] | | | [INFO] [stdout] | | unreachable call [INFO] [stdout] 971 | | // (TsType::Number, TsType::Number) => TsType::Number, [INFO] [stdout] 972 | | [INFO] [stdout] 973 | | _ => return TsValueKind::Never [INFO] [stdout] 974 | | }) [INFO] [stdout] | |_________________- any code following this `match` expression is unreachable, as all arms diverge [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unreachable_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable expression [INFO] [stdout] --> src/eval.rs:335:5 [INFO] [stdout] | [INFO] [stdout] 332 | / match body.terminator_op() { [INFO] [stdout] 333 | | SkTerminatorOp::Yield(ref v) => return heap.get(v).ok_or("invalid ref in Yield terminator op".into()) [INFO] [stdout] 334 | | } [INFO] [stdout] | |_____- any code following this `match` expression is unreachable, as all arms diverge [INFO] [stdout] 335 | Err("missing Return op")? [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ unreachable expression [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Hasher` [INFO] [stdout] --> src/mlir/ops.rs:5:24 [INFO] [stdout] | [INFO] [stdout] 5 | use core::hash::{Hash, Hasher}; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/bytecode.rs:171:36 [INFO] [stdout] | [INFO] [stdout] 171 | Symbol::Struct(s) => Err("Expected an enum, not a struct".into()), [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `bb` [INFO] [stdout] --> src/transform/java/match_op.rs:40:34 [INFO] [stdout] | [INFO] [stdout] 40 | b.body([], move |bb, args| { [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_bb` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `args` [INFO] [stdout] --> src/transform/java/match_op.rs:40:38 [INFO] [stdout] | [INFO] [stdout] 40 | b.body([], move |bb, args| { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_args` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `args` [INFO] [stdout] --> src/transform/java/match_op.rs:34:38 [INFO] [stdout] | [INFO] [stdout] 34 | b.body([], move |bb, args| { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_args` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `params` [INFO] [stdout] --> src/transform/java/match_op.rs:26:38 [INFO] [stdout] | [INFO] [stdout] 26 | let tb = b.body([], |bb, params| { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_params` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/transform/java.rs:1106:9 [INFO] [stdout] | [INFO] [stdout] 1106 | mut scope: &mut JavaScope, [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `bb` [INFO] [stdout] --> src/transform/ts/match_op.rs:40:34 [INFO] [stdout] | [INFO] [stdout] 40 | b.body([], move |bb, args| { [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_bb` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `args` [INFO] [stdout] --> src/transform/ts/match_op.rs:40:38 [INFO] [stdout] | [INFO] [stdout] 40 | b.body([], move |bb, args| { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_args` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `args` [INFO] [stdout] --> src/transform/ts/match_op.rs:34:38 [INFO] [stdout] | [INFO] [stdout] 34 | b.body([], move |bb, args| { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_args` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `params` [INFO] [stdout] --> src/transform/ts/match_op.rs:26:38 [INFO] [stdout] | [INFO] [stdout] 26 | let tb = b.body([], |bb, params| { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_params` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/transform/ts.rs:467:40 [INFO] [stdout] | [INFO] [stdout] 467 | TsOp::InvokeStatic((_, s, ..), _, n, a) => { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/bytecode.rs:171:36 [INFO] [stdout] | [INFO] [stdout] 171 | Symbol::Struct(s) => Err("Expected an enum, not a struct".into()), [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `bb` [INFO] [stdout] --> src/transform/java/match_op.rs:40:34 [INFO] [stdout] | [INFO] [stdout] 40 | b.body([], move |bb, args| { [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_bb` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `args` [INFO] [stdout] --> src/transform/java/match_op.rs:40:38 [INFO] [stdout] | [INFO] [stdout] 40 | b.body([], move |bb, args| { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_args` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `args` [INFO] [stdout] --> src/transform/java/match_op.rs:34:38 [INFO] [stdout] | [INFO] [stdout] 34 | b.body([], move |bb, args| { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_args` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `params` [INFO] [stdout] --> src/transform/java/match_op.rs:26:38 [INFO] [stdout] | [INFO] [stdout] 26 | let tb = b.body([], |bb, params| { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_params` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/transform/ts.rs:1105:9 [INFO] [stdout] | [INFO] [stdout] 1105 | mut scope: &mut TsScope, [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/eval.rs:188:21 [INFO] [stdout] | [INFO] [stdout] 188 | let mut fields = match s.fields() { [INFO] [stdout] | ----^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `exact` [INFO] [stdout] --> src/eval.rs:264:70 [INFO] [stdout] | [INFO] [stdout] 264 | SkMatchPatternOp::FieldStruct { typ, params, exact } => { [INFO] [stdout] | ^^^^^ help: try ignoring the field: `exact: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/scope.rs:109:13 [INFO] [stdout] | [INFO] [stdout] 109 | _ => Err("unknown depth or runtime value type")? [INFO] [stdout] | ^ no value can reach this [INFO] [stdout] | [INFO] [stdout] note: multiple earlier patterns match some of the same values [INFO] [stdout] --> src/scope.rs:109:13 [INFO] [stdout] | [INFO] [stdout] 102 | RuntimeValue::Local(bd, _, oi, _) => if let Some(s) = self.scopes.live.get_mut(*bd) { [INFO] [stdout] | --------------------------------- matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 108 | RuntimeValue::Parameter(..) => Err("cannot bind to a parameter")?, [INFO] [stdout] | --------------------------- matches some of the same values [INFO] [stdout] 109 | _ => Err("unknown depth or runtime value type")? [INFO] [stdout] | ^ collectively making this unreachable [INFO] [stdout] = note: `#[warn(unreachable_patterns)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `t` [INFO] [stdout] --> src/mlir/ops.rs:410:27 [INFO] [stdout] | [INFO] [stdout] 410 | Op::If(_, t, None) => ValueType::Unit, [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_t` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `transform::java::JavaField` is more private than the item `transform::java::JavaModule::resolve_record_field` [INFO] [stdout] --> src/transform/java.rs:813:5 [INFO] [stdout] | [INFO] [stdout] 813 | pub fn resolve_record_field(&self, sr: &JavaSymbolRef, name: &str) -> Option<&JavaField> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ method `transform::java::JavaModule::resolve_record_field` is reachable at visibility `pub` [INFO] [stdout] | [INFO] [stdout] note: but type `transform::java::JavaField` is only usable at visibility `pub(self)` [INFO] [stdout] --> src/transform/java.rs:164:1 [INFO] [stdout] | [INFO] [stdout] 164 | struct JavaField { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: `#[warn(private_interfaces)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `transform::ts::TsSymbol` is more private than the item `transform::ts::TsModule::resolve` [INFO] [stdout] --> src/transform/ts.rs:796:5 [INFO] [stdout] | [INFO] [stdout] 796 | pub fn resolve(&self, fqdn: &str) -> Option<&TsSymbol> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ method `transform::ts::TsModule::resolve` is reachable at visibility `pub` [INFO] [stdout] | [INFO] [stdout] note: but type `transform::ts::TsSymbol` is only usable at visibility `pub(self)` [INFO] [stdout] --> src/transform/ts.rs:535:1 [INFO] [stdout] | [INFO] [stdout] 535 | struct TsSymbol { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `transform::ts::TsField` is more private than the item `transform::ts::TsModule::resolve_record_field` [INFO] [stdout] --> src/transform/ts.rs:814:5 [INFO] [stdout] | [INFO] [stdout] 814 | pub fn resolve_record_field(&self, sr: &TsSymbolRef, name: &str) -> Option<&TsField> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ method `transform::ts::TsModule::resolve_record_field` is reachable at visibility `pub` [INFO] [stdout] | [INFO] [stdout] note: but type `transform::ts::TsField` is only usable at visibility `pub(self)` [INFO] [stdout] --> src/transform/ts.rs:165:1 [INFO] [stdout] | [INFO] [stdout] 165 | struct TsField { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `Protected` and `Private` are never constructed [INFO] [stdout] --> src/transform/java.rs:40:5 [INFO] [stdout] | [INFO] [stdout] 38 | enum JavaVisibility { [INFO] [stdout] | -------------- variants in this enum [INFO] [stdout] 39 | Public, [INFO] [stdout] 40 | Protected, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] 41 | PackagePrivate, [INFO] [stdout] 42 | Private, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `JavaVisibility` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `Byte` is never constructed [INFO] [stdout] --> src/transform/java.rs:69:5 [INFO] [stdout] | [INFO] [stdout] 66 | enum JavaType { [INFO] [stdout] | -------- variant in this enum [INFO] [stdout] ... [INFO] [stdout] 69 | Byte, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `JavaType` has derived impls for the traits `Debug` and `Clone`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `fqdn` is never read [INFO] [stdout] --> src/transform/java.rs:570:5 [INFO] [stdout] | [INFO] [stdout] 569 | struct JavaModuleBuilder<'a> { [INFO] [stdout] | ----------------- field in this struct [INFO] [stdout] 570 | fqdn: String, [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `Unreachable`, `GetParam`, and `And` are never constructed [INFO] [stdout] --> src/transform/java.rs:834:5 [INFO] [stdout] | [INFO] [stdout] 832 | enum JavaOpN { [INFO] [stdout] | ------- variants in this enum [INFO] [stdout] 833 | Error(Cow<'static, str>), [INFO] [stdout] 834 | Unreachable(Cow<'static, str>), [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 846 | GetParam(JavaValueKind, Rc), [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 854 | And(JavaValueRef, JavaValueRef), [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `JavaOpN` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type alias `JavaBlockBuilder` is never used [INFO] [stdout] --> src/transform/java.rs:1043:6 [INFO] [stdout] | [INFO] [stdout] 1043 | type JavaBlockBuilder<'a> = BlockBuilder<'a, SkValueKind, JavaOpN, JavaTerminatorOpN>; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `fqdn` is never read [INFO] [stdout] --> src/transform/ts.rs:570:5 [INFO] [stdout] | [INFO] [stdout] 569 | struct TsModuleBuilder<'a> { [INFO] [stdout] | --------------- field in this struct [INFO] [stdout] 570 | fqdn: String, [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `Unreachable`, `GetParam`, and `And` are never constructed [INFO] [stdout] --> src/transform/ts.rs:867:5 [INFO] [stdout] | [INFO] [stdout] 865 | enum TsOp { [INFO] [stdout] | ---- variants in this enum [INFO] [stdout] 866 | Error(Cow<'static, str>), [INFO] [stdout] 867 | Unreachable(Cow<'static, str>), [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 878 | GetParam(TsValueKind, Rc), [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 886 | And(TsValueRef, TsValueRef), [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `TsOp` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `default_value` is never used [INFO] [stdout] --> src/transform/ts.rs:915:12 [INFO] [stdout] | [INFO] [stdout] 907 | impl TsValueKind { [INFO] [stdout] | ---------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 915 | pub fn default_value(&self) -> &str { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type alias `TsBlockBuilder` is never used [INFO] [stdout] --> src/transform/ts.rs:1042:6 [INFO] [stdout] | [INFO] [stdout] 1042 | type TsBlockBuilder<'a> = BlockBuilder<'a, SkValueKind, TsOp, TsTerminatorOp>; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type alias `Result` is never used [INFO] [stdout] --> src/eval.rs:9:6 [INFO] [stdout] | [INFO] [stdout] 9 | type Result = core::result::Result>; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Composed` is never used [INFO] [stdout] --> src/eval.rs:12:6 [INFO] [stdout] | [INFO] [stdout] 12 | enum Composed { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Value` is never used [INFO] [stdout] --> src/eval.rs:17:6 [INFO] [stdout] | [INFO] [stdout] 17 | enum Value { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `to_i16`, `to_bool`, `is_assignable_to`, and `kind` are never used [INFO] [stdout] --> src/eval.rs:29:12 [INFO] [stdout] | [INFO] [stdout] 28 | impl Value { [INFO] [stdout] | ---------- methods in this implementation [INFO] [stdout] 29 | pub fn to_i16(&self) -> Result { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 36 | pub fn to_bool(&self) -> Result { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 43 | pub fn is_assignable_to(&self, kind: &SkValueKind) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 60 | pub fn kind(&self) -> SkValueKind { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Heap` is never constructed [INFO] [stdout] --> src/eval.rs:75:8 [INFO] [stdout] | [INFO] [stdout] 75 | struct Heap<'a> { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `root`, `nested`, `get`, and `push` are never used [INFO] [stdout] --> src/eval.rs:83:12 [INFO] [stdout] | [INFO] [stdout] 82 | impl<'a> Heap<'a> { [INFO] [stdout] | ----------------- associated items in this implementation [INFO] [stdout] 83 | pub fn root(params: &'a [Value]) -> Self { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 92 | pub fn nested<'b>(&'b self, params: &'a [Value]) -> Heap<'b> where 'b: 'a { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 101 | pub fn get(&self, r: &ValueRef) -> Option { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 109 | pub fn push(&mut self, v: Value) { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `eval` is never used [INFO] [stdout] --> src/eval.rs:114:4 [INFO] [stdout] | [INFO] [stdout] 114 | fn eval(ctx: &impl ResolverContext, body: &SkBody, params_or_heap: core::result::Result<&[Value], Heap>) -> Result { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_function_body` is never used [INFO] [stdout] --> src/eval.rs:524:4 [INFO] [stdout] | [INFO] [stdout] 524 | fn get_function_body<'a>(module: &'a Module, name: &str) -> Result<&'a SkBody> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `Self::number` doesn't need a mutable reference [INFO] [stdout] --> src/lexer.rs:74:63 [INFO] [stdout] | [INFO] [stdout] 74 | c if char::is_ascii_digit(&c) => Self::number(&mut left)?, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] = note: `#[warn(clippy::unnecessary_mut_passed)]` on by default [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 74 - c if char::is_ascii_digit(&c) => Self::number(&mut left)?, [INFO] [stdout] 74 + c if char::is_ascii_digit(&c) => Self::number(&left)?, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lexer.rs:74:63 [INFO] [stdout] | [INFO] [stdout] 74 | c if char::is_ascii_digit(&c) => Self::number(&mut left)?, [INFO] [stdout] | ^^^^^^^^^ help: change this to: `left` [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 function `Self::symbol` doesn't need a mutable reference [INFO] [stdout] --> src/lexer.rs:75:68 [INFO] [stdout] | [INFO] [stdout] 75 | c if char::is_ascii_alphabetic(&c) => Self::symbol(&mut left), [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 75 - c if char::is_ascii_alphabetic(&c) => Self::symbol(&mut left), [INFO] [stdout] 75 + c if char::is_ascii_alphabetic(&c) => Self::symbol(&left), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lexer.rs:75:68 [INFO] [stdout] | [INFO] [stdout] 75 | c if char::is_ascii_alphabetic(&c) => Self::symbol(&mut left), [INFO] [stdout] | ^^^^^^^^^ help: change this to: `left` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/lexer.rs:152:43 [INFO] [stdout] | [INFO] [stdout] 152 | Ok((index, Some(TokenKind::Number((&left[0..index]).parse().map_err(|_| "malformed number literal")?)))) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `left[0..index]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/parser.rs:16:35 [INFO] [stdout] | [INFO] [stdout] 16 | fn currently_at(self, tokens: &Vec) -> Result; [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `&[Token]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `tokens.get(0)` [INFO] [stdout] --> src/parser.rs:249:5 [INFO] [stdout] | [INFO] [stdout] 249 | tokens.get(0).map(|t| &t.kind) [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `tokens.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `tokens.get(0)` [INFO] [stdout] --> src/parser.rs:253:5 [INFO] [stdout] | [INFO] [stdout] 253 | tokens.get(0).map(|t| (&t.kind, t.offset.clone())) [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `tokens.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/parser.rs:283:8 [INFO] [stdout] | [INFO] [stdout] 283 | if !eat_token(tokens, open).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `eat_token(tokens, open).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: this boolean expression can be simplified [INFO] [stdout] --> src/parser.rs:290:11 [INFO] [stdout] | [INFO] [stdout] 290 | while !eat_token(tokens, close).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `eat_token(tokens, close).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] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/parser.rs:292:12 [INFO] [stdout] | [INFO] [stdout] 292 | if !eat_token(tokens, Comma).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `eat_token(tokens, Comma).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] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/parser.rs:347:11 [INFO] [stdout] | [INFO] [stdout] 347 | Ok(if !eat_token(tokens, ColonColon).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `eat_token(tokens, ColonColon).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] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/parser.rs:372:11 [INFO] [stdout] | [INFO] [stdout] 372 | while !eat_token(tokens, until.clone()).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `eat_token(tokens, until.clone()).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] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `TokenKind<'_>` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:372:30 [INFO] [stdout] | [INFO] [stdout] 372 | while !eat_token(tokens, until.clone()).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^ help: try removing the `clone` call: `until` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Identifier<'_>` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:512:32 [INFO] [stdout] | [INFO] [stdout] 512 | Expression::Identifier(name.clone()) [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Identifier<'_>` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:523:32 [INFO] [stdout] | [INFO] [stdout] 523 | MatchPattern::Variable(name.clone()) [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/parser.rs:571:5 [INFO] [stdout] | [INFO] [stdout] 571 | return Ok(MatchPattern::Union(patterns)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 571 - return Ok(MatchPattern::Union(patterns)); [INFO] [stdout] 571 + Ok(MatchPattern::Union(patterns)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/parser.rs:645:57 [INFO] [stdout] | [INFO] [stdout] 645 | let arguments = parse_group(tokens, |t| parse_field_init(t), BraceOpen, BraceClose) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `parse_field_init` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/transform/java.rs:1106:9 [INFO] [stdout] | [INFO] [stdout] 1106 | mut scope: &mut JavaScope, [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/parser.rs:700:11 [INFO] [stdout] | [INFO] [stdout] 700 | while !eat_token(tokens, BraceClose).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `eat_token(tokens, BraceClose).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] [INFO] [stdout] [INFO] [stdout] warning: non-canonical implementation of `partial_cmp` on an `Ord` type [INFO] [stdout] --> src/types.rs:84:1 [INFO] [stdout] | [INFO] [stdout] 84 | / impl PartialOrd for SymbolRef { [INFO] [stdout] 85 | | fn partial_cmp(&self, other: &Self) -> Option { [INFO] [stdout] 86 | | PartialOrd::partial_cmp(&self.0, &other.0) [INFO] [stdout] 87 | | } [INFO] [stdout] 88 | | } [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] 85 - fn partial_cmp(&self, other: &Self) -> Option { [INFO] [stdout] 86 - PartialOrd::partial_cmp(&self.0, &other.0) [INFO] [stdout] 87 - } [INFO] [stdout] 85 + fn partial_cmp(&self, other: &Self) -> Option { Some(self.cmp(other)) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `bb` [INFO] [stdout] --> src/transform/ts/match_op.rs:40:34 [INFO] [stdout] | [INFO] [stdout] 40 | b.body([], move |bb, args| { [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_bb` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `args` [INFO] [stdout] --> src/transform/ts/match_op.rs:40:38 [INFO] [stdout] | [INFO] [stdout] 40 | b.body([], move |bb, args| { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_args` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `args` [INFO] [stdout] --> src/transform/ts/match_op.rs:34:38 [INFO] [stdout] | [INFO] [stdout] 34 | b.body([], move |bb, args| { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_args` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `params` [INFO] [stdout] --> src/transform/ts/match_op.rs:26:38 [INFO] [stdout] | [INFO] [stdout] 26 | let tb = b.body([], |bb, params| { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_params` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enclosing `Ok` and `?` operator are unneeded [INFO] [stdout] --> src/types.rs:321:9 [INFO] [stdout] | [INFO] [stdout] 321 | / Ok(SkBody::isolated( [INFO] [stdout] 322 | | param_types.as_slice(), [INFO] [stdout] 323 | | |b, v| { [INFO] [stdout] 324 | | let params: BTreeMap = parameters [INFO] [stdout] ... | [INFO] [stdout] 656 | | }, [INFO] [stdout] 657 | | )?) [INFO] [stdout] | |___________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark [INFO] [stdout] = note: `#[warn(clippy::needless_question_mark)]` on by default [INFO] [stdout] help: remove the enclosing `Ok` and `?` operator [INFO] [stdout] | [INFO] [stdout] 321 ~ SkBody::isolated( [INFO] [stdout] 322 | param_types.as_slice(), [INFO] [stdout] ... [INFO] [stdout] 656 | }, [INFO] [stdout] 657 ~ ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/types.rs:439:75 [INFO] [stdout] | [INFO] [stdout] 439 | ... ctx.get_symbol_ref_from_qualifier(&*p)?, [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] = note: `#[warn(clippy::borrow_deref_ref)]` on by default [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 439 - ctx.get_symbol_ref_from_qualifier(&*p)?, [INFO] [stdout] 439 + ctx.get_symbol_ref_from_qualifier(p)?, [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 439 | ctx.get_symbol_ref_from_qualifier(&**p)?, [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i64` which implements the `Copy` trait [INFO] [stdout] --> src/types.rs:473:103 [INFO] [stdout] | [INFO] [stdout] 473 | ... MatchPattern::NumberLiteral(n) => SkMatchPatternOp::NumberLiteral(n.clone()), [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*n` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `bool` which implements the `Copy` trait [INFO] [stdout] --> src/types.rs:498:56 [INFO] [stdout] | [INFO] [stdout] 498 | ... exact: exact.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*exact` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `bool` which implements the `Copy` trait [INFO] [stdout] --> src/types.rs:531:60 [INFO] [stdout] | [INFO] [stdout] 531 | ... exact: exact.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*exact` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enclosing `Ok` and `?` operator are unneeded [INFO] [stdout] --> src/types.rs:596:21 [INFO] [stdout] | [INFO] [stdout] 596 | Ok(b.yield_expr(remainder)?) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark [INFO] [stdout] help: remove the enclosing `Ok` and `?` operator [INFO] [stdout] | [INFO] [stdout] 596 - Ok(b.yield_expr(remainder)?) [INFO] [stdout] 596 + b.yield_expr(remainder) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/transform/ts.rs:467:40 [INFO] [stdout] | [INFO] [stdout] 467 | TsOp::InvokeStatic((_, s, ..), _, n, a) => { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/printer/rust.rs:207:13 [INFO] [stdout] | [INFO] [stdout] 207 | write!(f, "\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] = note: `#[warn(clippy::write_with_newline)]` on by default [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 207 - write!(f, "\n")?; [INFO] [stdout] 207 + writeln!(f)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/printer/java.rs:78:21 [INFO] [stdout] | [INFO] [stdout] 78 | write!(f, " {name};\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 78 - write!(f, " {name};\n")?; [INFO] [stdout] 78 + writeln!(f, " {name};")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/printer/java.rs:86:21 [INFO] [stdout] | [INFO] [stdout] 86 | write!(f, " _{offset};\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 86 - write!(f, " _{offset};\n")?; [INFO] [stdout] 86 + writeln!(f, " _{offset};")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/printer/java.rs:123:9 [INFO] [stdout] | [INFO] [stdout] 123 | write!(f, ") {{\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 123 - write!(f, ") {{\n")?; [INFO] [stdout] 123 + writeln!(f, ") {{")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/printer/java.rs:131:21 [INFO] [stdout] | [INFO] [stdout] 131 | write!(f, " this.{name} = {name};\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 131 - write!(f, " this.{name} = {name};\n")?; [INFO] [stdout] 131 + writeln!(f, " this.{name} = {name};")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/printer/java.rs:137:21 [INFO] [stdout] | [INFO] [stdout] 137 | write!(f, " this._{offset} = _{offset};\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 137 - write!(f, " this._{offset} = _{offset};\n")?; [INFO] [stdout] 137 + writeln!(f, " this._{offset} = _{offset};")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/printer/java.rs:142:9 [INFO] [stdout] | [INFO] [stdout] 142 | write!(f, " }}\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 142 - write!(f, " }}\n")?; [INFO] [stdout] 142 + writeln!(f, " }}")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/printer/java.rs:276:25 [INFO] [stdout] | [INFO] [stdout] 276 | write!(f, " {name};\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 276 - write!(f, " {name};\n")?; [INFO] [stdout] 276 + writeln!(f, " {name};")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/printer/java.rs:285:25 [INFO] [stdout] | [INFO] [stdout] 285 | write!(f, " _{offset};\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 285 - write!(f, " _{offset};\n")?; [INFO] [stdout] 285 + writeln!(f, " _{offset};")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/printer/java.rs:322:13 [INFO] [stdout] | [INFO] [stdout] 322 | write!(f, ") {{\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 322 - write!(f, ") {{\n")?; [INFO] [stdout] 322 + writeln!(f, ") {{")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/printer/java.rs:327:25 [INFO] [stdout] | [INFO] [stdout] 327 | write!(f, " this.{name} = {name};\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 327 - write!(f, " this.{name} = {name};\n")?; [INFO] [stdout] 327 + writeln!(f, " this.{name} = {name};")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/printer/java.rs:333:25 [INFO] [stdout] | [INFO] [stdout] 333 | write!(f, " this._{offset} = _{offset};\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 333 - write!(f, " this._{offset} = _{offset};\n")?; [INFO] [stdout] 333 + writeln!(f, " this._{offset} = _{offset};")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/printer/java.rs:338:13 [INFO] [stdout] | [INFO] [stdout] 338 | write!(f, " }}\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 338 - write!(f, " }}\n")?; [INFO] [stdout] 338 + writeln!(f, " }}")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/printer/java.rs:669:9 [INFO] [stdout] | [INFO] [stdout] 669 | write!(f, "package {};\n", self.name())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 669 - write!(f, "package {};\n", self.name())?; [INFO] [stdout] 669 + writeln!(f, "package {};", self.name())?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/printer/java.rs:671:13 [INFO] [stdout] | [INFO] [stdout] 671 | write!(f, "\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 671 - write!(f, "\n")?; [INFO] [stdout] 671 + writeln!(f)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/printer/java.rs:673:13 [INFO] [stdout] | [INFO] [stdout] 673 | write!(f, "\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 673 - write!(f, "\n")?; [INFO] [stdout] 673 + writeln!(f)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `p.get(0)` [INFO] [stdout] --> src/bytecode.rs:55:34 [INFO] [stdout] | [INFO] [stdout] 55 | SkOp::Match(_, p) => p.get(0) [INFO] [stdout] | ^^^^^^^^ help: try: `p.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bytecode.rs:151:71 [INFO] [stdout] | [INFO] [stdout] 151 | SymbolRefOrEnum::Type(t) | SymbolRefOrEnum::Enum(t, _) => &t, [INFO] [stdout] | ^^ help: change this to: `t` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/transform/ts.rs:1105:9 [INFO] [stdout] | [INFO] [stdout] 1105 | mut scope: &mut TsScope, [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/transform/java/match_op.rs:111:51 [INFO] [stdout] | [INFO] [stdout] 111 | ... .resolve_enum_variant(&*s.1, &*v) [INFO] [stdout] | ^^^^^ help: try: `&s.1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/transform/java/match_op.rs:111:58 [INFO] [stdout] | [INFO] [stdout] 111 | ... .resolve_enum_variant(&*s.1, &*v) [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 111 - .resolve_enum_variant(&*s.1, &*v) [INFO] [stdout] 111 + .resolve_enum_variant(&*s.1, v) [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 111 | .resolve_enum_variant(&*s.1, &**v) [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/transform/java/match_op.rs:126:51 [INFO] [stdout] | [INFO] [stdout] 126 | ... .resolve_enum_variant(&*s.1, &*v) [INFO] [stdout] | ^^^^^ help: try: `&s.1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/transform/java/match_op.rs:126:58 [INFO] [stdout] | [INFO] [stdout] 126 | ... .resolve_enum_variant(&*s.1, &*v) [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 126 - .resolve_enum_variant(&*s.1, &*v) [INFO] [stdout] 126 + .resolve_enum_variant(&*s.1, v) [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 126 | .resolve_enum_variant(&*s.1, &**v) [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/transform/java/match_op.rs:179:51 [INFO] [stdout] | [INFO] [stdout] 179 | ... .resolve_enum_variant(&*s.1, &*v) [INFO] [stdout] | ^^^^^ help: try: `&s.1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/transform/java/match_op.rs:179:58 [INFO] [stdout] | [INFO] [stdout] 179 | ... .resolve_enum_variant(&*s.1, &*v) [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 179 - .resolve_enum_variant(&*s.1, &*v) [INFO] [stdout] 179 + .resolve_enum_variant(&*s.1, v) [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 179 | .resolve_enum_variant(&*s.1, &**v) [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/eval.rs:188:21 [INFO] [stdout] | [INFO] [stdout] 188 | let mut fields = match s.fields() { [INFO] [stdout] | ----^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/transform/java/match_op.rs:259:51 [INFO] [stdout] | [INFO] [stdout] 259 | ... .resolve_enum_variant(&*s.1, &*v) [INFO] [stdout] | ^^^^^ help: try: `&s.1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/transform/java/match_op.rs:259:58 [INFO] [stdout] | [INFO] [stdout] 259 | ... .resolve_enum_variant(&*s.1, &*v) [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 259 - .resolve_enum_variant(&*s.1, &*v) [INFO] [stdout] 259 + .resolve_enum_variant(&*s.1, v) [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 259 | .resolve_enum_variant(&*s.1, &**v) [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/transform/java/match_op.rs:293:51 [INFO] [stdout] | [INFO] [stdout] 293 | ... .resolve_enum_variant(&*s.1, &*v) [INFO] [stdout] | ^^^^^ help: try: `&s.1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/transform/java/match_op.rs:293:58 [INFO] [stdout] | [INFO] [stdout] 293 | ... .resolve_enum_variant(&*s.1, &*v) [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 293 - .resolve_enum_variant(&*s.1, &*v) [INFO] [stdout] 293 + .resolve_enum_variant(&*s.1, v) [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 293 | .resolve_enum_variant(&*s.1, &**v) [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `exact` [INFO] [stdout] --> src/eval.rs:264:70 [INFO] [stdout] | [INFO] [stdout] 264 | SkMatchPatternOp::FieldStruct { typ, params, exact } => { [INFO] [stdout] | ^^^^^ help: try ignoring the field: `exact: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/transform/java.rs:124:17 [INFO] [stdout] | [INFO] [stdout] 124 | write!(f, " *{line}\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 124 - write!(f, " *{line}\n")?; [INFO] [stdout] 124 + writeln!(f, " *{line}")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/transform/java.rs:148:59 [INFO] [stdout] | [INFO] [stdout] 148 | let line = if line.starts_with(' ') { &line[1..] } else { line }; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/transform/java.rs:148:32 [INFO] [stdout] | [INFO] [stdout] 148 | let line = if line.starts_with(' ') { &line[1..] } else { line }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] = note: `#[warn(clippy::manual_strip)]` on by default [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 148 - let line = if line.starts_with(' ') { &line[1..] } else { line }; [INFO] [stdout] 148 + let line = if let Some() = line.strip_prefix(' ') { } else { line }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/transform/java.rs:149:21 [INFO] [stdout] | [INFO] [stdout] 149 | write!(f, " * @param {} {line}\n", param.name)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 149 - write!(f, " * @param {} {line}\n", param.name)?; [INFO] [stdout] 149 + writeln!(f, " * @param {} {line}", param.name)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/transform/java.rs:209:13 [INFO] [stdout] | [INFO] [stdout] 209 | while let Some(field) = fields.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for field in fields` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] = note: `#[warn(clippy::while_let_on_iterator)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/scope.rs:109:13 [INFO] [stdout] | [INFO] [stdout] 109 | _ => Err("unknown depth or runtime value type")? [INFO] [stdout] | ^ no value can reach this [INFO] [stdout] | [INFO] [stdout] note: multiple earlier patterns match some of the same values [INFO] [stdout] --> src/scope.rs:109:13 [INFO] [stdout] | [INFO] [stdout] 102 | RuntimeValue::Local(bd, _, oi, _) => if let Some(s) = self.scopes.live.get_mut(*bd) { [INFO] [stdout] | --------------------------------- matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 108 | RuntimeValue::Parameter(..) => Err("cannot bind to a parameter")?, [INFO] [stdout] | --------------------------- matches some of the same values [INFO] [stdout] 109 | _ => Err("unknown depth or runtime value type")? [INFO] [stdout] | ^ collectively making this unreachable [INFO] [stdout] = note: `#[warn(unreachable_patterns)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/transform/java.rs:253:9 [INFO] [stdout] | [INFO] [stdout] 253 | write!(f, "{visibility}sealed interface {name} {{\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 253 - write!(f, "{visibility}sealed interface {name} {{\n")?; [INFO] [stdout] 253 + writeln!(f, "{visibility}sealed interface {name} {{")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/transform/java.rs:256:9 [INFO] [stdout] | [INFO] [stdout] 256 | while let Some(variant) = permitted.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for variant in permitted` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/transform/java.rs:324:9 [INFO] [stdout] | [INFO] [stdout] 324 | while let Some(JavaFunctionParameter { name, fqdn }) = params.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for JavaFunctionParameter { name, fqdn } in params` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/transform/java.rs:334:13 [INFO] [stdout] | [INFO] [stdout] 334 | write!(f, ") {{\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 334 - write!(f, ") {{\n")?; [INFO] [stdout] 334 + writeln!(f, ") {{")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/transform/java.rs:337:13 [INFO] [stdout] | [INFO] [stdout] 337 | write!(f, ");\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 337 - write!(f, ");\n")?; [INFO] [stdout] 337 + writeln!(f, ");")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `op` after checking its variant with `is_some` [INFO] [stdout] --> src/transform/java.rs:350:54 [INFO] [stdout] | [INFO] [stdout] 348 | if op.is_some() && op.unwrap().should_store_in_var() { [INFO] [stdout] | ------------ the check is happening here [INFO] [stdout] 349 | let id = Loc::from(v); [INFO] [stdout] 350 | let expr = print_rec(f, body, scope, op.unwrap())?; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `op` after checking its variant with `is_some` [INFO] [stdout] --> src/transform/java.rs:387:53 [INFO] [stdout] | [INFO] [stdout] 386 | } else if op.is_some() { [INFO] [stdout] | --------------- help: try: `if let Some() = op` [INFO] [stdout] 387 | let val = print_rec(f, body, scope, op.unwrap())?; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/transform/java.rs:352:17 [INFO] [stdout] | [INFO] [stdout] 352 | write!(f, "{indent}final {kind} {var_name} = {expr};\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 352 - write!(f, "{indent}final {kind} {var_name} = {expr};\n")?; [INFO] [stdout] 352 + writeln!(f, "{indent}final {kind} {var_name} = {expr};")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/transform/java.rs:359:17 [INFO] [stdout] | [INFO] [stdout] 359 | write!(f, "{indent}final {kind} {var_name};\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 359 - write!(f, "{indent}final {kind} {var_name};\n")?; [INFO] [stdout] 359 + writeln!(f, "{indent}final {kind} {var_name};")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/transform/java.rs:360:17 [INFO] [stdout] | [INFO] [stdout] 360 | write!(f, "{indent}if ({e}) {{\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 360 - write!(f, "{indent}if ({e}) {{\n")?; [INFO] [stdout] 360 + writeln!(f, "{indent}if ({e}) {{")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/transform/java.rs:362:17 [INFO] [stdout] | [INFO] [stdout] 362 | write!(f, "{indent}}} else {{\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 362 - write!(f, "{indent}}} else {{\n")?; [INFO] [stdout] 362 + writeln!(f, "{indent}}} else {{")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/transform/java.rs:364:17 [INFO] [stdout] | [INFO] [stdout] 364 | write!(f, "{indent}}}\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 364 - write!(f, "{indent}}}\n")?; [INFO] [stdout] 364 + writeln!(f, "{indent}}}")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/transform/java.rs:371:17 [INFO] [stdout] | [INFO] [stdout] 371 | write!(f, "{indent}{k} {var_name} = {def};\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 371 - write!(f, "{indent}{k} {var_name} = {def};\n")?; [INFO] [stdout] 371 + writeln!(f, "{indent}{k} {var_name} = {def};")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/transform/java.rs:377:17 [INFO] [stdout] | [INFO] [stdout] 377 | write!(f, "{indent}{var_name} = {val};\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 377 - write!(f, "{indent}{var_name} = {val};\n")?; [INFO] [stdout] 377 + writeln!(f, "{indent}{var_name} = {val};")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/transform/java.rs:382:17 [INFO] [stdout] | [INFO] [stdout] 382 | write!(f, "{indent}assert false : \"{msg}\"\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 382 - write!(f, "{indent}assert false : \"{msg}\"\n")?; [INFO] [stdout] 382 + writeln!(f, "{indent}assert false : \"{msg}\"")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/transform/java.rs:403:21 [INFO] [stdout] | [INFO] [stdout] 403 | write!(f, "{indent} throw new AssertionError(\"UNREACHABLE: {msg}\");\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 403 - write!(f, "{indent} throw new AssertionError(\"UNREACHABLE: {msg}\");\n")?; [INFO] [stdout] 403 + writeln!(f, "{indent} throw new AssertionError(\"UNREACHABLE: {msg}\");")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/transform/java.rs:407:21 [INFO] [stdout] | [INFO] [stdout] 407 | write!(f, "{indent} {var_name} = {ne};\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 407 - write!(f, "{indent} {var_name} = {ne};\n")?; [INFO] [stdout] 407 + writeln!(f, "{indent} {var_name} = {ne};")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/transform/java.rs:495:17 [INFO] [stdout] | [INFO] [stdout] 495 | write!(f, " throw new AssertionError(\"UNREACHABLE: {msg}\");\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 495 - write!(f, " throw new AssertionError(\"UNREACHABLE: {msg}\");\n")?; [INFO] [stdout] 495 + writeln!(f, " throw new AssertionError(\"UNREACHABLE: {msg}\");")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `t` [INFO] [stdout] --> src/mlir/ops.rs:410:27 [INFO] [stdout] | [INFO] [stdout] 410 | Op::If(_, t, None) => ValueType::Unit, [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_t` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/transform/java.rs:508:17 [INFO] [stdout] | [INFO] [stdout] 508 | write!(f, " return {expr};\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 508 - write!(f, " return {expr};\n")?; [INFO] [stdout] 508 + writeln!(f, " return {expr};")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/transform/java.rs:511:9 [INFO] [stdout] | [INFO] [stdout] 511 | write!(f, " }}\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 511 - write!(f, " }}\n")?; [INFO] [stdout] 511 + writeln!(f, " }}")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/transform/java.rs:617:29 [INFO] [stdout] | [INFO] [stdout] 617 | ... java_ref.0.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `java_ref.0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `bb` [INFO] [stdout] --> src/mlir/ops.rs:551:22 [INFO] [stdout] | [INFO] [stdout] 551 | |bb, _| { [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_bb` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> src/transform/java.rs:832:1 [INFO] [stdout] | [INFO] [stdout] 832 | / enum JavaOpN { [INFO] [stdout] 833 | | Error(Cow<'static, str>), [INFO] [stdout] 834 | | Unreachable(Cow<'static, str>), [INFO] [stdout] 835 | | Nop(JavaValueRef), [INFO] [stdout] 836 | | VarDef(JavaValueKind), [INFO] [stdout] 837 | | VarSet(JavaValueRef, JavaValueRef), [INFO] [stdout] | | ---------------------------------- the second-largest variant contains at least 144 bytes [INFO] [stdout] ... | [INFO] [stdout] 857 | | If(JavaValueRef, JavaBody, JavaBody), [INFO] [stdout] | | ------------------------------------ the largest variant contains at least 376 bytes [INFO] [stdout] 858 | | } [INFO] [stdout] | |_^ the entire enum is at least 376 bytes [INFO] [stdout] | [INFO] [stdout] help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum [INFO] [stdout] --> src/transform/java.rs:857:5 [INFO] [stdout] | [INFO] [stdout] 857 | If(JavaValueRef, JavaBody, JavaBody), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stdout] = note: `#[warn(clippy::large_enum_variant)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `transform::java::JavaField` is more private than the item `transform::java::JavaModule::resolve_record_field` [INFO] [stdout] --> src/transform/java.rs:813:5 [INFO] [stdout] | [INFO] [stdout] 813 | pub fn resolve_record_field(&self, sr: &JavaSymbolRef, name: &str) -> Option<&JavaField> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ method `transform::java::JavaModule::resolve_record_field` is reachable at visibility `pub` [INFO] [stdout] | [INFO] [stdout] note: but type `transform::java::JavaField` is only usable at visibility `pub(self)` [INFO] [stdout] --> src/transform/java.rs:164:1 [INFO] [stdout] | [INFO] [stdout] 164 | struct JavaField { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: `#[warn(private_interfaces)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `transform::ts::TsSymbol` is more private than the item `transform::ts::TsModule::resolve` [INFO] [stdout] --> src/transform/ts.rs:796:5 [INFO] [stdout] | [INFO] [stdout] 796 | pub fn resolve(&self, fqdn: &str) -> Option<&TsSymbol> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ method `transform::ts::TsModule::resolve` is reachable at visibility `pub` [INFO] [stdout] | [INFO] [stdout] note: but type `transform::ts::TsSymbol` is only usable at visibility `pub(self)` [INFO] [stdout] --> src/transform/ts.rs:535:1 [INFO] [stdout] | [INFO] [stdout] 535 | struct TsSymbol { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `transform::ts::TsField` is more private than the item `transform::ts::TsModule::resolve_record_field` [INFO] [stdout] --> src/transform/ts.rs:814:5 [INFO] [stdout] | [INFO] [stdout] 814 | pub fn resolve_record_field(&self, sr: &TsSymbolRef, name: &str) -> Option<&TsField> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ method `transform::ts::TsModule::resolve_record_field` is reachable at visibility `pub` [INFO] [stdout] | [INFO] [stdout] note: but type `transform::ts::TsField` is only usable at visibility `pub(self)` [INFO] [stdout] --> src/transform/ts.rs:165:1 [INFO] [stdout] | [INFO] [stdout] 165 | struct TsField { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `Protected` and `Private` are never constructed [INFO] [stdout] --> src/transform/java.rs:40:5 [INFO] [stdout] | [INFO] [stdout] 38 | enum JavaVisibility { [INFO] [stdout] | -------------- variants in this enum [INFO] [stdout] 39 | Public, [INFO] [stdout] 40 | Protected, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] 41 | PackagePrivate, [INFO] [stdout] 42 | Private, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `JavaVisibility` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/transform/java.rs:939:57 [INFO] [stdout] | [INFO] [stdout] 939 | } else if matches!(r, JavaValueKind::Never) { [INFO] [stdout] | _________________________________________________________^ [INFO] [stdout] 940 | | l [INFO] [stdout] 941 | | } else if l == *r.as_value_type() { [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/transform/java.rs:941:47 [INFO] [stdout] | [INFO] [stdout] 941 | } else if l == *r.as_value_type() { [INFO] [stdout] | _______________________________________________^ [INFO] [stdout] 942 | | l [INFO] [stdout] 943 | | } else { [INFO] [stdout] | |_____________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `Byte` is never constructed [INFO] [stdout] --> src/transform/java.rs:69:5 [INFO] [stdout] | [INFO] [stdout] 66 | enum JavaType { [INFO] [stdout] | -------- variant in this enum [INFO] [stdout] ... [INFO] [stdout] 69 | Byte, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `JavaType` has derived impls for the traits `Debug` and `Clone`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `fqdn` is never read [INFO] [stdout] --> src/transform/java.rs:570:5 [INFO] [stdout] | [INFO] [stdout] 569 | struct JavaModuleBuilder<'a> { [INFO] [stdout] | ----------------- field in this struct [INFO] [stdout] 570 | fqdn: String, [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `Unreachable`, `GetParam`, and `And` are never constructed [INFO] [stdout] --> src/transform/java.rs:834:5 [INFO] [stdout] | [INFO] [stdout] 832 | enum JavaOpN { [INFO] [stdout] | ------- variants in this enum [INFO] [stdout] 833 | Error(Cow<'static, str>), [INFO] [stdout] 834 | Unreachable(Cow<'static, str>), [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 846 | GetParam(JavaValueKind, Rc), [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 854 | And(JavaValueRef, JavaValueRef), [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `JavaOpN` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type alias `JavaBlockBuilder` is never used [INFO] [stdout] --> src/transform/java.rs:1043:6 [INFO] [stdout] | [INFO] [stdout] 1043 | type JavaBlockBuilder<'a> = BlockBuilder<'a, SkValueKind, JavaOpN, JavaTerminatorOpN>; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `fqdn` is never read [INFO] [stdout] --> src/transform/ts.rs:570:5 [INFO] [stdout] | [INFO] [stdout] 569 | struct TsModuleBuilder<'a> { [INFO] [stdout] | --------------- field in this struct [INFO] [stdout] 570 | fqdn: String, [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `Unreachable`, `GetParam`, and `And` are never constructed [INFO] [stdout] --> src/transform/ts.rs:867:5 [INFO] [stdout] | [INFO] [stdout] 865 | enum TsOp { [INFO] [stdout] | ---- variants in this enum [INFO] [stdout] 866 | Error(Cow<'static, str>), [INFO] [stdout] 867 | Unreachable(Cow<'static, str>), [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 878 | GetParam(TsValueKind, Rc), [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 886 | And(TsValueRef, TsValueRef), [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `TsOp` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `default_value` is never used [INFO] [stdout] --> src/transform/ts.rs:915:12 [INFO] [stdout] | [INFO] [stdout] 907 | impl TsValueKind { [INFO] [stdout] | ---------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 915 | pub fn default_value(&self) -> &str { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type alias `TsBlockBuilder` is never used [INFO] [stdout] --> src/transform/ts.rs:1042:6 [INFO] [stdout] | [INFO] [stdout] 1042 | type TsBlockBuilder<'a> = BlockBuilder<'a, SkValueKind, TsOp, TsTerminatorOp>; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `I16`, `F64`, and `Usize` are never constructed [INFO] [stdout] --> src/eval.rs:22:5 [INFO] [stdout] | [INFO] [stdout] 17 | enum Value { [INFO] [stdout] | ----- variants in this enum [INFO] [stdout] ... [INFO] [stdout] 22 | I16(i16), [INFO] [stdout] | ^^^ [INFO] [stdout] 23 | F64(f64), [INFO] [stdout] | ^^^ [INFO] [stdout] 24 | Usize(usize), [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Value` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enclosing `Ok` and `?` operator are unneeded [INFO] [stdout] --> src/transform/java.rs:1059:9 [INFO] [stdout] | [INFO] [stdout] 1059 | / Ok(Self::isolated(params.as_slice(), |b, args| { [INFO] [stdout] 1060 | | let mut scopes = JavaScopes::new(); [INFO] [stdout] 1061 | | let scope = scopes.root(args.as_slice()); [INFO] [stdout] 1062 | | Self::visit_body(pb, builder, module, b, scope) [INFO] [stdout] 1063 | | })?) [INFO] [stdout] | |____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark [INFO] [stdout] help: remove the enclosing `Ok` and `?` operator [INFO] [stdout] | [INFO] [stdout] 1059 ~ Self::isolated(params.as_slice(), |b, args| { [INFO] [stdout] 1060 | let mut scopes = JavaScopes::new(); [INFO] [stdout] 1061 | let scope = scopes.root(args.as_slice()); [INFO] [stdout] 1062 | Self::visit_body(pb, builder, module, b, scope) [INFO] [stdout] 1063 ~ }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i64` which implements the `Copy` trait [INFO] [stdout] --> src/transform/java.rs:1116:78 [INFO] [stdout] | [INFO] [stdout] 1116 | SkOp::ConstI64(n) if *n < i16::MAX as i64 => JavaOpN::ConstShort(n.clone() as i16), [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*n` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i64` which implements the `Copy` trait [INFO] [stdout] --> src/transform/java.rs:1118:53 [INFO] [stdout] | [INFO] [stdout] 1118 | SkOp::ConstI64(n) => JavaOpN::ConstLong(n.clone()), [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*n` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `Self::number` doesn't need a mutable reference [INFO] [stdout] --> src/lexer.rs:74:63 [INFO] [stdout] | [INFO] [stdout] 74 | c if char::is_ascii_digit(&c) => Self::number(&mut left)?, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] = note: `#[warn(clippy::unnecessary_mut_passed)]` on by default [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 74 - c if char::is_ascii_digit(&c) => Self::number(&mut left)?, [INFO] [stdout] 74 + c if char::is_ascii_digit(&c) => Self::number(&left)?, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lexer.rs:74:63 [INFO] [stdout] | [INFO] [stdout] 74 | c if char::is_ascii_digit(&c) => Self::number(&mut left)?, [INFO] [stdout] | ^^^^^^^^^ help: change this to: `left` [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 function `Self::symbol` doesn't need a mutable reference [INFO] [stdout] --> src/lexer.rs:75:68 [INFO] [stdout] | [INFO] [stdout] 75 | c if char::is_ascii_alphabetic(&c) => Self::symbol(&mut left), [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 75 - c if char::is_ascii_alphabetic(&c) => Self::symbol(&mut left), [INFO] [stdout] 75 + c if char::is_ascii_alphabetic(&c) => Self::symbol(&left), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lexer.rs:75:68 [INFO] [stdout] | [INFO] [stdout] 75 | c if char::is_ascii_alphabetic(&c) => Self::symbol(&mut left), [INFO] [stdout] | ^^^^^^^^^ help: change this to: `left` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/transform/java.rs:1215:45 [INFO] [stdout] | [INFO] [stdout] 1215 | ... .unwrap_or_else(|err| JavaOpN::Error(err)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `JavaOpN::Error` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/lexer.rs:152:43 [INFO] [stdout] | [INFO] [stdout] 152 | Ok((index, Some(TokenKind::Number((&left[0..index]).parse().map_err(|_| "malformed number literal")?)))) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `left[0..index]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/transform/java.rs:1206:56 [INFO] [stdout] | [INFO] [stdout] 1206 | ... RefId::Param(_) => return Err(format!("SkOp::Create arg {} cannot be an RefId::Param", i + 1))?, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1206 - RefId::Param(_) => return Err(format!("SkOp::Create arg {} cannot be an RefId::Param", i + 1))?, [INFO] [stdout] 1206 + RefId::Param(_) => Err(format!("SkOp::Create arg {} cannot be an RefId::Param", i + 1))?, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/transform/java.rs:1208:49 [INFO] [stdout] | [INFO] [stdout] 1208 | ... None => return Err(format!("no mapping found for SkOp::Create arg {}", i + 1))?, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1208 - None => return Err(format!("no mapping found for SkOp::Create arg {}", i + 1))?, [INFO] [stdout] 1208 + None => Err(format!("no mapping found for SkOp::Create arg {}", i + 1))?, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/transform/ts/match_op.rs:111:51 [INFO] [stdout] | [INFO] [stdout] 111 | ... .resolve_enum_variant(&*s.1, &*v) [INFO] [stdout] | ^^^^^ help: try: `&s.1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/transform/ts/match_op.rs:111:58 [INFO] [stdout] | [INFO] [stdout] 111 | ... .resolve_enum_variant(&*s.1, &*v) [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 111 - .resolve_enum_variant(&*s.1, &*v) [INFO] [stdout] 111 + .resolve_enum_variant(&*s.1, v) [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 111 | .resolve_enum_variant(&*s.1, &**v) [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/transform/ts/match_op.rs:126:51 [INFO] [stdout] | [INFO] [stdout] 126 | ... .resolve_enum_variant(&*s.1, &*v) [INFO] [stdout] | ^^^^^ help: try: `&s.1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/transform/ts/match_op.rs:126:58 [INFO] [stdout] | [INFO] [stdout] 126 | ... .resolve_enum_variant(&*s.1, &*v) [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 126 - .resolve_enum_variant(&*s.1, &*v) [INFO] [stdout] 126 + .resolve_enum_variant(&*s.1, v) [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 126 | .resolve_enum_variant(&*s.1, &**v) [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/parser.rs:16:35 [INFO] [stdout] | [INFO] [stdout] 16 | fn currently_at(self, tokens: &Vec) -> Result; [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `&[Token]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/transform/ts/match_op.rs:179:51 [INFO] [stdout] | [INFO] [stdout] 179 | ... .resolve_enum_variant(&*s.1, &*v) [INFO] [stdout] | ^^^^^ help: try: `&s.1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/transform/ts/match_op.rs:179:58 [INFO] [stdout] | [INFO] [stdout] 179 | ... .resolve_enum_variant(&*s.1, &*v) [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 179 - .resolve_enum_variant(&*s.1, &*v) [INFO] [stdout] 179 + .resolve_enum_variant(&*s.1, v) [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 179 | .resolve_enum_variant(&*s.1, &**v) [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/transform/ts/match_op.rs:259:51 [INFO] [stdout] | [INFO] [stdout] 259 | ... .resolve_enum_variant(&*s.1, &*v) [INFO] [stdout] | ^^^^^ help: try: `&s.1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/transform/ts/match_op.rs:259:58 [INFO] [stdout] | [INFO] [stdout] 259 | ... .resolve_enum_variant(&*s.1, &*v) [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 259 - .resolve_enum_variant(&*s.1, &*v) [INFO] [stdout] 259 + .resolve_enum_variant(&*s.1, v) [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 259 | .resolve_enum_variant(&*s.1, &**v) [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/transform/ts/match_op.rs:293:51 [INFO] [stdout] | [INFO] [stdout] 293 | ... .resolve_enum_variant(&*s.1, &*v) [INFO] [stdout] | ^^^^^ help: try: `&s.1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/transform/ts/match_op.rs:293:58 [INFO] [stdout] | [INFO] [stdout] 293 | ... .resolve_enum_variant(&*s.1, &*v) [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 293 - .resolve_enum_variant(&*s.1, &*v) [INFO] [stdout] 293 + .resolve_enum_variant(&*s.1, v) [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 293 | .resolve_enum_variant(&*s.1, &**v) [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/transform/ts.rs:125:17 [INFO] [stdout] | [INFO] [stdout] 125 | write!(f, " *{line}\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 125 - write!(f, " *{line}\n")?; [INFO] [stdout] 125 + writeln!(f, " *{line}")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/transform/ts.rs:149:59 [INFO] [stdout] | [INFO] [stdout] 149 | let line = if line.starts_with(' ') { &line[1..] } else { line }; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/transform/ts.rs:149:32 [INFO] [stdout] | [INFO] [stdout] 149 | let line = if line.starts_with(' ') { &line[1..] } else { line }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 149 - let line = if line.starts_with(' ') { &line[1..] } else { line }; [INFO] [stdout] 149 + let line = if let Some() = line.strip_prefix(' ') { } else { line }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/transform/ts.rs:150:21 [INFO] [stdout] | [INFO] [stdout] 150 | write!(f, " * @param {} {line}\n", param.name)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 150 - write!(f, " * @param {} {line}\n", param.name)?; [INFO] [stdout] 150 + writeln!(f, " * @param {} {line}", param.name)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `tokens.get(0)` [INFO] [stdout] --> src/parser.rs:249:5 [INFO] [stdout] | [INFO] [stdout] 249 | tokens.get(0).map(|t| &t.kind) [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `tokens.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `tokens.get(0)` [INFO] [stdout] --> src/parser.rs:253:5 [INFO] [stdout] | [INFO] [stdout] 253 | tokens.get(0).map(|t| (&t.kind, t.offset.clone())) [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `tokens.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/parser.rs:283:8 [INFO] [stdout] | [INFO] [stdout] 283 | if !eat_token(tokens, open).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `eat_token(tokens, open).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: this boolean expression can be simplified [INFO] [stdout] --> src/parser.rs:290:11 [INFO] [stdout] | [INFO] [stdout] 290 | while !eat_token(tokens, close).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `eat_token(tokens, close).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] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/parser.rs:292:12 [INFO] [stdout] | [INFO] [stdout] 292 | if !eat_token(tokens, Comma).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `eat_token(tokens, Comma).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] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/transform/ts.rs:210:9 [INFO] [stdout] | [INFO] [stdout] 210 | write!(f, "{name} {{\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 210 - write!(f, "{name} {{\n")?; [INFO] [stdout] 210 + writeln!(f, "{name} {{")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/transform/ts.rs:216:13 [INFO] [stdout] | [INFO] [stdout] 216 | while let Some(field) = fields.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for field in fields` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/parser.rs:347:11 [INFO] [stdout] | [INFO] [stdout] 347 | Ok(if !eat_token(tokens, ColonColon).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `eat_token(tokens, ColonColon).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] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/parser.rs:372:11 [INFO] [stdout] | [INFO] [stdout] 372 | while !eat_token(tokens, until.clone()).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `eat_token(tokens, until.clone()).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] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/transform/ts.rs:252:9 [INFO] [stdout] | [INFO] [stdout] 252 | while let Some(variant) = variants.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for variant in variants` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/transform/ts.rs:258:9 [INFO] [stdout] | [INFO] [stdout] 258 | while let Some(variant) = variants.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for variant in variants` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `TokenKind<'_>` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:372:30 [INFO] [stdout] | [INFO] [stdout] 372 | while !eat_token(tokens, until.clone()).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^ help: try removing the `clone` call: `until` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/transform/ts.rs:326:9 [INFO] [stdout] | [INFO] [stdout] 326 | while let Some(TsFunctionParameter { name, fqdn }) = params.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for TsFunctionParameter { name, fqdn } in params` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/transform/ts.rs:336:13 [INFO] [stdout] | [INFO] [stdout] 336 | write!(f, "): {ret_type} {{\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 336 - write!(f, "): {ret_type} {{\n")?; [INFO] [stdout] 336 + writeln!(f, "): {ret_type} {{")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/transform/ts.rs:339:13 [INFO] [stdout] | [INFO] [stdout] 339 | write!(f, "): {ret_type};\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 339 - write!(f, "): {ret_type};\n")?; [INFO] [stdout] 339 + writeln!(f, "): {ret_type};")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `op` after checking its variant with `is_some` [INFO] [stdout] --> src/transform/ts.rs:352:54 [INFO] [stdout] | [INFO] [stdout] 350 | if op.is_some() && op.unwrap().should_store_in_var() { [INFO] [stdout] | ------------ the check is happening here [INFO] [stdout] 351 | let id = Loc::from(v); [INFO] [stdout] 352 | let expr = print_rec(f, body, scope, op.unwrap())?; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `op` after checking its variant with `is_some` [INFO] [stdout] --> src/transform/ts.rs:388:53 [INFO] [stdout] | [INFO] [stdout] 387 | } else if op.is_some() { [INFO] [stdout] | --------------- help: try: `if let Some() = op` [INFO] [stdout] 388 | let val = print_rec(f, body, scope, op.unwrap())?; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/transform/ts.rs:354:17 [INFO] [stdout] | [INFO] [stdout] 354 | write!(f, "{indent}const {var_name}: {kind} = {expr};\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 354 - write!(f, "{indent}const {var_name}: {kind} = {expr};\n")?; [INFO] [stdout] 354 + writeln!(f, "{indent}const {var_name}: {kind} = {expr};")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/transform/ts.rs:361:17 [INFO] [stdout] | [INFO] [stdout] 361 | write!(f, "{indent}let {var_name}: {kind};\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 361 - write!(f, "{indent}let {var_name}: {kind};\n")?; [INFO] [stdout] 361 + writeln!(f, "{indent}let {var_name}: {kind};")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/transform/ts.rs:362:17 [INFO] [stdout] | [INFO] [stdout] 362 | write!(f, "{indent}if ({e}) {{\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 362 - write!(f, "{indent}if ({e}) {{\n")?; [INFO] [stdout] 362 + writeln!(f, "{indent}if ({e}) {{")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/transform/ts.rs:364:17 [INFO] [stdout] | [INFO] [stdout] 364 | write!(f, "{indent}}} else {{\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 364 - write!(f, "{indent}}} else {{\n")?; [INFO] [stdout] 364 + writeln!(f, "{indent}}} else {{")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Identifier<'_>` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:512:32 [INFO] [stdout] | [INFO] [stdout] 512 | Expression::Identifier(name.clone()) [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/transform/ts.rs:366:17 [INFO] [stdout] | [INFO] [stdout] 366 | write!(f, "{indent}}}\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 366 - write!(f, "{indent}}}\n")?; [INFO] [stdout] 366 + writeln!(f, "{indent}}}")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Identifier<'_>` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:523:32 [INFO] [stdout] | [INFO] [stdout] 523 | MatchPattern::Variable(name.clone()) [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/transform/ts.rs:372:17 [INFO] [stdout] | [INFO] [stdout] 372 | write!(f, "{indent}let {var_name}: {kind} = null!;\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 372 - write!(f, "{indent}let {var_name}: {kind} = null!;\n")?; [INFO] [stdout] 372 + writeln!(f, "{indent}let {var_name}: {kind} = null!;")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/parser.rs:571:5 [INFO] [stdout] | [INFO] [stdout] 571 | return Ok(MatchPattern::Union(patterns)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 571 - return Ok(MatchPattern::Union(patterns)); [INFO] [stdout] 571 + Ok(MatchPattern::Union(patterns)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/transform/ts.rs:378:17 [INFO] [stdout] | [INFO] [stdout] 378 | write!(f, "{indent}{var_name} = {val};\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 378 - write!(f, "{indent}{var_name} = {val};\n")?; [INFO] [stdout] 378 + writeln!(f, "{indent}{var_name} = {val};")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/transform/ts.rs:383:17 [INFO] [stdout] | [INFO] [stdout] 383 | write!(f, "{indent}throw new Error(\"{msg}\");\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 383 - write!(f, "{indent}throw new Error(\"{msg}\");\n")?; [INFO] [stdout] 383 + writeln!(f, "{indent}throw new Error(\"{msg}\");")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/transform/ts.rs:404:21 [INFO] [stdout] | [INFO] [stdout] 404 | write!(f, "{indent} throw new Error(\"UNREACHABLE: {msg}\");\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 404 - write!(f, "{indent} throw new Error(\"UNREACHABLE: {msg}\");\n")?; [INFO] [stdout] 404 + writeln!(f, "{indent} throw new Error(\"UNREACHABLE: {msg}\");")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/transform/ts.rs:408:21 [INFO] [stdout] | [INFO] [stdout] 408 | write!(f, "{indent} {var_name} = {ne};\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 408 - write!(f, "{indent} {var_name} = {ne};\n")?; [INFO] [stdout] 408 + writeln!(f, "{indent} {var_name} = {ne};")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/parser.rs:645:57 [INFO] [stdout] | [INFO] [stdout] 645 | let arguments = parse_group(tokens, |t| parse_field_init(t), BraceOpen, BraceClose) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `parse_field_init` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/parser.rs:700:11 [INFO] [stdout] | [INFO] [stdout] 700 | while !eat_token(tokens, BraceClose).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `eat_token(tokens, BraceClose).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] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/transform/ts.rs:495:17 [INFO] [stdout] | [INFO] [stdout] 495 | write!(f, " throw new Error(\"UNREACHABLE: {msg}\");\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 495 - write!(f, " throw new Error(\"UNREACHABLE: {msg}\");\n")?; [INFO] [stdout] 495 + writeln!(f, " throw new Error(\"UNREACHABLE: {msg}\");")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/transform/ts.rs:508:17 [INFO] [stdout] | [INFO] [stdout] 508 | write!(f, " return {expr};\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 508 - write!(f, " return {expr};\n")?; [INFO] [stdout] 508 + writeln!(f, " return {expr};")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/transform/ts.rs:616:29 [INFO] [stdout] | [INFO] [stdout] 616 | ... ts_ref.0.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `ts_ref.0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-canonical implementation of `partial_cmp` on an `Ord` type [INFO] [stdout] --> src/types.rs:84:1 [INFO] [stdout] | [INFO] [stdout] 84 | / impl PartialOrd for SymbolRef { [INFO] [stdout] 85 | | fn partial_cmp(&self, other: &Self) -> Option { [INFO] [stdout] 86 | | PartialOrd::partial_cmp(&self.0, &other.0) [INFO] [stdout] 87 | | } [INFO] [stdout] 88 | | } [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] 85 - fn partial_cmp(&self, other: &Self) -> Option { [INFO] [stdout] 86 - PartialOrd::partial_cmp(&self.0, &other.0) [INFO] [stdout] 87 - } [INFO] [stdout] 85 + fn partial_cmp(&self, other: &Self) -> Option { Some(self.cmp(other)) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/transform/ts.rs:724:21 [INFO] [stdout] | [INFO] [stdout] 724 | Rc::new(format!("Utils")), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Utils".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> src/transform/ts.rs:865:1 [INFO] [stdout] | [INFO] [stdout] 865 | / enum TsOp { [INFO] [stdout] 866 | | Error(Cow<'static, str>), [INFO] [stdout] 867 | | Unreachable(Cow<'static, str>), [INFO] [stdout] 868 | | Nop(TsValueRef), [INFO] [stdout] 869 | | VarDef(TsValueKind), [INFO] [stdout] 870 | | VarSet(TsValueRef, TsValueRef), [INFO] [stdout] | | ------------------------------ the second-largest variant contains at least 144 bytes [INFO] [stdout] ... | [INFO] [stdout] 889 | | If(TsValueRef, TsBody, TsBody), [INFO] [stdout] | | ------------------------------ the largest variant contains at least 376 bytes [INFO] [stdout] 890 | | } [INFO] [stdout] | |_^ the entire enum is at least 376 bytes [INFO] [stdout] | [INFO] [stdout] help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum [INFO] [stdout] --> src/transform/ts.rs:889:5 [INFO] [stdout] | [INFO] [stdout] 889 | If(TsValueRef, TsBody, TsBody), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enclosing `Ok` and `?` operator are unneeded [INFO] [stdout] --> src/types.rs:321:9 [INFO] [stdout] | [INFO] [stdout] 321 | / Ok(SkBody::isolated( [INFO] [stdout] 322 | | param_types.as_slice(), [INFO] [stdout] 323 | | |b, v| { [INFO] [stdout] 324 | | let params: BTreeMap = parameters [INFO] [stdout] ... | [INFO] [stdout] 656 | | }, [INFO] [stdout] 657 | | )?) [INFO] [stdout] | |___________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark [INFO] [stdout] = note: `#[warn(clippy::needless_question_mark)]` on by default [INFO] [stdout] help: remove the enclosing `Ok` and `?` operator [INFO] [stdout] | [INFO] [stdout] 321 ~ SkBody::isolated( [INFO] [stdout] 322 | param_types.as_slice(), [INFO] [stdout] ... [INFO] [stdout] 656 | }, [INFO] [stdout] 657 ~ ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/transform/ts.rs:961:55 [INFO] [stdout] | [INFO] [stdout] 961 | } else if matches!(r, TsValueKind::Never) { [INFO] [stdout] | _______________________________________________________^ [INFO] [stdout] 962 | | l [INFO] [stdout] 963 | | } else if l == *r.as_value_type() { [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/transform/ts.rs:963:47 [INFO] [stdout] | [INFO] [stdout] 963 | } else if l == *r.as_value_type() { [INFO] [stdout] | _______________________________________________^ [INFO] [stdout] 964 | | l [INFO] [stdout] 965 | | } else { [INFO] [stdout] | |_____________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this match could be replaced by its body itself [INFO] [stdout] --> src/transform/ts.rs:970:37 [INFO] [stdout] | [INFO] [stdout] 970 | TsValueKind::TsType(match (l, r) { [INFO] [stdout] | _____________________________________^ [INFO] [stdout] 971 | | // (TsType::Number, TsType::Number) => TsType::Number, [INFO] [stdout] 972 | | [INFO] [stdout] 973 | | _ => return TsValueKind::Never [INFO] [stdout] 974 | | }) [INFO] [stdout] | |_________________^ help: consider using the match body instead: `return TsValueKind::Never` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_single_binding [INFO] [stdout] = note: `#[warn(clippy::match_single_binding)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enclosing `Ok` and `?` operator are unneeded [INFO] [stdout] --> src/transform/ts.rs:1058:9 [INFO] [stdout] | [INFO] [stdout] 1058 | / Ok(Self::isolated(params.as_slice(), |b, args| { [INFO] [stdout] 1059 | | let mut scopes = TsScopes::new(); [INFO] [stdout] 1060 | | let scope = scopes.root(args.as_slice()); [INFO] [stdout] 1061 | | Self::visit_body(pb, builder, module, b, scope) [INFO] [stdout] 1062 | | })?) [INFO] [stdout] | |____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark [INFO] [stdout] help: remove the enclosing `Ok` and `?` operator [INFO] [stdout] | [INFO] [stdout] 1058 ~ Self::isolated(params.as_slice(), |b, args| { [INFO] [stdout] 1059 | let mut scopes = TsScopes::new(); [INFO] [stdout] 1060 | let scope = scopes.root(args.as_slice()); [INFO] [stdout] 1061 | Self::visit_body(pb, builder, module, b, scope) [INFO] [stdout] 1062 ~ }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i64` which implements the `Copy` trait [INFO] [stdout] --> src/transform/ts.rs:1116:52 [INFO] [stdout] | [INFO] [stdout] 1116 | SkOp::ConstI64(n) => TsOp::ConstNumber(n.clone().into()), [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `(*n)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/transform/ts.rs:1213:45 [INFO] [stdout] | [INFO] [stdout] 1213 | ... .unwrap_or_else(|err| TsOp::Error(err)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `TsOp::Error` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/transform/ts.rs:1204:56 [INFO] [stdout] | [INFO] [stdout] 1204 | ... RefId::Param(_) => return Err(format!("SkOp::Create arg {} cannot be an RefId::Param", i + 1))?, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1204 - RefId::Param(_) => return Err(format!("SkOp::Create arg {} cannot be an RefId::Param", i + 1))?, [INFO] [stdout] 1204 + RefId::Param(_) => Err(format!("SkOp::Create arg {} cannot be an RefId::Param", i + 1))?, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/types.rs:439:75 [INFO] [stdout] | [INFO] [stdout] 439 | ... ctx.get_symbol_ref_from_qualifier(&*p)?, [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] = note: `#[warn(clippy::borrow_deref_ref)]` on by default [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 439 - ctx.get_symbol_ref_from_qualifier(&*p)?, [INFO] [stdout] 439 + ctx.get_symbol_ref_from_qualifier(p)?, [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 439 | ctx.get_symbol_ref_from_qualifier(&**p)?, [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/transform/ts.rs:1206:49 [INFO] [stdout] | [INFO] [stdout] 1206 | ... None => return Err(format!("no mapping found for SkOp::Create arg {}", i + 1))?, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1206 - None => return Err(format!("no mapping found for SkOp::Create arg {}", i + 1))?, [INFO] [stdout] 1206 + None => Err(format!("no mapping found for SkOp::Create arg {}", i + 1))?, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i64` which implements the `Copy` trait [INFO] [stdout] --> src/types.rs:473:103 [INFO] [stdout] | [INFO] [stdout] 473 | ... MatchPattern::NumberLiteral(n) => SkMatchPatternOp::NumberLiteral(n.clone()), [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*n` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `bool` which implements the `Copy` trait [INFO] [stdout] --> src/types.rs:498:56 [INFO] [stdout] | [INFO] [stdout] 498 | ... exact: exact.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*exact` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i64` which implements the `Copy` trait [INFO] [stdout] --> src/eval.rs:31:33 [INFO] [stdout] | [INFO] [stdout] 31 | Value::I64(v) => Ok(v.clone()), [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*v` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `bool` which implements the `Copy` trait [INFO] [stdout] --> src/eval.rs:38:34 [INFO] [stdout] | [INFO] [stdout] 38 | Value::Bool(v) => Ok(v.clone()), [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*v` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `bool` which implements the `Copy` trait [INFO] [stdout] --> src/types.rs:531:60 [INFO] [stdout] | [INFO] [stdout] 531 | ... exact: exact.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*exact` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enclosing `Ok` and `?` operator are unneeded [INFO] [stdout] --> src/types.rs:596:21 [INFO] [stdout] | [INFO] [stdout] 596 | Ok(b.yield_expr(remainder)?) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark [INFO] [stdout] help: remove the enclosing `Ok` and `?` operator [INFO] [stdout] | [INFO] [stdout] 596 - Ok(b.yield_expr(remainder)?) [INFO] [stdout] 596 + b.yield_expr(remainder) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/eval.rs:167:40 [INFO] [stdout] | [INFO] [stdout] 167 | let f = ctx.get_symbol(&f).or(Err("function symbol not found"))?; [INFO] [stdout] | ^^ help: change this to: `f` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/eval.rs:184:40 [INFO] [stdout] | [INFO] [stdout] 184 | let s = ctx.get_symbol(&sr).or(Err("struct symbol not found"))?; [INFO] [stdout] | ^^^ help: change this to: `sr` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` to destructure a single infallible pattern. Consider using `let` [INFO] [stdout] --> src/eval.rs:286:29 [INFO] [stdout] | [INFO] [stdout] 286 | / ... let values = match s { [INFO] [stdout] 287 | | ... Composed::Struct(s) => s [INFO] [stdout] 288 | | ... }; [INFO] [stdout] | |________________________^ help: try: `let Composed::Struct(values) = s;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#infallible_destructuring_match [INFO] [stdout] = note: `#[warn(clippy::infallible_destructuring_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/eval.rs:322:40 [INFO] [stdout] | [INFO] [stdout] 322 | .ok_or_else(|| format!("invalid ref in match pattern"))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"invalid ref in match pattern".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: parameter is only used in recursion [INFO] [stdout] --> src/eval.rs:230:21 [INFO] [stdout] | [INFO] [stdout] 230 | heap: &Heap, [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_heap` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> src/eval.rs:238:64 [INFO] [stdout] | [INFO] [stdout] 238 | ... if eval_pattern(value, p, ctx, heap, vars)? { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 292 | ... if !eval_pattern(value, pattern, ctx, heap, vars)? { [INFO] [stdout] | ^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion [INFO] [stdout] = note: `#[warn(clippy::only_used_in_recursion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the impl [INFO] [stdout] --> src/mlir/ops.rs:242:6 [INFO] [stdout] | [INFO] [stdout] 242 | impl<'a, T> Display for RuntimeValue { [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] = note: `#[warn(clippy::extra_unused_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/mlir/ops.rs:261:13 [INFO] [stdout] | [INFO] [stdout] 261 | while let Some(next) = iter.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for next in iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/printer/rust.rs:207:13 [INFO] [stdout] | [INFO] [stdout] 207 | write!(f, "\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] = note: `#[warn(clippy::write_with_newline)]` on by default [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 207 - write!(f, "\n")?; [INFO] [stdout] 207 + writeln!(f)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> src/mlir/ops.rs:373:5 [INFO] [stdout] | [INFO] [stdout] 373 | / pub enum Op { [INFO] [stdout] 374 | | Const(ConstValue), [INFO] [stdout] 375 | | VarDeclare(RuntimeValue, Cow<'static, str>), [INFO] [stdout] 376 | | VarGet(RuntimeValue), [INFO] [stdout] 377 | | Neg(RuntimeValue), [INFO] [stdout] 378 | | Add(RuntimeValue, RuntimeValue), [INFO] [stdout] | | ----------------------------------------------------- the second-largest variant contains at least 64 bytes [INFO] [stdout] 379 | | If(Body, Body, Option>), [INFO] [stdout] | | ------------------------------------------------------------------------------------------------------------------- the largest variant contains at least 336 bytes [INFO] [stdout] 380 | | } [INFO] [stdout] | |_____^ the entire enum is at least 336 bytes [INFO] [stdout] | [INFO] [stdout] help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum [INFO] [stdout] --> src/mlir/ops.rs:379:9 [INFO] [stdout] | [INFO] [stdout] 379 | If(Body, Body, Option>), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/mlir/ops.rs:389:13 [INFO] [stdout] | [INFO] [stdout] 389 | / match self { [INFO] [stdout] 390 | | ValueType::Native(NativeType::Usize) => true, [INFO] [stdout] 391 | | _ => false [INFO] [stdout] 392 | | } [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] 389 - match self { [INFO] [stdout] 390 - ValueType::Native(NativeType::Usize) => true, [INFO] [stdout] 391 - _ => false [INFO] [stdout] 392 - } [INFO] [stdout] 389 + matches!(self, ValueType::Native(NativeType::Usize)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the impl [INFO] [stdout] --> src/mlir/ops.rs:447:10 [INFO] [stdout] | [INFO] [stdout] 447 | impl<'a> Display for ValueType { [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/mlir/ops.rs:456:10 [INFO] [stdout] | [INFO] [stdout] 456 | impl<'a> Display for Printer<(usize, &'a ValueType)> { [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] 456 - impl<'a> Display for Printer<(usize, &'a ValueType)> { [INFO] [stdout] 456 + impl Display for Printer<(usize, &ValueType)> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/mlir/ops.rs:463:10 [INFO] [stdout] | [INFO] [stdout] 463 | impl<'a> Display for Printer<(usize, &'a Op)> { [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] 463 - impl<'a> Display for Printer<(usize, &'a Op)> { [INFO] [stdout] 463 + impl Display for Printer<(usize, &Op)> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/printer/java.rs:78:21 [INFO] [stdout] | [INFO] [stdout] 78 | write!(f, " {name};\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 78 - write!(f, " {name};\n")?; [INFO] [stdout] 78 + writeln!(f, " {name};")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/printer/java.rs:86:21 [INFO] [stdout] | [INFO] [stdout] 86 | write!(f, " _{offset};\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 86 - write!(f, " _{offset};\n")?; [INFO] [stdout] 86 + writeln!(f, " _{offset};")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/mlir/ops.rs:490:10 [INFO] [stdout] | [INFO] [stdout] 490 | impl<'a> Display for Printer<&'a TerminatorOp> { [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] 490 - impl<'a> Display for Printer<&'a TerminatorOp> { [INFO] [stdout] 490 + impl Display for Printer<&TerminatorOp> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/lexer.rs:142:46 [INFO] [stdout] | [INFO] [stdout] 142 | fn skip_while bool>(left: &str, criteria: F) -> (usize, Option) { [INFO] [stdout] | ^^^^ the lifetime is elided here ^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 142 | fn skip_while bool>(left: &str, criteria: F) -> (usize, Option>) { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/lexer.rs:146:21 [INFO] [stdout] | [INFO] [stdout] 146 | fn number(left: &str) -> Result<(usize, Option), &'static str> { [INFO] [stdout] | ^^^^ ^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 146 | fn number(left: &str) -> Result<(usize, Option>), &'static str> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/lexer.rs:155:26 [INFO] [stdout] | [INFO] [stdout] 155 | fn doc_comment(left: &str) -> (usize, Option) { [INFO] [stdout] | ^^^^ ^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 155 | fn doc_comment(left: &str) -> (usize, Option>) { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/lexer.rs:164:21 [INFO] [stdout] | [INFO] [stdout] 164 | fn symbol(left: &str) -> (usize, Option) { [INFO] [stdout] | ^^^^ ^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 164 | fn symbol(left: &str) -> (usize, Option>) { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/printer/java.rs:123:9 [INFO] [stdout] | [INFO] [stdout] 123 | write!(f, ") {{\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 123 - write!(f, ") {{\n")?; [INFO] [stdout] 123 + writeln!(f, ") {{")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/printer/java.rs:131:21 [INFO] [stdout] | [INFO] [stdout] 131 | write!(f, " this.{name} = {name};\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 131 - write!(f, " this.{name} = {name};\n")?; [INFO] [stdout] 131 + writeln!(f, " this.{name} = {name};")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/printer/java.rs:137:21 [INFO] [stdout] | [INFO] [stdout] 137 | write!(f, " this._{offset} = _{offset};\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 137 - write!(f, " this._{offset} = _{offset};\n")?; [INFO] [stdout] 137 + writeln!(f, " this._{offset} = _{offset};")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/printer/java.rs:142:9 [INFO] [stdout] | [INFO] [stdout] 142 | write!(f, " }}\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 142 - write!(f, " }}\n")?; [INFO] [stdout] 142 + writeln!(f, " }}")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/scope.rs:24:17 [INFO] [stdout] | [INFO] [stdout] 24 | fn allocate(&mut self, depth: usize, params: impl Into>) -> Scope { [INFO] [stdout] | ^^^^^^^^^ the lifetime is elided here ^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 24 | fn allocate(&mut self, depth: usize, params: impl Into>) -> Scope<'_, T> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/scope.rs:41:17 [INFO] [stdout] | [INFO] [stdout] 41 | pub fn root(&mut self, params: impl Into>) -> Scope { [INFO] [stdout] | ^^^^^^^^^ the lifetime is elided here ^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 41 | pub fn root(&mut self, params: impl Into>) -> Scope<'_, T> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/scope.rs:76:19 [INFO] [stdout] | [INFO] [stdout] 76 | pub fn nested(&mut self, params: impl Into>) -> Scope { [INFO] [stdout] | ^^^^^^^^^ the lifetime is elided here ^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 76 | pub fn nested(&mut self, params: impl Into>) -> Scope<'_, T> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/printer/java.rs:276:25 [INFO] [stdout] | [INFO] [stdout] 276 | write!(f, " {name};\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 276 - write!(f, " {name};\n")?; [INFO] [stdout] 276 + writeln!(f, " {name};")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/printer/java.rs:285:25 [INFO] [stdout] | [INFO] [stdout] 285 | write!(f, " _{offset};\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 285 - write!(f, " _{offset};\n")?; [INFO] [stdout] 285 + writeln!(f, " _{offset};")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/printer/java.rs:322:13 [INFO] [stdout] | [INFO] [stdout] 322 | write!(f, ") {{\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 322 - write!(f, ") {{\n")?; [INFO] [stdout] 322 + writeln!(f, ") {{")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/printer/java.rs:327:25 [INFO] [stdout] | [INFO] [stdout] 327 | write!(f, " this.{name} = {name};\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 327 - write!(f, " this.{name} = {name};\n")?; [INFO] [stdout] 327 + writeln!(f, " this.{name} = {name};")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/printer/java.rs:333:25 [INFO] [stdout] | [INFO] [stdout] 333 | write!(f, " this._{offset} = _{offset};\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 333 - write!(f, " this._{offset} = _{offset};\n")?; [INFO] [stdout] 333 + writeln!(f, " this._{offset} = _{offset};")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/printer/java.rs:338:13 [INFO] [stdout] | [INFO] [stdout] 338 | write!(f, " }}\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 338 - write!(f, " }}\n")?; [INFO] [stdout] 338 + writeln!(f, " }}")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/printer/java.rs:669:9 [INFO] [stdout] | [INFO] [stdout] 669 | write!(f, "package {};\n", self.name())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 669 - write!(f, "package {};\n", self.name())?; [INFO] [stdout] 669 + writeln!(f, "package {};", self.name())?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/printer/java.rs:671:13 [INFO] [stdout] | [INFO] [stdout] 671 | write!(f, "\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 671 - write!(f, "\n")?; [INFO] [stdout] 671 + writeln!(f)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/printer/java.rs:673:13 [INFO] [stdout] | [INFO] [stdout] 673 | write!(f, "\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 673 - write!(f, "\n")?; [INFO] [stdout] 673 + writeln!(f)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `p.get(0)` [INFO] [stdout] --> src/bytecode.rs:55:34 [INFO] [stdout] | [INFO] [stdout] 55 | SkOp::Match(_, p) => p.get(0) [INFO] [stdout] | ^^^^^^^^ help: try: `p.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bytecode.rs:151:71 [INFO] [stdout] | [INFO] [stdout] 151 | SymbolRefOrEnum::Type(t) | SymbolRefOrEnum::Enum(t, _) => &t, [INFO] [stdout] | ^^ help: change this to: `t` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/transform/java/match_op.rs:111:51 [INFO] [stdout] | [INFO] [stdout] 111 | ... .resolve_enum_variant(&*s.1, &*v) [INFO] [stdout] | ^^^^^ help: try: `&s.1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/transform/java/match_op.rs:111:58 [INFO] [stdout] | [INFO] [stdout] 111 | ... .resolve_enum_variant(&*s.1, &*v) [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 111 - .resolve_enum_variant(&*s.1, &*v) [INFO] [stdout] 111 + .resolve_enum_variant(&*s.1, v) [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 111 | .resolve_enum_variant(&*s.1, &**v) [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/transform/java/match_op.rs:126:51 [INFO] [stdout] | [INFO] [stdout] 126 | ... .resolve_enum_variant(&*s.1, &*v) [INFO] [stdout] | ^^^^^ help: try: `&s.1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/transform/java/match_op.rs:126:58 [INFO] [stdout] | [INFO] [stdout] 126 | ... .resolve_enum_variant(&*s.1, &*v) [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 126 - .resolve_enum_variant(&*s.1, &*v) [INFO] [stdout] 126 + .resolve_enum_variant(&*s.1, v) [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 126 | .resolve_enum_variant(&*s.1, &**v) [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/transform/java/match_op.rs:179:51 [INFO] [stdout] | [INFO] [stdout] 179 | ... .resolve_enum_variant(&*s.1, &*v) [INFO] [stdout] | ^^^^^ help: try: `&s.1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/transform/java/match_op.rs:179:58 [INFO] [stdout] | [INFO] [stdout] 179 | ... .resolve_enum_variant(&*s.1, &*v) [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 179 - .resolve_enum_variant(&*s.1, &*v) [INFO] [stdout] 179 + .resolve_enum_variant(&*s.1, v) [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 179 | .resolve_enum_variant(&*s.1, &**v) [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/transform/java/match_op.rs:259:51 [INFO] [stdout] | [INFO] [stdout] 259 | ... .resolve_enum_variant(&*s.1, &*v) [INFO] [stdout] | ^^^^^ help: try: `&s.1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/transform/java/match_op.rs:259:58 [INFO] [stdout] | [INFO] [stdout] 259 | ... .resolve_enum_variant(&*s.1, &*v) [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 259 - .resolve_enum_variant(&*s.1, &*v) [INFO] [stdout] 259 + .resolve_enum_variant(&*s.1, v) [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 259 | .resolve_enum_variant(&*s.1, &**v) [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/transform/java/match_op.rs:293:51 [INFO] [stdout] | [INFO] [stdout] 293 | ... .resolve_enum_variant(&*s.1, &*v) [INFO] [stdout] | ^^^^^ help: try: `&s.1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/transform/java/match_op.rs:293:58 [INFO] [stdout] | [INFO] [stdout] 293 | ... .resolve_enum_variant(&*s.1, &*v) [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 293 - .resolve_enum_variant(&*s.1, &*v) [INFO] [stdout] 293 + .resolve_enum_variant(&*s.1, v) [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 293 | .resolve_enum_variant(&*s.1, &**v) [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/transform/java.rs:124:17 [INFO] [stdout] | [INFO] [stdout] 124 | write!(f, " *{line}\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 124 - write!(f, " *{line}\n")?; [INFO] [stdout] 124 + writeln!(f, " *{line}")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/transform/java.rs:148:59 [INFO] [stdout] | [INFO] [stdout] 148 | let line = if line.starts_with(' ') { &line[1..] } else { line }; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/transform/java.rs:148:32 [INFO] [stdout] | [INFO] [stdout] 148 | let line = if line.starts_with(' ') { &line[1..] } else { line }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] = note: `#[warn(clippy::manual_strip)]` on by default [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 148 - let line = if line.starts_with(' ') { &line[1..] } else { line }; [INFO] [stdout] 148 + let line = if let Some() = line.strip_prefix(' ') { } else { line }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/transform/java.rs:149:21 [INFO] [stdout] | [INFO] [stdout] 149 | write!(f, " * @param {} {line}\n", param.name)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 149 - write!(f, " * @param {} {line}\n", param.name)?; [INFO] [stdout] 149 + writeln!(f, " * @param {} {line}", param.name)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/transform/java.rs:209:13 [INFO] [stdout] | [INFO] [stdout] 209 | while let Some(field) = fields.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for field in fields` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] = note: `#[warn(clippy::while_let_on_iterator)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/transform/java.rs:253:9 [INFO] [stdout] | [INFO] [stdout] 253 | write!(f, "{visibility}sealed interface {name} {{\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 253 - write!(f, "{visibility}sealed interface {name} {{\n")?; [INFO] [stdout] 253 + writeln!(f, "{visibility}sealed interface {name} {{")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/transform/java.rs:256:9 [INFO] [stdout] | [INFO] [stdout] 256 | while let Some(variant) = permitted.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for variant in permitted` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/transform/java.rs:324:9 [INFO] [stdout] | [INFO] [stdout] 324 | while let Some(JavaFunctionParameter { name, fqdn }) = params.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for JavaFunctionParameter { name, fqdn } in params` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/transform/java.rs:334:13 [INFO] [stdout] | [INFO] [stdout] 334 | write!(f, ") {{\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 334 - write!(f, ") {{\n")?; [INFO] [stdout] 334 + writeln!(f, ") {{")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/transform/java.rs:337:13 [INFO] [stdout] | [INFO] [stdout] 337 | write!(f, ");\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 337 - write!(f, ");\n")?; [INFO] [stdout] 337 + writeln!(f, ");")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `op` after checking its variant with `is_some` [INFO] [stdout] --> src/transform/java.rs:350:54 [INFO] [stdout] | [INFO] [stdout] 348 | if op.is_some() && op.unwrap().should_store_in_var() { [INFO] [stdout] | ------------ the check is happening here [INFO] [stdout] 349 | let id = Loc::from(v); [INFO] [stdout] 350 | let expr = print_rec(f, body, scope, op.unwrap())?; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `op` after checking its variant with `is_some` [INFO] [stdout] --> src/transform/java.rs:387:53 [INFO] [stdout] | [INFO] [stdout] 386 | } else if op.is_some() { [INFO] [stdout] | --------------- help: try: `if let Some() = op` [INFO] [stdout] 387 | let val = print_rec(f, body, scope, op.unwrap())?; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/transform/java.rs:352:17 [INFO] [stdout] | [INFO] [stdout] 352 | write!(f, "{indent}final {kind} {var_name} = {expr};\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 352 - write!(f, "{indent}final {kind} {var_name} = {expr};\n")?; [INFO] [stdout] 352 + writeln!(f, "{indent}final {kind} {var_name} = {expr};")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/transform/java.rs:359:17 [INFO] [stdout] | [INFO] [stdout] 359 | write!(f, "{indent}final {kind} {var_name};\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 359 - write!(f, "{indent}final {kind} {var_name};\n")?; [INFO] [stdout] 359 + writeln!(f, "{indent}final {kind} {var_name};")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/transform/java.rs:360:17 [INFO] [stdout] | [INFO] [stdout] 360 | write!(f, "{indent}if ({e}) {{\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 360 - write!(f, "{indent}if ({e}) {{\n")?; [INFO] [stdout] 360 + writeln!(f, "{indent}if ({e}) {{")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/transform/java.rs:362:17 [INFO] [stdout] | [INFO] [stdout] 362 | write!(f, "{indent}}} else {{\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 362 - write!(f, "{indent}}} else {{\n")?; [INFO] [stdout] 362 + writeln!(f, "{indent}}} else {{")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/transform/java.rs:364:17 [INFO] [stdout] | [INFO] [stdout] 364 | write!(f, "{indent}}}\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 364 - write!(f, "{indent}}}\n")?; [INFO] [stdout] 364 + writeln!(f, "{indent}}}")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/transform/java.rs:371:17 [INFO] [stdout] | [INFO] [stdout] 371 | write!(f, "{indent}{k} {var_name} = {def};\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 371 - write!(f, "{indent}{k} {var_name} = {def};\n")?; [INFO] [stdout] 371 + writeln!(f, "{indent}{k} {var_name} = {def};")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/transform/java.rs:377:17 [INFO] [stdout] | [INFO] [stdout] 377 | write!(f, "{indent}{var_name} = {val};\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 377 - write!(f, "{indent}{var_name} = {val};\n")?; [INFO] [stdout] 377 + writeln!(f, "{indent}{var_name} = {val};")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/transform/java.rs:382:17 [INFO] [stdout] | [INFO] [stdout] 382 | write!(f, "{indent}assert false : \"{msg}\"\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 382 - write!(f, "{indent}assert false : \"{msg}\"\n")?; [INFO] [stdout] 382 + writeln!(f, "{indent}assert false : \"{msg}\"")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/transform/java.rs:403:21 [INFO] [stdout] | [INFO] [stdout] 403 | write!(f, "{indent} throw new AssertionError(\"UNREACHABLE: {msg}\");\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 403 - write!(f, "{indent} throw new AssertionError(\"UNREACHABLE: {msg}\");\n")?; [INFO] [stdout] 403 + writeln!(f, "{indent} throw new AssertionError(\"UNREACHABLE: {msg}\");")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/transform/java.rs:407:21 [INFO] [stdout] | [INFO] [stdout] 407 | write!(f, "{indent} {var_name} = {ne};\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 407 - write!(f, "{indent} {var_name} = {ne};\n")?; [INFO] [stdout] 407 + writeln!(f, "{indent} {var_name} = {ne};")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/transform/java.rs:495:17 [INFO] [stdout] | [INFO] [stdout] 495 | write!(f, " throw new AssertionError(\"UNREACHABLE: {msg}\");\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 495 - write!(f, " throw new AssertionError(\"UNREACHABLE: {msg}\");\n")?; [INFO] [stdout] 495 + writeln!(f, " throw new AssertionError(\"UNREACHABLE: {msg}\");")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/transform/java.rs:508:17 [INFO] [stdout] | [INFO] [stdout] 508 | write!(f, " return {expr};\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 508 - write!(f, " return {expr};\n")?; [INFO] [stdout] 508 + writeln!(f, " return {expr};")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/transform/java.rs:511:9 [INFO] [stdout] | [INFO] [stdout] 511 | write!(f, " }}\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 511 - write!(f, " }}\n")?; [INFO] [stdout] 511 + writeln!(f, " }}")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/transform/java.rs:617:29 [INFO] [stdout] | [INFO] [stdout] 617 | ... java_ref.0.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `java_ref.0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> src/transform/java.rs:832:1 [INFO] [stdout] | [INFO] [stdout] 832 | / enum JavaOpN { [INFO] [stdout] 833 | | Error(Cow<'static, str>), [INFO] [stdout] 834 | | Unreachable(Cow<'static, str>), [INFO] [stdout] 835 | | Nop(JavaValueRef), [INFO] [stdout] 836 | | VarDef(JavaValueKind), [INFO] [stdout] 837 | | VarSet(JavaValueRef, JavaValueRef), [INFO] [stdout] | | ---------------------------------- the second-largest variant contains at least 144 bytes [INFO] [stdout] ... | [INFO] [stdout] 857 | | If(JavaValueRef, JavaBody, JavaBody), [INFO] [stdout] | | ------------------------------------ the largest variant contains at least 376 bytes [INFO] [stdout] 858 | | } [INFO] [stdout] | |_^ the entire enum is at least 376 bytes [INFO] [stdout] | [INFO] [stdout] help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum [INFO] [stdout] --> src/transform/java.rs:857:5 [INFO] [stdout] | [INFO] [stdout] 857 | If(JavaValueRef, JavaBody, JavaBody), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stdout] = note: `#[warn(clippy::large_enum_variant)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/transform/java.rs:939:57 [INFO] [stdout] | [INFO] [stdout] 939 | } else if matches!(r, JavaValueKind::Never) { [INFO] [stdout] | _________________________________________________________^ [INFO] [stdout] 940 | | l [INFO] [stdout] 941 | | } else if l == *r.as_value_type() { [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/transform/java.rs:941:47 [INFO] [stdout] | [INFO] [stdout] 941 | } else if l == *r.as_value_type() { [INFO] [stdout] | _______________________________________________^ [INFO] [stdout] 942 | | l [INFO] [stdout] 943 | | } else { [INFO] [stdout] | |_____________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enclosing `Ok` and `?` operator are unneeded [INFO] [stdout] --> src/transform/java.rs:1059:9 [INFO] [stdout] | [INFO] [stdout] 1059 | / Ok(Self::isolated(params.as_slice(), |b, args| { [INFO] [stdout] 1060 | | let mut scopes = JavaScopes::new(); [INFO] [stdout] 1061 | | let scope = scopes.root(args.as_slice()); [INFO] [stdout] 1062 | | Self::visit_body(pb, builder, module, b, scope) [INFO] [stdout] 1063 | | })?) [INFO] [stdout] | |____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark [INFO] [stdout] help: remove the enclosing `Ok` and `?` operator [INFO] [stdout] | [INFO] [stdout] 1059 ~ Self::isolated(params.as_slice(), |b, args| { [INFO] [stdout] 1060 | let mut scopes = JavaScopes::new(); [INFO] [stdout] 1061 | let scope = scopes.root(args.as_slice()); [INFO] [stdout] 1062 | Self::visit_body(pb, builder, module, b, scope) [INFO] [stdout] 1063 ~ }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i64` which implements the `Copy` trait [INFO] [stdout] --> src/transform/java.rs:1116:78 [INFO] [stdout] | [INFO] [stdout] 1116 | SkOp::ConstI64(n) if *n < i16::MAX as i64 => JavaOpN::ConstShort(n.clone() as i16), [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*n` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i64` which implements the `Copy` trait [INFO] [stdout] --> src/transform/java.rs:1118:53 [INFO] [stdout] | [INFO] [stdout] 1118 | SkOp::ConstI64(n) => JavaOpN::ConstLong(n.clone()), [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*n` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/transform/java.rs:1215:45 [INFO] [stdout] | [INFO] [stdout] 1215 | ... .unwrap_or_else(|err| JavaOpN::Error(err)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `JavaOpN::Error` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/transform/java.rs:1206:56 [INFO] [stdout] | [INFO] [stdout] 1206 | ... RefId::Param(_) => return Err(format!("SkOp::Create arg {} cannot be an RefId::Param", i + 1))?, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1206 - RefId::Param(_) => return Err(format!("SkOp::Create arg {} cannot be an RefId::Param", i + 1))?, [INFO] [stdout] 1206 + RefId::Param(_) => Err(format!("SkOp::Create arg {} cannot be an RefId::Param", i + 1))?, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/transform/java.rs:1208:49 [INFO] [stdout] | [INFO] [stdout] 1208 | ... None => return Err(format!("no mapping found for SkOp::Create arg {}", i + 1))?, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1208 - None => return Err(format!("no mapping found for SkOp::Create arg {}", i + 1))?, [INFO] [stdout] 1208 + None => Err(format!("no mapping found for SkOp::Create arg {}", i + 1))?, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/transform/ts/match_op.rs:111:51 [INFO] [stdout] | [INFO] [stdout] 111 | ... .resolve_enum_variant(&*s.1, &*v) [INFO] [stdout] | ^^^^^ help: try: `&s.1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/transform/ts/match_op.rs:111:58 [INFO] [stdout] | [INFO] [stdout] 111 | ... .resolve_enum_variant(&*s.1, &*v) [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 111 - .resolve_enum_variant(&*s.1, &*v) [INFO] [stdout] 111 + .resolve_enum_variant(&*s.1, v) [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 111 | .resolve_enum_variant(&*s.1, &**v) [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/transform/ts/match_op.rs:126:51 [INFO] [stdout] | [INFO] [stdout] 126 | ... .resolve_enum_variant(&*s.1, &*v) [INFO] [stdout] | ^^^^^ help: try: `&s.1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/transform/ts/match_op.rs:126:58 [INFO] [stdout] | [INFO] [stdout] 126 | ... .resolve_enum_variant(&*s.1, &*v) [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 126 - .resolve_enum_variant(&*s.1, &*v) [INFO] [stdout] 126 + .resolve_enum_variant(&*s.1, v) [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 126 | .resolve_enum_variant(&*s.1, &**v) [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/transform/ts/match_op.rs:179:51 [INFO] [stdout] | [INFO] [stdout] 179 | ... .resolve_enum_variant(&*s.1, &*v) [INFO] [stdout] | ^^^^^ help: try: `&s.1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/transform/ts/match_op.rs:179:58 [INFO] [stdout] | [INFO] [stdout] 179 | ... .resolve_enum_variant(&*s.1, &*v) [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 179 - .resolve_enum_variant(&*s.1, &*v) [INFO] [stdout] 179 + .resolve_enum_variant(&*s.1, v) [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 179 | .resolve_enum_variant(&*s.1, &**v) [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/transform/ts/match_op.rs:259:51 [INFO] [stdout] | [INFO] [stdout] 259 | ... .resolve_enum_variant(&*s.1, &*v) [INFO] [stdout] | ^^^^^ help: try: `&s.1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/transform/ts/match_op.rs:259:58 [INFO] [stdout] | [INFO] [stdout] 259 | ... .resolve_enum_variant(&*s.1, &*v) [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 259 - .resolve_enum_variant(&*s.1, &*v) [INFO] [stdout] 259 + .resolve_enum_variant(&*s.1, v) [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 259 | .resolve_enum_variant(&*s.1, &**v) [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/transform/ts/match_op.rs:293:51 [INFO] [stdout] | [INFO] [stdout] 293 | ... .resolve_enum_variant(&*s.1, &*v) [INFO] [stdout] | ^^^^^ help: try: `&s.1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/transform/ts/match_op.rs:293:58 [INFO] [stdout] | [INFO] [stdout] 293 | ... .resolve_enum_variant(&*s.1, &*v) [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 293 - .resolve_enum_variant(&*s.1, &*v) [INFO] [stdout] 293 + .resolve_enum_variant(&*s.1, v) [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 293 | .resolve_enum_variant(&*s.1, &**v) [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/transform/ts.rs:125:17 [INFO] [stdout] | [INFO] [stdout] 125 | write!(f, " *{line}\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 125 - write!(f, " *{line}\n")?; [INFO] [stdout] 125 + writeln!(f, " *{line}")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/transform/ts.rs:149:59 [INFO] [stdout] | [INFO] [stdout] 149 | let line = if line.starts_with(' ') { &line[1..] } else { line }; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/transform/ts.rs:149:32 [INFO] [stdout] | [INFO] [stdout] 149 | let line = if line.starts_with(' ') { &line[1..] } else { line }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 149 - let line = if line.starts_with(' ') { &line[1..] } else { line }; [INFO] [stdout] 149 + let line = if let Some() = line.strip_prefix(' ') { } else { line }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/transform/ts.rs:150:21 [INFO] [stdout] | [INFO] [stdout] 150 | write!(f, " * @param {} {line}\n", param.name)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 150 - write!(f, " * @param {} {line}\n", param.name)?; [INFO] [stdout] 150 + writeln!(f, " * @param {} {line}", param.name)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/transform/ts.rs:210:9 [INFO] [stdout] | [INFO] [stdout] 210 | write!(f, "{name} {{\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 210 - write!(f, "{name} {{\n")?; [INFO] [stdout] 210 + writeln!(f, "{name} {{")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/transform/ts.rs:216:13 [INFO] [stdout] | [INFO] [stdout] 216 | while let Some(field) = fields.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for field in fields` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/transform/ts.rs:252:9 [INFO] [stdout] | [INFO] [stdout] 252 | while let Some(variant) = variants.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for variant in variants` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/transform/ts.rs:258:9 [INFO] [stdout] | [INFO] [stdout] 258 | while let Some(variant) = variants.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for variant in variants` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/transform/ts.rs:326:9 [INFO] [stdout] | [INFO] [stdout] 326 | while let Some(TsFunctionParameter { name, fqdn }) = params.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for TsFunctionParameter { name, fqdn } in params` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/transform/ts.rs:336:13 [INFO] [stdout] | [INFO] [stdout] 336 | write!(f, "): {ret_type} {{\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 336 - write!(f, "): {ret_type} {{\n")?; [INFO] [stdout] 336 + writeln!(f, "): {ret_type} {{")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/transform/ts.rs:339:13 [INFO] [stdout] | [INFO] [stdout] 339 | write!(f, "): {ret_type};\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 339 - write!(f, "): {ret_type};\n")?; [INFO] [stdout] 339 + writeln!(f, "): {ret_type};")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `op` after checking its variant with `is_some` [INFO] [stdout] --> src/transform/ts.rs:352:54 [INFO] [stdout] | [INFO] [stdout] 350 | if op.is_some() && op.unwrap().should_store_in_var() { [INFO] [stdout] | ------------ the check is happening here [INFO] [stdout] 351 | let id = Loc::from(v); [INFO] [stdout] 352 | let expr = print_rec(f, body, scope, op.unwrap())?; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `op` after checking its variant with `is_some` [INFO] [stdout] --> src/transform/ts.rs:388:53 [INFO] [stdout] | [INFO] [stdout] 387 | } else if op.is_some() { [INFO] [stdout] | --------------- help: try: `if let Some() = op` [INFO] [stdout] 388 | let val = print_rec(f, body, scope, op.unwrap())?; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/transform/ts.rs:354:17 [INFO] [stdout] | [INFO] [stdout] 354 | write!(f, "{indent}const {var_name}: {kind} = {expr};\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 354 - write!(f, "{indent}const {var_name}: {kind} = {expr};\n")?; [INFO] [stdout] 354 + writeln!(f, "{indent}const {var_name}: {kind} = {expr};")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/transform/ts.rs:361:17 [INFO] [stdout] | [INFO] [stdout] 361 | write!(f, "{indent}let {var_name}: {kind};\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 361 - write!(f, "{indent}let {var_name}: {kind};\n")?; [INFO] [stdout] 361 + writeln!(f, "{indent}let {var_name}: {kind};")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/transform/ts.rs:362:17 [INFO] [stdout] | [INFO] [stdout] 362 | write!(f, "{indent}if ({e}) {{\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 362 - write!(f, "{indent}if ({e}) {{\n")?; [INFO] [stdout] 362 + writeln!(f, "{indent}if ({e}) {{")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/transform/ts.rs:364:17 [INFO] [stdout] | [INFO] [stdout] 364 | write!(f, "{indent}}} else {{\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 364 - write!(f, "{indent}}} else {{\n")?; [INFO] [stdout] 364 + writeln!(f, "{indent}}} else {{")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/transform/ts.rs:366:17 [INFO] [stdout] | [INFO] [stdout] 366 | write!(f, "{indent}}}\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 366 - write!(f, "{indent}}}\n")?; [INFO] [stdout] 366 + writeln!(f, "{indent}}}")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/transform/ts.rs:372:17 [INFO] [stdout] | [INFO] [stdout] 372 | write!(f, "{indent}let {var_name}: {kind} = null!;\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 372 - write!(f, "{indent}let {var_name}: {kind} = null!;\n")?; [INFO] [stdout] 372 + writeln!(f, "{indent}let {var_name}: {kind} = null!;")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/transform/ts.rs:378:17 [INFO] [stdout] | [INFO] [stdout] 378 | write!(f, "{indent}{var_name} = {val};\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 378 - write!(f, "{indent}{var_name} = {val};\n")?; [INFO] [stdout] 378 + writeln!(f, "{indent}{var_name} = {val};")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/bin/skrull.rs:57:5 [INFO] [stdout] | [INFO] [stdout] 57 | / Ok(match args.action { [INFO] [stdout] 58 | | Action::Generate(GenerateAction::Java(ToJavaArgs { out, .. })) => { [INFO] [stdout] 59 | | let jm = JavaModule::try_from(&parsed)?; [INFO] [stdout] 60 | | for fqdn in jm.classes() { [INFO] [stdout] ... | [INFO] [stdout] 87 | | }) [INFO] [stdout] | |______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] = note: `#[warn(clippy::unit_arg)]` on by default [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 57 ~ let _: () = match args.action { [INFO] [stdout] 58 + Action::Generate(GenerateAction::Java(ToJavaArgs { out, .. })) => { [INFO] [stdout] 59 + let jm = JavaModule::try_from(&parsed)?; [INFO] [stdout] 60 + for fqdn in jm.classes() { [INFO] [stdout] 61 + let Some(content) = jm.resolve(fqdn) else { continue; }; [INFO] [stdout] 62 + let mut path = out.clone(); [INFO] [stdout] 63 + for pkg in fqdn.split('.') { [INFO] [stdout] 64 + path.push(pkg) [INFO] [stdout] 65 + } [INFO] [stdout] 66 + path.set_extension("java"); [INFO] [stdout] 67 + if let Some(parent) = path.parent() { [INFO] [stdout] 68 + std::fs::create_dir_all(parent)?; [INFO] [stdout] 69 + } [INFO] [stdout] 70 + let mut out = std::fs::File::create(path.as_path())?; [INFO] [stdout] 71 + write!(out, "{}", content)?; [INFO] [stdout] 72 + eprintln!("{}", path.to_string_lossy()); [INFO] [stdout] 73 + } [INFO] [stdout] 74 + } [INFO] [stdout] 75 + Action::Generate(GenerateAction::TS(ToTSArgs { out })) => { [INFO] [stdout] 76 + if let Some(path) = out { [INFO] [stdout] 77 + let out = std::fs::File::open(path.as_path())?; [INFO] [stdout] 78 + let mut out = BufWriter::new(out); [INFO] [stdout] 79 + write!(out, "{}", TsModule::try_from(&parsed)?)?; [INFO] [stdout] 80 + eprintln!("{}", path.to_string_lossy()); [INFO] [stdout] 81 + } else { [INFO] [stdout] 82 + let out = std::io::stdout(); [INFO] [stdout] 83 + let mut out = BufWriter::new(out); [INFO] [stdout] 84 + write!(out, "{}", TsModule::try_from(&parsed)?)? [INFO] [stdout] 85 + } [INFO] [stdout] 86 + } [INFO] [stdout] 87 + }; [INFO] [stdout] 88 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/transform/ts.rs:383:17 [INFO] [stdout] | [INFO] [stdout] 383 | write!(f, "{indent}throw new Error(\"{msg}\");\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 383 - write!(f, "{indent}throw new Error(\"{msg}\");\n")?; [INFO] [stdout] 383 + writeln!(f, "{indent}throw new Error(\"{msg}\");")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/transform/ts.rs:404:21 [INFO] [stdout] | [INFO] [stdout] 404 | write!(f, "{indent} throw new Error(\"UNREACHABLE: {msg}\");\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 404 - write!(f, "{indent} throw new Error(\"UNREACHABLE: {msg}\");\n")?; [INFO] [stdout] 404 + writeln!(f, "{indent} throw new Error(\"UNREACHABLE: {msg}\");")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/transform/ts.rs:408:21 [INFO] [stdout] | [INFO] [stdout] 408 | write!(f, "{indent} {var_name} = {ne};\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 408 - write!(f, "{indent} {var_name} = {ne};\n")?; [INFO] [stdout] 408 + writeln!(f, "{indent} {var_name} = {ne};")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/bin/skrull.rs:57:5 [INFO] [stdout] | [INFO] [stdout] 57 | / Ok(match args.action { [INFO] [stdout] 58 | | Action::Generate(GenerateAction::Java(ToJavaArgs { out, .. })) => { [INFO] [stdout] 59 | | let jm = JavaModule::try_from(&parsed)?; [INFO] [stdout] 60 | | for fqdn in jm.classes() { [INFO] [stdout] ... | [INFO] [stdout] 87 | | }) [INFO] [stdout] | |______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] = note: `#[warn(clippy::unit_arg)]` on by default [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 57 ~ let _: () = match args.action { [INFO] [stdout] 58 + Action::Generate(GenerateAction::Java(ToJavaArgs { out, .. })) => { [INFO] [stdout] 59 + let jm = JavaModule::try_from(&parsed)?; [INFO] [stdout] 60 + for fqdn in jm.classes() { [INFO] [stdout] 61 + let Some(content) = jm.resolve(fqdn) else { continue; }; [INFO] [stdout] 62 + let mut path = out.clone(); [INFO] [stdout] 63 + for pkg in fqdn.split('.') { [INFO] [stdout] 64 + path.push(pkg) [INFO] [stdout] 65 + } [INFO] [stdout] 66 + path.set_extension("java"); [INFO] [stdout] 67 + if let Some(parent) = path.parent() { [INFO] [stdout] 68 + std::fs::create_dir_all(parent)?; [INFO] [stdout] 69 + } [INFO] [stdout] 70 + let mut out = std::fs::File::create(path.as_path())?; [INFO] [stdout] 71 + write!(out, "{}", content)?; [INFO] [stdout] 72 + eprintln!("{}", path.to_string_lossy()); [INFO] [stdout] 73 + } [INFO] [stdout] 74 + } [INFO] [stdout] 75 + Action::Generate(GenerateAction::TS(ToTSArgs { out })) => { [INFO] [stdout] 76 + if let Some(path) = out { [INFO] [stdout] 77 + let out = std::fs::File::open(path.as_path())?; [INFO] [stdout] 78 + let mut out = BufWriter::new(out); [INFO] [stdout] 79 + write!(out, "{}", TsModule::try_from(&parsed)?)?; [INFO] [stdout] 80 + eprintln!("{}", path.to_string_lossy()); [INFO] [stdout] 81 + } else { [INFO] [stdout] 82 + let out = std::io::stdout(); [INFO] [stdout] 83 + let mut out = BufWriter::new(out); [INFO] [stdout] 84 + write!(out, "{}", TsModule::try_from(&parsed)?)? [INFO] [stdout] 85 + } [INFO] [stdout] 86 + } [INFO] [stdout] 87 + }; [INFO] [stdout] 88 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/transform/ts.rs:495:17 [INFO] [stdout] | [INFO] [stdout] 495 | write!(f, " throw new Error(\"UNREACHABLE: {msg}\");\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 495 - write!(f, " throw new Error(\"UNREACHABLE: {msg}\");\n")?; [INFO] [stdout] 495 + writeln!(f, " throw new Error(\"UNREACHABLE: {msg}\");")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/transform/ts.rs:508:17 [INFO] [stdout] | [INFO] [stdout] 508 | write!(f, " return {expr};\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 508 - write!(f, " return {expr};\n")?; [INFO] [stdout] 508 + writeln!(f, " return {expr};")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/transform/ts.rs:616:29 [INFO] [stdout] | [INFO] [stdout] 616 | ... ts_ref.0.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `ts_ref.0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/transform/ts.rs:724:21 [INFO] [stdout] | [INFO] [stdout] 724 | Rc::new(format!("Utils")), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Utils".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> src/transform/ts.rs:865:1 [INFO] [stdout] | [INFO] [stdout] 865 | / enum TsOp { [INFO] [stdout] 866 | | Error(Cow<'static, str>), [INFO] [stdout] 867 | | Unreachable(Cow<'static, str>), [INFO] [stdout] 868 | | Nop(TsValueRef), [INFO] [stdout] 869 | | VarDef(TsValueKind), [INFO] [stdout] 870 | | VarSet(TsValueRef, TsValueRef), [INFO] [stdout] | | ------------------------------ the second-largest variant contains at least 144 bytes [INFO] [stdout] ... | [INFO] [stdout] 889 | | If(TsValueRef, TsBody, TsBody), [INFO] [stdout] | | ------------------------------ the largest variant contains at least 376 bytes [INFO] [stdout] 890 | | } [INFO] [stdout] | |_^ the entire enum is at least 376 bytes [INFO] [stdout] | [INFO] [stdout] help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum [INFO] [stdout] --> src/transform/ts.rs:889:5 [INFO] [stdout] | [INFO] [stdout] 889 | If(TsValueRef, TsBody, TsBody), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/transform/ts.rs:961:55 [INFO] [stdout] | [INFO] [stdout] 961 | } else if matches!(r, TsValueKind::Never) { [INFO] [stdout] | _______________________________________________________^ [INFO] [stdout] 962 | | l [INFO] [stdout] 963 | | } else if l == *r.as_value_type() { [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/transform/ts.rs:963:47 [INFO] [stdout] | [INFO] [stdout] 963 | } else if l == *r.as_value_type() { [INFO] [stdout] | _______________________________________________^ [INFO] [stdout] 964 | | l [INFO] [stdout] 965 | | } else { [INFO] [stdout] | |_____________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this match could be replaced by its body itself [INFO] [stdout] --> src/transform/ts.rs:970:37 [INFO] [stdout] | [INFO] [stdout] 970 | TsValueKind::TsType(match (l, r) { [INFO] [stdout] | _____________________________________^ [INFO] [stdout] 971 | | // (TsType::Number, TsType::Number) => TsType::Number, [INFO] [stdout] 972 | | [INFO] [stdout] 973 | | _ => return TsValueKind::Never [INFO] [stdout] 974 | | }) [INFO] [stdout] | |_________________^ help: consider using the match body instead: `return TsValueKind::Never` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_single_binding [INFO] [stdout] = note: `#[warn(clippy::match_single_binding)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enclosing `Ok` and `?` operator are unneeded [INFO] [stdout] --> src/transform/ts.rs:1058:9 [INFO] [stdout] | [INFO] [stdout] 1058 | / Ok(Self::isolated(params.as_slice(), |b, args| { [INFO] [stdout] 1059 | | let mut scopes = TsScopes::new(); [INFO] [stdout] 1060 | | let scope = scopes.root(args.as_slice()); [INFO] [stdout] 1061 | | Self::visit_body(pb, builder, module, b, scope) [INFO] [stdout] 1062 | | })?) [INFO] [stdout] | |____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark [INFO] [stdout] help: remove the enclosing `Ok` and `?` operator [INFO] [stdout] | [INFO] [stdout] 1058 ~ Self::isolated(params.as_slice(), |b, args| { [INFO] [stdout] 1059 | let mut scopes = TsScopes::new(); [INFO] [stdout] 1060 | let scope = scopes.root(args.as_slice()); [INFO] [stdout] 1061 | Self::visit_body(pb, builder, module, b, scope) [INFO] [stdout] 1062 ~ }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i64` which implements the `Copy` trait [INFO] [stdout] --> src/transform/ts.rs:1116:52 [INFO] [stdout] | [INFO] [stdout] 1116 | SkOp::ConstI64(n) => TsOp::ConstNumber(n.clone().into()), [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `(*n)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/transform/ts.rs:1213:45 [INFO] [stdout] | [INFO] [stdout] 1213 | ... .unwrap_or_else(|err| TsOp::Error(err)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `TsOp::Error` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/transform/ts.rs:1204:56 [INFO] [stdout] | [INFO] [stdout] 1204 | ... RefId::Param(_) => return Err(format!("SkOp::Create arg {} cannot be an RefId::Param", i + 1))?, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1204 - RefId::Param(_) => return Err(format!("SkOp::Create arg {} cannot be an RefId::Param", i + 1))?, [INFO] [stdout] 1204 + RefId::Param(_) => Err(format!("SkOp::Create arg {} cannot be an RefId::Param", i + 1))?, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/transform/ts.rs:1206:49 [INFO] [stdout] | [INFO] [stdout] 1206 | ... None => return Err(format!("no mapping found for SkOp::Create arg {}", i + 1))?, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1206 - None => return Err(format!("no mapping found for SkOp::Create arg {}", i + 1))?, [INFO] [stdout] 1206 + None => Err(format!("no mapping found for SkOp::Create arg {}", i + 1))?, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i64` which implements the `Copy` trait [INFO] [stdout] --> src/eval.rs:31:33 [INFO] [stdout] | [INFO] [stdout] 31 | Value::I64(v) => Ok(v.clone()), [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*v` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `bool` which implements the `Copy` trait [INFO] [stdout] --> src/eval.rs:38:34 [INFO] [stdout] | [INFO] [stdout] 38 | Value::Bool(v) => Ok(v.clone()), [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*v` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/eval.rs:167:40 [INFO] [stdout] | [INFO] [stdout] 167 | let f = ctx.get_symbol(&f).or(Err("function symbol not found"))?; [INFO] [stdout] | ^^ help: change this to: `f` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/eval.rs:184:40 [INFO] [stdout] | [INFO] [stdout] 184 | let s = ctx.get_symbol(&sr).or(Err("struct symbol not found"))?; [INFO] [stdout] | ^^^ help: change this to: `sr` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` to destructure a single infallible pattern. Consider using `let` [INFO] [stdout] --> src/eval.rs:286:29 [INFO] [stdout] | [INFO] [stdout] 286 | / ... let values = match s { [INFO] [stdout] 287 | | ... Composed::Struct(s) => s [INFO] [stdout] 288 | | ... }; [INFO] [stdout] | |________________________^ help: try: `let Composed::Struct(values) = s;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#infallible_destructuring_match [INFO] [stdout] = note: `#[warn(clippy::infallible_destructuring_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/eval.rs:322:40 [INFO] [stdout] | [INFO] [stdout] 322 | .ok_or_else(|| format!("invalid ref in match pattern"))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"invalid ref in match pattern".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: parameter is only used in recursion [INFO] [stdout] --> src/eval.rs:230:21 [INFO] [stdout] | [INFO] [stdout] 230 | heap: &Heap, [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_heap` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> src/eval.rs:238:64 [INFO] [stdout] | [INFO] [stdout] 238 | ... if eval_pattern(value, p, ctx, heap, vars)? { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 292 | ... if !eval_pattern(value, pattern, ctx, heap, vars)? { [INFO] [stdout] | ^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion [INFO] [stdout] = note: `#[warn(clippy::only_used_in_recursion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/scope.rs:140:32 [INFO] [stdout] | [INFO] [stdout] 140 | let mut root = scopes.root(&["b"]); [INFO] [stdout] | ^^^^^^ help: change this to: `["b"]` [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: the borrowed expression implements the required traits [INFO] [stdout] --> src/scope.rs:145:38 [INFO] [stdout] | [INFO] [stdout] 145 | let mut nested = root.nested(&["d"]); [INFO] [stdout] | ^^^^^^ help: change this to: `["d"]` [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] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the impl [INFO] [stdout] --> src/mlir/ops.rs:242:6 [INFO] [stdout] | [INFO] [stdout] 242 | impl<'a, T> Display for RuntimeValue { [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] = note: `#[warn(clippy::extra_unused_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/mlir/ops.rs:261:13 [INFO] [stdout] | [INFO] [stdout] 261 | while let Some(next) = iter.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for next in iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> src/mlir/ops.rs:373:5 [INFO] [stdout] | [INFO] [stdout] 373 | / pub enum Op { [INFO] [stdout] 374 | | Const(ConstValue), [INFO] [stdout] 375 | | VarDeclare(RuntimeValue, Cow<'static, str>), [INFO] [stdout] 376 | | VarGet(RuntimeValue), [INFO] [stdout] 377 | | Neg(RuntimeValue), [INFO] [stdout] 378 | | Add(RuntimeValue, RuntimeValue), [INFO] [stdout] | | ----------------------------------------------------- the second-largest variant contains at least 64 bytes [INFO] [stdout] 379 | | If(Body, Body, Option>), [INFO] [stdout] | | ------------------------------------------------------------------------------------------------------------------- the largest variant contains at least 336 bytes [INFO] [stdout] 380 | | } [INFO] [stdout] | |_____^ the entire enum is at least 336 bytes [INFO] [stdout] | [INFO] [stdout] help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum [INFO] [stdout] --> src/mlir/ops.rs:379:9 [INFO] [stdout] | [INFO] [stdout] 379 | If(Body, Body, Option>), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/mlir/ops.rs:389:13 [INFO] [stdout] | [INFO] [stdout] 389 | / match self { [INFO] [stdout] 390 | | ValueType::Native(NativeType::Usize) => true, [INFO] [stdout] 391 | | _ => false [INFO] [stdout] 392 | | } [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] 389 - match self { [INFO] [stdout] 390 - ValueType::Native(NativeType::Usize) => true, [INFO] [stdout] 391 - _ => false [INFO] [stdout] 392 - } [INFO] [stdout] 389 + matches!(self, ValueType::Native(NativeType::Usize)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the impl [INFO] [stdout] --> src/mlir/ops.rs:447:10 [INFO] [stdout] | [INFO] [stdout] 447 | impl<'a> Display for ValueType { [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/mlir/ops.rs:456:10 [INFO] [stdout] | [INFO] [stdout] 456 | impl<'a> Display for Printer<(usize, &'a ValueType)> { [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] 456 - impl<'a> Display for Printer<(usize, &'a ValueType)> { [INFO] [stdout] 456 + impl Display for Printer<(usize, &ValueType)> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/mlir/ops.rs:463:10 [INFO] [stdout] | [INFO] [stdout] 463 | impl<'a> Display for Printer<(usize, &'a Op)> { [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] 463 - impl<'a> Display for Printer<(usize, &'a Op)> { [INFO] [stdout] 463 + impl Display for Printer<(usize, &Op)> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/mlir/ops.rs:490:10 [INFO] [stdout] | [INFO] [stdout] 490 | impl<'a> Display for Printer<&'a TerminatorOp> { [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] 490 - impl<'a> Display for Printer<&'a TerminatorOp> { [INFO] [stdout] 490 + impl Display for Printer<&TerminatorOp> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/mlir/ops.rs:540:13 [INFO] [stdout] | [INFO] [stdout] 540 | &[ValueType::Native(NativeType::Usize)], [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `[ValueType::Native(NativeType::Usize)]` [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] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/lexer.rs:142:46 [INFO] [stdout] | [INFO] [stdout] 142 | fn skip_while bool>(left: &str, criteria: F) -> (usize, Option) { [INFO] [stdout] | ^^^^ the lifetime is elided here ^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 142 | fn skip_while bool>(left: &str, criteria: F) -> (usize, Option>) { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/lexer.rs:146:21 [INFO] [stdout] | [INFO] [stdout] 146 | fn number(left: &str) -> Result<(usize, Option), &'static str> { [INFO] [stdout] | ^^^^ ^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 146 | fn number(left: &str) -> Result<(usize, Option>), &'static str> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/lexer.rs:155:26 [INFO] [stdout] | [INFO] [stdout] 155 | fn doc_comment(left: &str) -> (usize, Option) { [INFO] [stdout] | ^^^^ ^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 155 | fn doc_comment(left: &str) -> (usize, Option>) { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/lexer.rs:164:21 [INFO] [stdout] | [INFO] [stdout] 164 | fn symbol(left: &str) -> (usize, Option) { [INFO] [stdout] | ^^^^ ^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 164 | fn symbol(left: &str) -> (usize, Option>) { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/parser.rs:791:35 [INFO] [stdout] | [INFO] [stdout] 791 | fn dl(loc: Range, content: &str) -> DocLine { [INFO] [stdout] | ^^^^ ^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 791 | fn dl(loc: Range, content: &str) -> DocLine<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/scope.rs:24:17 [INFO] [stdout] | [INFO] [stdout] 24 | fn allocate(&mut self, depth: usize, params: impl Into>) -> Scope { [INFO] [stdout] | ^^^^^^^^^ the lifetime is elided here ^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 24 | fn allocate(&mut self, depth: usize, params: impl Into>) -> Scope<'_, T> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/scope.rs:41:17 [INFO] [stdout] | [INFO] [stdout] 41 | pub fn root(&mut self, params: impl Into>) -> Scope { [INFO] [stdout] | ^^^^^^^^^ the lifetime is elided here ^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 41 | pub fn root(&mut self, params: impl Into>) -> Scope<'_, T> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/scope.rs:76:19 [INFO] [stdout] | [INFO] [stdout] 76 | pub fn nested(&mut self, params: impl Into>) -> Scope { [INFO] [stdout] | ^^^^^^^^^ the lifetime is elided here ^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 76 | pub fn nested(&mut self, params: impl Into>) -> Scope<'_, T> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/mlir/ops.rs:501:9 [INFO] [stdout] | [INFO] [stdout] 500 | fn it_can_print_body() -> Result<()> { [INFO] [stdout] | ------------------------------------ move the `impl` block outside of this function `it_can_print_body` [INFO] [stdout] 501 | impl<'a> BlockBuilder<'a, ValueType, Op, TerminatorOp> { [INFO] [stdout] | ^^^^^^^^^------------^^^^^---------^^--^^------------^ [INFO] [stdout] | | | | | [INFO] [stdout] | | | | `TerminatorOp` is not local [INFO] [stdout] | | | `Op` is not local [INFO] [stdout] | | `ValueType` is not local [INFO] [stdout] | `BlockBuilder` is not local [INFO] [stdout] | [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: `#[warn(non_local_definitions)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 7.92s [INFO] running `Command { std: "docker" "inspect" "217d236ba27b694ae42c8867dfacab6a41d441772bcf241fcc5e6f2b5abdc387", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "217d236ba27b694ae42c8867dfacab6a41d441772bcf241fcc5e6f2b5abdc387", kill_on_drop: false }` [INFO] [stdout] 217d236ba27b694ae42c8867dfacab6a41d441772bcf241fcc5e6f2b5abdc387