[INFO] cloning repository https://github.com/Rickgg/me_myself [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/Rickgg/me_myself" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FRickgg%2Fme_myself", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FRickgg%2Fme_myself'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 50cb343e4e2d2ea9cd60222180df46577f6c4059 [INFO] linting Rickgg/me_myself against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FRickgg%2Fme_myself" "/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/Rickgg/me_myself [INFO] finished tweaking git repo https://github.com/Rickgg/me_myself [INFO] tweaked toml for git repo https://github.com/Rickgg/me_myself written to /workspace/builds/worker-4-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/Rickgg/me_myself 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/Rickgg/me_myself 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] Updating git repository `https://github.com/sunjay/turtle` [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded const_fn v0.4.3 [INFO] [stderr] Downloaded gif v0.11.1 [INFO] [stderr] Downloaded pistoncore-input v0.28.1 [INFO] [stderr] Downloaded svg v0.8.0 [INFO] [stderr] Downloaded env_logger v0.8.1 [INFO] [stderr] Downloaded libloading v0.6.5 [INFO] [stderr] Downloaded weezl v0.1.3 [INFO] [stderr] Downloaded cc v1.0.62 [INFO] [stderr] Downloaded backtrace v0.3.54 [INFO] [stderr] Downloaded crossbeam-utils v0.8.0 [INFO] [stderr] Downloaded syn v1.0.42 [INFO] [stderr] Downloaded crossbeam-epoch v0.9.0 [INFO] [stderr] Downloaded piston_window v0.108.0 [INFO] [stderr] Downloaded image v0.23.11 [INFO] [stderr] Downloaded tiff v0.6.0 [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] b16640362f6072cb28472762047257ba104179d0ea496e19ac4d0199d2d60a9d [INFO] running `Command { std: "docker" "start" "-a" "b16640362f6072cb28472762047257ba104179d0ea496e19ac4d0199d2d60a9d", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "b16640362f6072cb28472762047257ba104179d0ea496e19ac4d0199d2d60a9d", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "b16640362f6072cb28472762047257ba104179d0ea496e19ac4d0199d2d60a9d", kill_on_drop: false }` [INFO] [stdout] b16640362f6072cb28472762047257ba104179d0ea496e19ac4d0199d2d60a9d [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] a49874bc938fbf6da814c074e9c64e8cd6c78371c52c1a40062bca325b806f7f [INFO] running `Command { std: "docker" "start" "-a" "a49874bc938fbf6da814c074e9c64e8cd6c78371c52c1a40062bca325b806f7f", kill_on_drop: false }` [INFO] [stderr] Compiling xml-rs v0.8.3 [INFO] [stderr] Compiling num-traits v0.2.14 [INFO] [stderr] Compiling const_fn v0.4.3 [INFO] [stderr] Compiling crossbeam-utils v0.8.0 [INFO] [stderr] Compiling syn v1.0.42 [INFO] [stderr] Compiling log v0.4.11 [INFO] [stderr] Checking stb_truetype v0.3.1 [INFO] [stderr] Checking libloading v0.6.5 [INFO] [stderr] Checking piston-float v1.0.0 [INFO] [stderr] Compiling serde v1.0.117 [INFO] [stderr] Checking nix v0.14.1 [INFO] [stderr] Compiling rayon v1.5.0 [INFO] [stderr] Compiling miniz_oxide v0.4.3 [INFO] [stderr] Checking piston-graphics_api_version v0.2.0 [INFO] [stderr] Checking draw_state v0.8.0 [INFO] [stderr] Checking weezl v0.1.3 [INFO] [stderr] Checking dlib v0.4.2 [INFO] [stderr] Compiling cc v1.0.62 [INFO] [stderr] Checking piston-viewport v1.0.0 [INFO] [stderr] Checking wayland-sys v0.21.13 [INFO] [stderr] Checking x11-dl v2.18.5 [INFO] [stderr] Checking deflate v0.8.6 [INFO] [stderr] Checking rand_core v0.3.1 [INFO] [stderr] Checking memmap v0.7.0 [INFO] [stderr] Checking gif v0.11.1 [INFO] [stderr] Checking shared_library v0.1.9 [INFO] [stderr] Checking raw-window-handle v0.3.3 [INFO] [stderr] Checking gfx_core v0.9.2 [INFO] [stderr] Checking piston-texture v0.8.0 [INFO] [stderr] Compiling gl_generator v0.14.0 [INFO] [stderr] Compiling wayland-scanner v0.21.13 [INFO] [stderr] Compiling gl_generator v0.10.0 [INFO] [stderr] Checking bytemuck v1.4.1 [INFO] [stderr] Checking osmesa-sys v0.1.2 [INFO] [stderr] Checking png v0.16.7 [INFO] [stderr] Checking vecmath v1.0.0 [INFO] [stderr] Checking shader_version v0.6.0 [INFO] [stderr] Checking interpolation v0.2.0 [INFO] [stderr] Compiling ucd-trie v0.1.3 [INFO] [stderr] Checking approx v0.3.2 [INFO] [stderr] Checking ordered-float v1.1.0 [INFO] [stderr] Checking line_drawing v0.7.0 [INFO] [stderr] Checking num-integer v0.1.44 [INFO] [stderr] Checking read_color v1.0.0 [INFO] [stderr] Compiling pest v2.1.3 [INFO] [stderr] Compiling maplit v1.0.2 [INFO] [stderr] Checking piston-shaders_graphics2d v0.3.1 [INFO] [stderr] Checking num-iter v0.1.42 [INFO] [stderr] Checking crossbeam-epoch v0.9.0 [INFO] [stderr] Checking crossbeam-channel v0.5.0 [INFO] [stderr] Checking num-rational v0.3.2 [INFO] [stderr] Compiling glutin_glx_sys v0.1.7 [INFO] [stderr] Compiling glutin_egl_sys v0.1.5 [INFO] [stderr] Compiling gfx_gl v0.6.1 [INFO] [stderr] Checking rusttype v0.8.3 [INFO] [stderr] Checking crossbeam-deque v0.8.0 [INFO] [stderr] Checking rand_chacha v0.1.1 [INFO] [stderr] Compiling gl v0.11.0 [INFO] [stderr] Checking rand_xorshift v0.1.1 [INFO] [stderr] Compiling libloading v0.5.2 [INFO] [stderr] Checking rand_isaac v0.1.1 [INFO] [stderr] Checking rusttype v0.7.9 [INFO] [stderr] Checking piston2d-graphics v0.36.0 [INFO] [stderr] Checking rand_hc v0.1.0 [INFO] [stderr] Checking andrew v0.2.1 [INFO] [stderr] Checking gfx v0.18.2 [INFO] [stderr] Checking rand_os v0.1.3 [INFO] [stderr] Checking itoa v0.4.6 [INFO] [stderr] Checking regex-syntax v0.6.21 [INFO] [stderr] Checking rayon-core v1.9.0 [INFO] [stderr] Compiling pest_meta v2.1.3 [INFO] [stderr] Checking rand v0.6.5 [INFO] [stderr] Checking svg v0.8.0 [INFO] [stderr] Checking humantime v2.0.1 [INFO] [stderr] Checking termcolor v1.1.0 [INFO] [stderr] Compiling wayland-client v0.21.13 [INFO] [stderr] Compiling wayland-protocols v0.21.13 [INFO] [stderr] Compiling pest_generator v2.1.3 [INFO] [stderr] Checking regex v1.4.2 [INFO] [stderr] Compiling serde_derive v1.0.117 [INFO] [stderr] Compiling pest_derive v2.1.0 [INFO] [stderr] Checking wayland-commons v0.21.13 [INFO] [stderr] Checking env_logger v0.8.1 [INFO] [stderr] Checking gfx_device_gl v0.16.2 [INFO] [stderr] Checking jpeg-decoder v0.1.20 [INFO] [stderr] Checking tiff v0.6.0 [INFO] [stderr] Checking image v0.23.11 [INFO] [stderr] Checking pistoncore-input v0.28.1 [INFO] [stderr] Checking serde_json v1.0.59 [INFO] [stderr] Checking pistoncore-window v0.44.0 [INFO] [stderr] Checking piston-gfx_texture v0.41.0 [INFO] [stderr] Checking pistoncore-event_loop v0.49.0 [INFO] [stderr] Checking piston2d-gfx_graphics v0.68.0 [INFO] [stderr] Checking piston v0.49.0 [INFO] [stderr] Checking smithay-client-toolkit v0.4.6 [INFO] [stderr] Checking winit v0.19.5 [INFO] [stderr] Checking glutin v0.21.2 [INFO] [stderr] Checking pistoncore-glutin_window v0.63.0 [INFO] [stderr] Checking piston_window v0.108.0 [INFO] [stderr] Checking turtle v1.0.0-rc.4 (https://github.com/sunjay/turtle?rev=bf64b8333a2be1914378d8a22a4788947711182b#bf64b833) [INFO] [stderr] Checking me_myself v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/main.rs:6:1 [INFO] [stdout] | [INFO] [stdout] 6 | use turtle; [INFO] [stdout] | ^^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Level`, `debug`, `error`, `info`, and `log_enabled` [INFO] [stdout] --> src/memory.rs:2:11 [INFO] [stdout] | [INFO] [stdout] 2 | use log::{debug, error, log_enabled, info, Level}; [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 imports: `Level` and `log_enabled` [INFO] [stdout] --> src/compiler.rs:9:25 [INFO] [stdout] | [INFO] [stdout] 9 | use log::{debug, error, log_enabled, info, Level, warn}; [INFO] [stdout] | ^^^^^^^^^^^ ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/main.rs:6:1 [INFO] [stdout] | [INFO] [stdout] 6 | use turtle; [INFO] [stdout] | ^^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Level`, `debug`, `error`, `info`, and `log_enabled` [INFO] [stdout] --> src/memory.rs:2:11 [INFO] [stdout] | [INFO] [stdout] 2 | use log::{debug, error, log_enabled, info, Level}; [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 imports: `Level` and `log_enabled` [INFO] [stdout] --> src/compiler.rs:9:25 [INFO] [stdout] | [INFO] [stdout] 9 | use log::{debug, error, log_enabled, info, Level, warn}; [INFO] [stdout] | ^^^^^^^^^^^ ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Level` and `log_enabled` [INFO] [stdout] --> src/vm.rs:8:25 [INFO] [stdout] | [INFO] [stdout] 8 | use log::{debug, error, log_enabled, info, Level}; [INFO] [stdout] | ^^^^^^^^^^^ ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/vm.rs:139:37 [INFO] [stdout] | [INFO] [stdout] 139 | ... lh_op: lh_op, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `lh_op` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/vm.rs:140:37 [INFO] [stdout] | [INFO] [stdout] 140 | ... rh_op: rh_op, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `rh_op` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/vm.rs:141:37 [INFO] [stdout] | [INFO] [stdout] 141 | ... out_op: out_op [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `out_op` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/vm.rs:151:37 [INFO] [stdout] | [INFO] [stdout] 151 | ... lh_op: lh_op, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `lh_op` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/vm.rs:153:37 [INFO] [stdout] | [INFO] [stdout] 153 | ... out_op: out_op [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `out_op` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/vm.rs:164:37 [INFO] [stdout] | [INFO] [stdout] 164 | ... out_op: out_op [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `out_op` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/vm.rs:174:37 [INFO] [stdout] | [INFO] [stdout] 174 | ... out_op: out_op [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `out_op` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/vm.rs:184:37 [INFO] [stdout] | [INFO] [stdout] 184 | ... out_op: out_op [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `out_op` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Level` and `log_enabled` [INFO] [stdout] --> src/vm.rs:8:25 [INFO] [stdout] | [INFO] [stdout] 8 | use log::{debug, error, log_enabled, info, Level}; [INFO] [stdout] | ^^^^^^^^^^^ ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/vm.rs:139:37 [INFO] [stdout] | [INFO] [stdout] 139 | ... lh_op: lh_op, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `lh_op` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/vm.rs:140:37 [INFO] [stdout] | [INFO] [stdout] 140 | ... rh_op: rh_op, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `rh_op` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/vm.rs:141:37 [INFO] [stdout] | [INFO] [stdout] 141 | ... out_op: out_op [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `out_op` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/vm.rs:151:37 [INFO] [stdout] | [INFO] [stdout] 151 | ... lh_op: lh_op, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `lh_op` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/vm.rs:153:37 [INFO] [stdout] | [INFO] [stdout] 153 | ... out_op: out_op [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `out_op` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/vm.rs:164:37 [INFO] [stdout] | [INFO] [stdout] 164 | ... out_op: out_op [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `out_op` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/vm.rs:174:37 [INFO] [stdout] | [INFO] [stdout] 174 | ... out_op: out_op [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `out_op` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/vm.rs:184:37 [INFO] [stdout] | [INFO] [stdout] 184 | ... out_op: out_op [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `out_op` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/compiler.rs:284:37 [INFO] [stdout] | [INFO] [stdout] 284 | ... let mut current_func = self.function_table.get_mut(self.current_func.as_str()).unwrap(); [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: variable does not need to be mutable [INFO] [stdout] --> src/compiler.rs:299:37 [INFO] [stdout] | [INFO] [stdout] 299 | ... let mut current_func = self.function_table.get_mut(self.current_func.as_str()).unwrap(); [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/compiler.rs:314:37 [INFO] [stdout] | [INFO] [stdout] 314 | ... let mut current_func = self.function_table.get_mut(self.current_func.as_str()).unwrap(); [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/compiler.rs:479:33 [INFO] [stdout] | [INFO] [stdout] 479 | ... let mut current_func = self.function_table.get_mut(self.current_func.as_str()).unwrap(); [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/compiler.rs:534:33 [INFO] [stdout] | [INFO] [stdout] 534 | ... let mut current_func = self.function_table.get_mut(self.current_func.as_str()).unwrap(); [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/compiler.rs:284:37 [INFO] [stdout] | [INFO] [stdout] 284 | ... let mut current_func = self.function_table.get_mut(self.current_func.as_str()).unwrap(); [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: variable does not need to be mutable [INFO] [stdout] --> src/compiler.rs:299:37 [INFO] [stdout] | [INFO] [stdout] 299 | ... let mut current_func = self.function_table.get_mut(self.current_func.as_str()).unwrap(); [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/compiler.rs:314:37 [INFO] [stdout] | [INFO] [stdout] 314 | ... let mut current_func = self.function_table.get_mut(self.current_func.as_str()).unwrap(); [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/compiler.rs:589:33 [INFO] [stdout] | [INFO] [stdout] 589 | ... let mut current_func = self.function_table.get_mut(self.current_func.as_str()).unwrap(); [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/compiler.rs:633:33 [INFO] [stdout] | [INFO] [stdout] 633 | ... let mut current_func = self.function_table.get_mut(self.current_func.as_str()).unwrap(); [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/compiler.rs:479:33 [INFO] [stdout] | [INFO] [stdout] 479 | ... let mut current_func = self.function_table.get_mut(self.current_func.as_str()).unwrap(); [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/compiler.rs:534:33 [INFO] [stdout] | [INFO] [stdout] 534 | ... let mut current_func = self.function_table.get_mut(self.current_func.as_str()).unwrap(); [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/compiler.rs:589:33 [INFO] [stdout] | [INFO] [stdout] 589 | ... let mut current_func = self.function_table.get_mut(self.current_func.as_str()).unwrap(); [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/compiler.rs:633:33 [INFO] [stdout] | [INFO] [stdout] 633 | ... let mut current_func = self.function_table.get_mut(self.current_func.as_str()).unwrap(); [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/compiler.rs:772:21 [INFO] [stdout] | [INFO] [stdout] 772 | let mut current_func = self.function_table.get_mut(self.current_func.as_str()).unwrap(); [INFO] [stdout] | ----^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `params` is never read [INFO] [stdout] --> src/compiler.rs:852:48 [INFO] [stdout] | [INFO] [stdout] 852 | let mut params: Vec = Default::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `is_special` is never read [INFO] [stdout] --> src/compiler.rs:853:44 [INFO] [stdout] | [INFO] [stdout] 853 | let mut is_special: bool = false; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/compiler.rs:976:25 [INFO] [stdout] | [INFO] [stdout] 976 | let mut current_func = self.function_table.get_mut(self.current_func.as_str()).unwrap(); [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/compiler.rs:1023:25 [INFO] [stdout] | [INFO] [stdout] 1023 | let mut current_func = self.function_table.get_mut(self.current_func.as_str()).unwrap(); [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/compiler.rs:772:21 [INFO] [stdout] | [INFO] [stdout] 772 | let mut current_func = self.function_table.get_mut(self.current_func.as_str()).unwrap(); [INFO] [stdout] | ----^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `params` is never read [INFO] [stdout] --> src/compiler.rs:852:48 [INFO] [stdout] | [INFO] [stdout] 852 | let mut params: Vec = Default::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `is_special` is never read [INFO] [stdout] --> src/compiler.rs:853:44 [INFO] [stdout] | [INFO] [stdout] 853 | let mut is_special: bool = false; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/compiler.rs:976:25 [INFO] [stdout] | [INFO] [stdout] 976 | let mut current_func = self.function_table.get_mut(self.current_func.as_str()).unwrap(); [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/compiler.rs:1023:25 [INFO] [stdout] | [INFO] [stdout] 1023 | let mut current_func = self.function_table.get_mut(self.current_func.as_str()).unwrap(); [INFO] [stdout] | ----^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n` [INFO] [stdout] --> src/vm.rs:657:32 [INFO] [stdout] | [INFO] [stdout] 657 | ... Ok(n) => { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `err` [INFO] [stdout] --> src/vm.rs:662:49 [INFO] [stdout] | [INFO] [stdout] 662 | ... Err(err) => panic!("Value cannot be parsed into int {}", input) [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_err` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `err` [INFO] [stdout] --> src/vm.rs:668:49 [INFO] [stdout] | [INFO] [stdout] 668 | ... Err(err) => panic!("Value cannot be parsed into float {}.", input) [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_err` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `LocalUpperLim` and `CteString` are never constructed [INFO] [stdout] --> src/memory.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 4 | pub enum BaseDirs { [INFO] [stdout] | -------- variants in this enum [INFO] [stdout] ... [INFO] [stdout] 15 | LocalUpperLim = 13000, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 28 | CteString = 33000, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `Position` is never constructed [INFO] [stdout] --> src/compiler.rs:89:5 [INFO] [stdout] | [INFO] [stdout] 50 | enum Actions { [INFO] [stdout] | ------- variant in this enum [INFO] [stdout] ... [INFO] [stdout] 89 | Position, // x, y // Done [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Actions` 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: unused variable: `n` [INFO] [stdout] --> src/vm.rs:657:32 [INFO] [stdout] | [INFO] [stdout] 657 | ... Ok(n) => { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `err` [INFO] [stdout] --> src/vm.rs:662:49 [INFO] [stdout] | [INFO] [stdout] 662 | ... Err(err) => panic!("Value cannot be parsed into int {}", input) [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_err` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `err` [INFO] [stdout] --> src/vm.rs:668:49 [INFO] [stdout] | [INFO] [stdout] 668 | ... Err(err) => panic!("Value cannot be parsed into float {}.", input) [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_err` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `LocalUpperLim` and `CteString` are never constructed [INFO] [stdout] --> src/memory.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 4 | pub enum BaseDirs { [INFO] [stdout] | -------- variants in this enum [INFO] [stdout] ... [INFO] [stdout] 15 | LocalUpperLim = 13000, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 28 | CteString = 33000, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `Position` is never constructed [INFO] [stdout] --> src/compiler.rs:89:5 [INFO] [stdout] | [INFO] [stdout] 50 | enum Actions { [INFO] [stdout] | ------- variant in this enum [INFO] [stdout] ... [INFO] [stdout] 89 | Position, // x, y // Done [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Actions` 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: this `impl` can be derived [INFO] [stdout] --> src/compiler.rs:26:1 [INFO] [stdout] | [INFO] [stdout] 26 | / impl Default for VarType { [INFO] [stdout] 27 | | fn default() -> Self { VarType::Void } [INFO] [stdout] 28 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 18 + #[derive(Default)] [INFO] [stdout] 19 | enum VarType { [INFO] [stdout] 20 | Int, [INFO] [stdout] ... [INFO] [stdout] 23 | Bool, [INFO] [stdout] 24 ~ #[default] [INFO] [stdout] 25 ~ Void [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/compiler.rs:108:21 [INFO] [stdout] | [INFO] [stdout] 108 | None => format!("_") [INFO] [stdout] | ^^^^^^^^^^^^ help: consider using `.to_string()`: `"_".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: useless use of `format!` [INFO] [stdout] --> src/compiler.rs:112:21 [INFO] [stdout] | [INFO] [stdout] 112 | None => format!("_") [INFO] [stdout] | ^^^^^^^^^^^^ help: consider using `.to_string()`: `"_".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: this boolean expression can be simplified [INFO] [stdout] --> src/compiler.rs:147:21 [INFO] [stdout] | [INFO] [stdout] 147 | else if l_op == VarType::Float && r_op == VarType::Float || [INFO] [stdout] | _____________________^ [INFO] [stdout] 148 | | l_op == VarType::Float && r_op == VarType::Int { Ok(VarType::Float)} [INFO] [stdout] | |______________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 147 - else if l_op == VarType::Float && r_op == VarType::Float || [INFO] [stdout] 148 - l_op == VarType::Float && r_op == VarType::Int { Ok(VarType::Float)} [INFO] [stdout] 147 + else if !(l_op != VarType::Float || r_op != VarType::Float && r_op != VarType::Int) { Ok(VarType::Float)} [INFO] [stdout] | [INFO] [stdout] 147 - else if l_op == VarType::Float && r_op == VarType::Float || [INFO] [stdout] 148 - l_op == VarType::Float && r_op == VarType::Int { Ok(VarType::Float)} [INFO] [stdout] 147 + else if (r_op == VarType::Int || r_op == VarType::Float) && l_op == VarType::Float { Ok(VarType::Float)} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/compiler.rs:160:16 [INFO] [stdout] | [INFO] [stdout] 160 | if l_op == VarType::Int && r_op == VarType::Int || [INFO] [stdout] | ________________^ [INFO] [stdout] 161 | | l_op == VarType::Float && r_op == VarType::Float || [INFO] [stdout] 162 | | l_op == VarType::Int && r_op == VarType::Float || [INFO] [stdout] 163 | | l_op == VarType::Float && r_op == VarType::Int || [INFO] [stdout] | |__________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 160 - if l_op == VarType::Int && r_op == VarType::Int || [INFO] [stdout] 161 - l_op == VarType::Float && r_op == VarType::Float || [INFO] [stdout] 162 - l_op == VarType::Int && r_op == VarType::Float || [INFO] [stdout] 163 - l_op == VarType::Float && r_op == VarType::Int || [INFO] [stdout] 160 + if !(l_op != VarType::Int && l_op != VarType::Float || r_op != VarType::Int && r_op != VarType::Float) || [INFO] [stdout] | [INFO] [stdout] 160 - if l_op == VarType::Int && r_op == VarType::Int || [INFO] [stdout] 161 - l_op == VarType::Float && r_op == VarType::Float || [INFO] [stdout] 162 - l_op == VarType::Int && r_op == VarType::Float || [INFO] [stdout] 163 - l_op == VarType::Float && r_op == VarType::Int || [INFO] [stdout] 160 + if (r_op == VarType::Float || r_op == VarType::Int) && (l_op == VarType::Float || l_op == VarType::Int) || [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/compiler.rs:142:17 [INFO] [stdout] | [INFO] [stdout] 142 | return Err(format!("Incompatible types: {:?} and {:?}, {:?}", l_op, r_op, action)); [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] 142 - return Err(format!("Incompatible types: {:?} and {:?}, {:?}", l_op, r_op, action)); [INFO] [stdout] 142 + Err(format!("Incompatible types: {:?} and {:?}, {:?}", l_op, r_op, action)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/compiler.rs:151:17 [INFO] [stdout] | [INFO] [stdout] 151 | return Err(format!("Incompatible types: {:?} and {:?}, {:?}", l_op, r_op, action)); [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] 151 - return Err(format!("Incompatible types: {:?} and {:?}, {:?}", l_op, r_op, action)); [INFO] [stdout] 151 + Err(format!("Incompatible types: {:?} and {:?}, {:?}", l_op, r_op, action)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/compiler.rs:168:17 [INFO] [stdout] | [INFO] [stdout] 168 | return Err(format!("Incompatible types: {:?} and {:?}, {:?}", l_op, r_op, action)); [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] 168 - return Err(format!("Incompatible types: {:?} and {:?}, {:?}", l_op, r_op, action)); [INFO] [stdout] 168 + Err(format!("Incompatible types: {:?} and {:?}, {:?}", l_op, r_op, action)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/compiler.rs:175:17 [INFO] [stdout] | [INFO] [stdout] 175 | return Err(format!("Incompatible types: {:?} and {:?}, {:?}", l_op, r_op, action)); [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] 175 - return Err(format!("Incompatible types: {:?} and {:?}, {:?}", l_op, r_op, action)); [INFO] [stdout] 175 + Err(format!("Incompatible types: {:?} and {:?}, {:?}", l_op, r_op, action)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/compiler.rs:26:1 [INFO] [stdout] | [INFO] [stdout] 26 | / impl Default for VarType { [INFO] [stdout] 27 | | fn default() -> Self { VarType::Void } [INFO] [stdout] 28 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 18 + #[derive(Default)] [INFO] [stdout] 19 | enum VarType { [INFO] [stdout] 20 | Int, [INFO] [stdout] ... [INFO] [stdout] 23 | Bool, [INFO] [stdout] 24 ~ #[default] [INFO] [stdout] 25 ~ Void [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/compiler.rs:108:21 [INFO] [stdout] | [INFO] [stdout] 108 | None => format!("_") [INFO] [stdout] | ^^^^^^^^^^^^ help: consider using `.to_string()`: `"_".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: useless use of `format!` [INFO] [stdout] --> src/compiler.rs:112:21 [INFO] [stdout] | [INFO] [stdout] 112 | None => format!("_") [INFO] [stdout] | ^^^^^^^^^^^^ help: consider using `.to_string()`: `"_".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: this boolean expression can be simplified [INFO] [stdout] --> src/compiler.rs:147:21 [INFO] [stdout] | [INFO] [stdout] 147 | else if l_op == VarType::Float && r_op == VarType::Float || [INFO] [stdout] | _____________________^ [INFO] [stdout] 148 | | l_op == VarType::Float && r_op == VarType::Int { Ok(VarType::Float)} [INFO] [stdout] | |______________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 147 - else if l_op == VarType::Float && r_op == VarType::Float || [INFO] [stdout] 148 - l_op == VarType::Float && r_op == VarType::Int { Ok(VarType::Float)} [INFO] [stdout] 147 + else if !(l_op != VarType::Float || r_op != VarType::Float && r_op != VarType::Int) { Ok(VarType::Float)} [INFO] [stdout] | [INFO] [stdout] 147 - else if l_op == VarType::Float && r_op == VarType::Float || [INFO] [stdout] 148 - l_op == VarType::Float && r_op == VarType::Int { Ok(VarType::Float)} [INFO] [stdout] 147 + else if (r_op == VarType::Int || r_op == VarType::Float) && l_op == VarType::Float { Ok(VarType::Float)} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/compiler.rs:160:16 [INFO] [stdout] | [INFO] [stdout] 160 | if l_op == VarType::Int && r_op == VarType::Int || [INFO] [stdout] | ________________^ [INFO] [stdout] 161 | | l_op == VarType::Float && r_op == VarType::Float || [INFO] [stdout] 162 | | l_op == VarType::Int && r_op == VarType::Float || [INFO] [stdout] 163 | | l_op == VarType::Float && r_op == VarType::Int || [INFO] [stdout] | |__________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 160 - if l_op == VarType::Int && r_op == VarType::Int || [INFO] [stdout] 161 - l_op == VarType::Float && r_op == VarType::Float || [INFO] [stdout] 162 - l_op == VarType::Int && r_op == VarType::Float || [INFO] [stdout] 163 - l_op == VarType::Float && r_op == VarType::Int || [INFO] [stdout] 160 + if !(l_op != VarType::Int && l_op != VarType::Float || r_op != VarType::Int && r_op != VarType::Float) || [INFO] [stdout] | [INFO] [stdout] 160 - if l_op == VarType::Int && r_op == VarType::Int || [INFO] [stdout] 161 - l_op == VarType::Float && r_op == VarType::Float || [INFO] [stdout] 162 - l_op == VarType::Int && r_op == VarType::Float || [INFO] [stdout] 163 - l_op == VarType::Float && r_op == VarType::Int || [INFO] [stdout] 160 + if (r_op == VarType::Float || r_op == VarType::Int) && (l_op == VarType::Float || l_op == VarType::Int) || [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/compiler.rs:142:17 [INFO] [stdout] | [INFO] [stdout] 142 | return Err(format!("Incompatible types: {:?} and {:?}, {:?}", l_op, r_op, action)); [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] 142 - return Err(format!("Incompatible types: {:?} and {:?}, {:?}", l_op, r_op, action)); [INFO] [stdout] 142 + Err(format!("Incompatible types: {:?} and {:?}, {:?}", l_op, r_op, action)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/compiler.rs:151:17 [INFO] [stdout] | [INFO] [stdout] 151 | return Err(format!("Incompatible types: {:?} and {:?}, {:?}", l_op, r_op, action)); [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] 151 - return Err(format!("Incompatible types: {:?} and {:?}, {:?}", l_op, r_op, action)); [INFO] [stdout] 151 + Err(format!("Incompatible types: {:?} and {:?}, {:?}", l_op, r_op, action)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/compiler.rs:168:17 [INFO] [stdout] | [INFO] [stdout] 168 | return Err(format!("Incompatible types: {:?} and {:?}, {:?}", l_op, r_op, action)); [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] 168 - return Err(format!("Incompatible types: {:?} and {:?}, {:?}", l_op, r_op, action)); [INFO] [stdout] 168 + Err(format!("Incompatible types: {:?} and {:?}, {:?}", l_op, r_op, action)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/compiler.rs:175:17 [INFO] [stdout] | [INFO] [stdout] 175 | return Err(format!("Incompatible types: {:?} and {:?}, {:?}", l_op, r_op, action)); [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] 175 - return Err(format!("Incompatible types: {:?} and {:?}, {:?}", l_op, r_op, action)); [INFO] [stdout] 175 + Err(format!("Incompatible types: {:?} and {:?}, {:?}", l_op, r_op, action)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/compiler.rs:259:13 [INFO] [stdout] | [INFO] [stdout] 259 | return Err(String::from(format!("Variable {} not declared yet.", var_name))); [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] 259 - return Err(String::from(format!("Variable {} not declared yet.", var_name))); [INFO] [stdout] 259 + Err(String::from(format!("Variable {} not declared yet.", var_name))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/compiler.rs:259:24 [INFO] [stdout] | [INFO] [stdout] 259 | return Err(String::from(format!("Variable {} not declared yet.", var_name))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `format!("Variable {} not declared yet.", var_name)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/compiler.rs:259:13 [INFO] [stdout] | [INFO] [stdout] 259 | return Err(String::from(format!("Variable {} not declared yet.", var_name))); [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] 259 - return Err(String::from(format!("Variable {} not declared yet.", var_name))); [INFO] [stdout] 259 + Err(String::from(format!("Variable {} not declared yet.", var_name))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/compiler.rs:259:24 [INFO] [stdout] | [INFO] [stdout] 259 | return Err(String::from(format!("Variable {} not declared yet.", var_name))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `format!("Variable {} not declared yet.", var_name)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `VarType` which implements the `Copy` trait [INFO] [stdout] --> src/compiler.rs:637:90 [INFO] [stdout] | [INFO] [stdout] 637 | ... self.op_vec.push(Var { Location: temp_loc.to_string(), Type: out_type.clone() }); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `out_type` [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: useless conversion to the same type: `pest::iterators::Pairs<'_, compiler::Rule>` [INFO] [stdout] --> src/compiler.rs:816:33 [INFO] [stdout] | [INFO] [stdout] 816 | for estatute in no_condicion_fields.into_iter() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `no_condicion_fields` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `VarType` which implements the `Copy` trait [INFO] [stdout] --> src/compiler.rs:637:90 [INFO] [stdout] | [INFO] [stdout] 637 | ... self.op_vec.push(Var { Location: temp_loc.to_string(), Type: out_type.clone() }); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `out_type` [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 `VarType` which implements the `Copy` trait [INFO] [stdout] --> src/compiler.rs:958:23 [INFO] [stdout] | [INFO] [stdout] 958 | ret_type: func_return_type.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `func_return_type` [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 conversion to the same type: `pest::iterators::Pairs<'_, compiler::Rule>` [INFO] [stdout] --> src/compiler.rs:816:33 [INFO] [stdout] | [INFO] [stdout] 816 | for estatute in no_condicion_fields.into_iter() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `no_condicion_fields` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `VarType` which implements the `Copy` trait [INFO] [stdout] --> src/compiler.rs:958:23 [INFO] [stdout] | [INFO] [stdout] 958 | ret_type: func_return_type.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `func_return_type` [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/compiler.rs:1119:13 [INFO] [stdout] | [INFO] [stdout] 1119 | write!(file, "{} {} {} {}\n", func.temp_vars.0, func.temp_vars.1, func.temp_vars.2, func.temp_vars.3)?; [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] 1119 - write!(file, "{} {} {} {}\n", func.temp_vars.0, func.temp_vars.1, func.temp_vars.2, func.temp_vars.3)?; [INFO] [stdout] 1119 + writeln!(file, "{} {} {} {}", func.temp_vars.0, func.temp_vars.1, func.temp_vars.2, func.temp_vars.3)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> src/vm.rs:76:9 [INFO] [stdout] | [INFO] [stdout] 76 | / for line in lines { [INFO] [stdout] 77 | | if let Ok(line) = line { [INFO] [stdout] 78 | | let mut info = line.split_whitespace(); [INFO] [stdout] 79 | | match info.next().unwrap() { [INFO] [stdout] ... | [INFO] [stdout] 241 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/vm.rs:77:13 [INFO] [stdout] | [INFO] [stdout] 77 | / if let Ok(line) = line { [INFO] [stdout] 78 | | let mut info = line.split_whitespace(); [INFO] [stdout] 79 | | match info.next().unwrap() { [INFO] [stdout] 80 | | "P" => { [INFO] [stdout] ... | [INFO] [stdout] 240 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] = note: `#[warn(clippy::manual_flatten)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 76 ~ for line in lines.flatten() { [INFO] [stdout] 77 + let mut info = line.split_whitespace(); [INFO] [stdout] 78 + match info.next().unwrap() { [INFO] [stdout] 79 + "P" => { [INFO] [stdout] 80 + let prog_name = info.next().unwrap(); [INFO] [stdout] 81 + info!("Program {}", prog_name); [INFO] [stdout] 82 + self.prog_name = prog_name.to_string(); [INFO] [stdout] 83 + } [INFO] [stdout] 84 + "C" => { [INFO] [stdout] 85 + let value = info.next().unwrap(); [INFO] [stdout] 86 + let location: i32 = info.next().unwrap().parse().unwrap(); [INFO] [stdout] 87 + let r#type = info.next().unwrap(); [INFO] [stdout] 88 + let final_val = match r#type { [INFO] [stdout] 89 + "Int" => VarValue::Int(value.parse().unwrap()), [INFO] [stdout] 90 + "Float" => VarValue::Float(value.parse().unwrap()), [INFO] [stdout] 91 + "Char" => VarValue::Char(value.to_string()), [INFO] [stdout] 92 + &_ => { unreachable!()} [INFO] [stdout] 93 + }; [INFO] [stdout] 94 + self.constants.insert(location, final_val); [INFO] [stdout] 95 + } [INFO] [stdout] 96 + "G" => { [INFO] [stdout] 97 + let globals: Vec = info.map(|s| i32::from_str(s).expect("Can't parse number")).collect(); [INFO] [stdout] 98 + self.global_memory.set_globals(globals[0], globals[1], globals[2]); [INFO] [stdout] 99 + } [INFO] [stdout] 100 + "F" => { [INFO] [stdout] 101 + let func_name = info.next().unwrap(); [INFO] [stdout] 102 + let func_start: usize = info.next().unwrap().parse().expect("Can't parse number"); [INFO] [stdout] 103 + let func_params: Vec = info.map(|s| i32::from_str(s).expect("Can't parse number")).collect(); [INFO] [stdout] 104 + [INFO] [stdout] 105 + let new_func = Func { [INFO] [stdout] 106 + locals: (func_params[0], func_params[1], func_params[2]), [INFO] [stdout] 107 + temps: (func_params[3], func_params[4], func_params[5], func_params[6]), [INFO] [stdout] 108 + start_loc: func_start [INFO] [stdout] 109 + }; [INFO] [stdout] 110 + [INFO] [stdout] 111 + self.func_list.insert(func_name.to_string(), new_func); [INFO] [stdout] 112 + } [INFO] [stdout] 113 + "A" => { [INFO] [stdout] 114 + let op = info.next().unwrap(); [INFO] [stdout] 115 + match op { [INFO] [stdout] 116 + // Actions that use number as out_op [INFO] [stdout] 117 + "Sum" | [INFO] [stdout] 118 + "Sub" | [INFO] [stdout] 119 + "Mult" | [INFO] [stdout] 120 + "Div" | [INFO] [stdout] 121 + "Mod" | [INFO] [stdout] 122 + "MoreThan" | [INFO] [stdout] 123 + "LessThan" | [INFO] [stdout] 124 + "LessOrEqualThan" | [INFO] [stdout] 125 + "MoreOrEqualThan" | [INFO] [stdout] 126 + "Equal" | [INFO] [stdout] 127 + "NotEqual" | [INFO] [stdout] 128 + "And" | [INFO] [stdout] 129 + "Or" | [INFO] [stdout] 130 + "Assign" | [INFO] [stdout] 131 + "Return" => { [INFO] [stdout] 132 + let params: Vec = info.map(|s| i32::from_str(s).unwrap()).collect(); [INFO] [stdout] 133 + let lh_op = Some(params[0]); [INFO] [stdout] 134 + let rh_op = Some(params[1]); [INFO] [stdout] 135 + let out_op = OutOp::Mem(params[2] as i32); [INFO] [stdout] 136 + let new_quad = Quadruple { [INFO] [stdout] 137 + op: op.to_string(), [INFO] [stdout] 138 + lh_op: lh_op, [INFO] [stdout] 139 + rh_op: rh_op, [INFO] [stdout] 140 + out_op: out_op [INFO] [stdout] 141 + }; [INFO] [stdout] 142 + self.quad_list.push(new_quad); [INFO] [stdout] 143 + } [INFO] [stdout] 144 + "GotoF" => { [INFO] [stdout] 145 + let params: Vec = info.map(|s| i32::from_str(s).unwrap()).collect(); [INFO] [stdout] 146 + let lh_op = Some(params[0]); [INFO] [stdout] 147 + let out_op = OutOp::Pos(params[2] as usize); [INFO] [stdout] 148 + let new_quad = Quadruple { [INFO] [stdout] 149 + op: op.to_string(), [INFO] [stdout] 150 + lh_op: lh_op, [INFO] [stdout] 151 + rh_op: None, [INFO] [stdout] 152 + out_op: out_op [INFO] [stdout] 153 + }; [INFO] [stdout] 154 + self.quad_list.push(new_quad); [INFO] [stdout] 155 + } [INFO] [stdout] 156 + "Goto" => { [INFO] [stdout] 157 + let params: Vec = info.map(|s| i32::from_str(s).unwrap()).collect(); [INFO] [stdout] 158 + let out_op = OutOp::Pos(params[2] as usize); [INFO] [stdout] 159 + let new_quad = Quadruple { [INFO] [stdout] 160 + op: op.to_string(), [INFO] [stdout] 161 + lh_op: None, [INFO] [stdout] 162 + rh_op: None, [INFO] [stdout] 163 + out_op: out_op [INFO] [stdout] 164 + }; [INFO] [stdout] 165 + self.quad_list.push(new_quad); [INFO] [stdout] 166 + } [INFO] [stdout] 167 + "Era" | "Gosub" => { [INFO] [stdout] 168 + let out_op = OutOp::Str(info.nth(2).unwrap().to_string()); [INFO] [stdout] 169 + let new_quad = Quadruple { [INFO] [stdout] 170 + op: op.to_string(), [INFO] [stdout] 171 + lh_op: None, [INFO] [stdout] 172 + rh_op: None, [INFO] [stdout] 173 + out_op: out_op [INFO] [stdout] 174 + }; [INFO] [stdout] 175 + self.quad_list.push(new_quad); [INFO] [stdout] 176 + } [INFO] [stdout] 177 + "Param" | "Read" => { [INFO] [stdout] 178 + let out_op = OutOp::Mem(info.nth(2).unwrap().parse::().unwrap()); [INFO] [stdout] 179 + let new_quad = Quadruple { [INFO] [stdout] 180 + op: op.to_string(), [INFO] [stdout] 181 + lh_op: None, [INFO] [stdout] 182 + rh_op: None, [INFO] [stdout] 183 + out_op: out_op [INFO] [stdout] 184 + }; [INFO] [stdout] 185 + self.quad_list.push(new_quad); [INFO] [stdout] 186 + } [INFO] [stdout] 187 + "Print" => { [INFO] [stdout] 188 + let info = info.skip(2); [INFO] [stdout] 189 + let print_vec: Vec = info.map(|s| s.to_string()).collect(); [INFO] [stdout] 190 + let print_out = print_vec.join(" "); [INFO] [stdout] 191 + if &print_out[0..1] == "\"" { [INFO] [stdout] 192 + let new_quad = Quadruple { [INFO] [stdout] 193 + op: op.to_string(), [INFO] [stdout] 194 + lh_op: None, [INFO] [stdout] 195 + rh_op: None, [INFO] [stdout] 196 + out_op: OutOp::Str(print_out) [INFO] [stdout] 197 + }; [INFO] [stdout] 198 + self.quad_list.push(new_quad); [INFO] [stdout] 199 + } else { [INFO] [stdout] 200 + let new_quad = Quadruple { [INFO] [stdout] 201 + op: op.to_string(), [INFO] [stdout] 202 + lh_op: None, [INFO] [stdout] 203 + rh_op: None, [INFO] [stdout] 204 + out_op: OutOp::Mem(print_out.parse().unwrap()) [INFO] [stdout] 205 + }; [INFO] [stdout] 206 + self.quad_list.push(new_quad); [INFO] [stdout] 207 + } [INFO] [stdout] 208 + } [INFO] [stdout] 209 + "EndFunc" | [INFO] [stdout] 210 + "EndFuncS" | [INFO] [stdout] 211 + "Forward" | [INFO] [stdout] 212 + "Backward" | [INFO] [stdout] 213 + "Left" | [INFO] [stdout] 214 + "Right" | [INFO] [stdout] 215 + "Center" | [INFO] [stdout] 216 + "PenUp" | [INFO] [stdout] 217 + "PenDown" | [INFO] [stdout] 218 + "Color" | [INFO] [stdout] 219 + "Size" | [INFO] [stdout] 220 + "Clear" | [INFO] [stdout] 221 + "Position" | [INFO] [stdout] 222 + "BackgroundColor" | [INFO] [stdout] 223 + "StartFill" | [INFO] [stdout] 224 + "EndFill" | [INFO] [stdout] 225 + "FillColor" => { // Special function because out is empty [INFO] [stdout] 226 + let new_quad = Quadruple { [INFO] [stdout] 227 + op: op.to_string(), [INFO] [stdout] 228 + lh_op: None, [INFO] [stdout] 229 + rh_op: None, [INFO] [stdout] 230 + out_op: OutOp::None [INFO] [stdout] 231 + }; [INFO] [stdout] 232 + self.quad_list.push(new_quad); [INFO] [stdout] 233 + } [INFO] [stdout] 234 + &_ => {error!("Missing action {}", op); unimplemented!()} [INFO] [stdout] 235 + } [INFO] [stdout] 236 + } [INFO] [stdout] 237 + &_ => { error!("Missing {}", info.nth(0).unwrap()); } [INFO] [stdout] 238 + } [INFO] [stdout] 239 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/compiler.rs:1119:13 [INFO] [stdout] | [INFO] [stdout] 1119 | write!(file, "{} {} {} {}\n", func.temp_vars.0, func.temp_vars.1, func.temp_vars.2, func.temp_vars.3)?; [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] 1119 - write!(file, "{} {} {} {}\n", func.temp_vars.0, func.temp_vars.1, func.temp_vars.2, func.temp_vars.3)?; [INFO] [stdout] 1119 + writeln!(file, "{} {} {} {}", func.temp_vars.0, func.temp_vars.1, func.temp_vars.2, func.temp_vars.3)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/vm.rs:136:57 [INFO] [stdout] | [INFO] [stdout] 136 | ... let out_op = OutOp::Mem(params[2] as i32); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `params[2]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> src/vm.rs:76:9 [INFO] [stdout] | [INFO] [stdout] 76 | / for line in lines { [INFO] [stdout] 77 | | if let Ok(line) = line { [INFO] [stdout] 78 | | let mut info = line.split_whitespace(); [INFO] [stdout] 79 | | match info.next().unwrap() { [INFO] [stdout] ... | [INFO] [stdout] 241 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/vm.rs:77:13 [INFO] [stdout] | [INFO] [stdout] 77 | / if let Ok(line) = line { [INFO] [stdout] 78 | | let mut info = line.split_whitespace(); [INFO] [stdout] 79 | | match info.next().unwrap() { [INFO] [stdout] 80 | | "P" => { [INFO] [stdout] ... | [INFO] [stdout] 240 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] = note: `#[warn(clippy::manual_flatten)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 76 ~ for line in lines.flatten() { [INFO] [stdout] 77 + let mut info = line.split_whitespace(); [INFO] [stdout] 78 + match info.next().unwrap() { [INFO] [stdout] 79 + "P" => { [INFO] [stdout] 80 + let prog_name = info.next().unwrap(); [INFO] [stdout] 81 + info!("Program {}", prog_name); [INFO] [stdout] 82 + self.prog_name = prog_name.to_string(); [INFO] [stdout] 83 + } [INFO] [stdout] 84 + "C" => { [INFO] [stdout] 85 + let value = info.next().unwrap(); [INFO] [stdout] 86 + let location: i32 = info.next().unwrap().parse().unwrap(); [INFO] [stdout] 87 + let r#type = info.next().unwrap(); [INFO] [stdout] 88 + let final_val = match r#type { [INFO] [stdout] 89 + "Int" => VarValue::Int(value.parse().unwrap()), [INFO] [stdout] 90 + "Float" => VarValue::Float(value.parse().unwrap()), [INFO] [stdout] 91 + "Char" => VarValue::Char(value.to_string()), [INFO] [stdout] 92 + &_ => { unreachable!()} [INFO] [stdout] 93 + }; [INFO] [stdout] 94 + self.constants.insert(location, final_val); [INFO] [stdout] 95 + } [INFO] [stdout] 96 + "G" => { [INFO] [stdout] 97 + let globals: Vec = info.map(|s| i32::from_str(s).expect("Can't parse number")).collect(); [INFO] [stdout] 98 + self.global_memory.set_globals(globals[0], globals[1], globals[2]); [INFO] [stdout] 99 + } [INFO] [stdout] 100 + "F" => { [INFO] [stdout] 101 + let func_name = info.next().unwrap(); [INFO] [stdout] 102 + let func_start: usize = info.next().unwrap().parse().expect("Can't parse number"); [INFO] [stdout] 103 + let func_params: Vec = info.map(|s| i32::from_str(s).expect("Can't parse number")).collect(); [INFO] [stdout] 104 + [INFO] [stdout] 105 + let new_func = Func { [INFO] [stdout] 106 + locals: (func_params[0], func_params[1], func_params[2]), [INFO] [stdout] 107 + temps: (func_params[3], func_params[4], func_params[5], func_params[6]), [INFO] [stdout] 108 + start_loc: func_start [INFO] [stdout] 109 + }; [INFO] [stdout] 110 + [INFO] [stdout] 111 + self.func_list.insert(func_name.to_string(), new_func); [INFO] [stdout] 112 + } [INFO] [stdout] 113 + "A" => { [INFO] [stdout] 114 + let op = info.next().unwrap(); [INFO] [stdout] 115 + match op { [INFO] [stdout] 116 + // Actions that use number as out_op [INFO] [stdout] 117 + "Sum" | [INFO] [stdout] 118 + "Sub" | [INFO] [stdout] 119 + "Mult" | [INFO] [stdout] 120 + "Div" | [INFO] [stdout] 121 + "Mod" | [INFO] [stdout] 122 + "MoreThan" | [INFO] [stdout] 123 + "LessThan" | [INFO] [stdout] 124 + "LessOrEqualThan" | [INFO] [stdout] 125 + "MoreOrEqualThan" | [INFO] [stdout] 126 + "Equal" | [INFO] [stdout] 127 + "NotEqual" | [INFO] [stdout] 128 + "And" | [INFO] [stdout] 129 + "Or" | [INFO] [stdout] 130 + "Assign" | [INFO] [stdout] 131 + "Return" => { [INFO] [stdout] 132 + let params: Vec = info.map(|s| i32::from_str(s).unwrap()).collect(); [INFO] [stdout] 133 + let lh_op = Some(params[0]); [INFO] [stdout] 134 + let rh_op = Some(params[1]); [INFO] [stdout] 135 + let out_op = OutOp::Mem(params[2] as i32); [INFO] [stdout] 136 + let new_quad = Quadruple { [INFO] [stdout] 137 + op: op.to_string(), [INFO] [stdout] 138 + lh_op: lh_op, [INFO] [stdout] 139 + rh_op: rh_op, [INFO] [stdout] 140 + out_op: out_op [INFO] [stdout] 141 + }; [INFO] [stdout] 142 + self.quad_list.push(new_quad); [INFO] [stdout] 143 + } [INFO] [stdout] 144 + "GotoF" => { [INFO] [stdout] 145 + let params: Vec = info.map(|s| i32::from_str(s).unwrap()).collect(); [INFO] [stdout] 146 + let lh_op = Some(params[0]); [INFO] [stdout] 147 + let out_op = OutOp::Pos(params[2] as usize); [INFO] [stdout] 148 + let new_quad = Quadruple { [INFO] [stdout] 149 + op: op.to_string(), [INFO] [stdout] 150 + lh_op: lh_op, [INFO] [stdout] 151 + rh_op: None, [INFO] [stdout] 152 + out_op: out_op [INFO] [stdout] 153 + }; [INFO] [stdout] 154 + self.quad_list.push(new_quad); [INFO] [stdout] 155 + } [INFO] [stdout] 156 + "Goto" => { [INFO] [stdout] 157 + let params: Vec = info.map(|s| i32::from_str(s).unwrap()).collect(); [INFO] [stdout] 158 + let out_op = OutOp::Pos(params[2] as usize); [INFO] [stdout] 159 + let new_quad = Quadruple { [INFO] [stdout] 160 + op: op.to_string(), [INFO] [stdout] 161 + lh_op: None, [INFO] [stdout] 162 + rh_op: None, [INFO] [stdout] 163 + out_op: out_op [INFO] [stdout] 164 + }; [INFO] [stdout] 165 + self.quad_list.push(new_quad); [INFO] [stdout] 166 + } [INFO] [stdout] 167 + "Era" | "Gosub" => { [INFO] [stdout] 168 + let out_op = OutOp::Str(info.nth(2).unwrap().to_string()); [INFO] [stdout] 169 + let new_quad = Quadruple { [INFO] [stdout] 170 + op: op.to_string(), [INFO] [stdout] 171 + lh_op: None, [INFO] [stdout] 172 + rh_op: None, [INFO] [stdout] 173 + out_op: out_op [INFO] [stdout] 174 + }; [INFO] [stdout] 175 + self.quad_list.push(new_quad); [INFO] [stdout] 176 + } [INFO] [stdout] 177 + "Param" | "Read" => { [INFO] [stdout] 178 + let out_op = OutOp::Mem(info.nth(2).unwrap().parse::().unwrap()); [INFO] [stdout] 179 + let new_quad = Quadruple { [INFO] [stdout] 180 + op: op.to_string(), [INFO] [stdout] 181 + lh_op: None, [INFO] [stdout] 182 + rh_op: None, [INFO] [stdout] 183 + out_op: out_op [INFO] [stdout] 184 + }; [INFO] [stdout] 185 + self.quad_list.push(new_quad); [INFO] [stdout] 186 + } [INFO] [stdout] 187 + "Print" => { [INFO] [stdout] 188 + let info = info.skip(2); [INFO] [stdout] 189 + let print_vec: Vec = info.map(|s| s.to_string()).collect(); [INFO] [stdout] 190 + let print_out = print_vec.join(" "); [INFO] [stdout] 191 + if &print_out[0..1] == "\"" { [INFO] [stdout] 192 + let new_quad = Quadruple { [INFO] [stdout] 193 + op: op.to_string(), [INFO] [stdout] 194 + lh_op: None, [INFO] [stdout] 195 + rh_op: None, [INFO] [stdout] 196 + out_op: OutOp::Str(print_out) [INFO] [stdout] 197 + }; [INFO] [stdout] 198 + self.quad_list.push(new_quad); [INFO] [stdout] 199 + } else { [INFO] [stdout] 200 + let new_quad = Quadruple { [INFO] [stdout] 201 + op: op.to_string(), [INFO] [stdout] 202 + lh_op: None, [INFO] [stdout] 203 + rh_op: None, [INFO] [stdout] 204 + out_op: OutOp::Mem(print_out.parse().unwrap()) [INFO] [stdout] 205 + }; [INFO] [stdout] 206 + self.quad_list.push(new_quad); [INFO] [stdout] 207 + } [INFO] [stdout] 208 + } [INFO] [stdout] 209 + "EndFunc" | [INFO] [stdout] 210 + "EndFuncS" | [INFO] [stdout] 211 + "Forward" | [INFO] [stdout] 212 + "Backward" | [INFO] [stdout] 213 + "Left" | [INFO] [stdout] 214 + "Right" | [INFO] [stdout] 215 + "Center" | [INFO] [stdout] 216 + "PenUp" | [INFO] [stdout] 217 + "PenDown" | [INFO] [stdout] 218 + "Color" | [INFO] [stdout] 219 + "Size" | [INFO] [stdout] 220 + "Clear" | [INFO] [stdout] 221 + "Position" | [INFO] [stdout] 222 + "BackgroundColor" | [INFO] [stdout] 223 + "StartFill" | [INFO] [stdout] 224 + "EndFill" | [INFO] [stdout] 225 + "FillColor" => { // Special function because out is empty [INFO] [stdout] 226 + let new_quad = Quadruple { [INFO] [stdout] 227 + op: op.to_string(), [INFO] [stdout] 228 + lh_op: None, [INFO] [stdout] 229 + rh_op: None, [INFO] [stdout] 230 + out_op: OutOp::None [INFO] [stdout] 231 + }; [INFO] [stdout] 232 + self.quad_list.push(new_quad); [INFO] [stdout] 233 + } [INFO] [stdout] 234 + &_ => {error!("Missing action {}", op); unimplemented!()} [INFO] [stdout] 235 + } [INFO] [stdout] 236 + } [INFO] [stdout] 237 + &_ => { error!("Missing {}", info.nth(0).unwrap()); } [INFO] [stdout] 238 + } [INFO] [stdout] 239 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/vm.rs:136:57 [INFO] [stdout] | [INFO] [stdout] 136 | ... let out_op = OutOp::Mem(params[2] as i32); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `params[2]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/vm.rs:380:44 [INFO] [stdout] | [INFO] [stdout] 380 | self.ip_stack.push(self.ip.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.ip` [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 `usize` which implements the `Copy` trait [INFO] [stdout] --> src/vm.rs:380:44 [INFO] [stdout] | [INFO] [stdout] 380 | self.ip_stack.push(self.ip.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.ip` [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: structure field `Type` should have a snake case name [INFO] [stdout] --> src/compiler.rs:32:5 [INFO] [stdout] | [INFO] [stdout] 32 | Type: VarType, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` (part of `#[warn(nonstandard_style)]`) on by default [INFO] [stdout] help: rename the identifier or convert it to a snake case raw identifier [INFO] [stdout] | [INFO] [stdout] 32 - Type: VarType, [INFO] [stdout] 32 + r#type: VarType, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: structure field `Location` should have a snake case name [INFO] [stdout] --> src/compiler.rs:33:5 [INFO] [stdout] | [INFO] [stdout] 33 | Location: String [INFO] [stdout] | ^^^^^^^^ help: convert the identifier to snake case: `location` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: structure field `Value` should have a snake case name [INFO] [stdout] --> src/compiler.rs:184:5 [INFO] [stdout] | [INFO] [stdout] 184 | Value: String, [INFO] [stdout] | ^^^^^ help: convert the identifier to snake case (notice the capitalization): `value` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: structure field `Type` should have a snake case name [INFO] [stdout] --> src/compiler.rs:185:5 [INFO] [stdout] | [INFO] [stdout] 185 | Type: VarType, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] help: rename the identifier or convert it to a snake case raw identifier [INFO] [stdout] | [INFO] [stdout] 185 - Type: VarType, [INFO] [stdout] 185 + r#type: VarType, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: structure field `Location` should have a snake case name [INFO] [stdout] --> src/compiler.rs:186:5 [INFO] [stdout] | [INFO] [stdout] 186 | Location: String [INFO] [stdout] | ^^^^^^^^ help: convert the identifier to snake case: `location` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `std::mem::drop` with a value that implements `Copy` does nothing [INFO] [stdout] --> src/compiler.rs:414:21 [INFO] [stdout] | [INFO] [stdout] 414 | drop(temp_loc); [INFO] [stdout] | ^^^^^--------^ [INFO] [stdout] | | [INFO] [stdout] | argument has type `i32` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dropping_copy_types)]` on by default [INFO] [stdout] help: use `let _ = ...` to ignore the expression or result [INFO] [stdout] | [INFO] [stdout] 414 - drop(temp_loc); [INFO] [stdout] 414 + let _ = temp_loc; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `VC` should have a snake case name [INFO] [stdout] --> src/compiler.rs:780:29 [INFO] [stdout] | [INFO] [stdout] 780 | let VC = Var { Location: new_loc.to_string(), Type: VarType::Int }; [INFO] [stdout] | ^^ help: convert the identifier to snake case (notice the capitalization): `vc` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `VF` should have a snake case name [INFO] [stdout] --> src/compiler.rs:781:29 [INFO] [stdout] | [INFO] [stdout] 781 | let VF = Var { Location: new_loc2.to_string(), Type: VarType::Int }; [INFO] [stdout] | ^^ help: convert the identifier to snake case (notice the capitalization): `vf` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `VC` should have a snake case name [INFO] [stdout] --> src/compiler.rs:791:29 [INFO] [stdout] | [INFO] [stdout] 791 | let VC = Var { Location: new_loc.to_string(), Type: VarType::Float }; [INFO] [stdout] | ^^ help: convert the identifier to snake case (notice the capitalization): `vc` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `VF` should have a snake case name [INFO] [stdout] --> src/compiler.rs:792:29 [INFO] [stdout] | [INFO] [stdout] 792 | let VF = Var { Location: new_loc2.to_string(), Type: VarType::Float }; [INFO] [stdout] | ^^ help: convert the identifier to snake case (notice the capitalization): `vf` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `VC` should have a snake case name [INFO] [stdout] --> src/compiler.rs:774:22 [INFO] [stdout] | [INFO] [stdout] 774 | let (VC, VF, temp_comp): (Var, Var, Var) = match control_var.Type { [INFO] [stdout] | ^^ help: convert the identifier to snake case (notice the capitalization): `vc` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `VF` should have a snake case name [INFO] [stdout] --> src/compiler.rs:774:26 [INFO] [stdout] | [INFO] [stdout] 774 | let (VC, VF, temp_comp): (Var, Var, Var) = match control_var.Type { [INFO] [stdout] | ^^ help: convert the identifier to snake case (notice the capitalization): `vf` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/compiler.rs:1105:9 [INFO] [stdout] | [INFO] [stdout] 1105 | writeln!(file, "P {}", self.program_name); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 1105 | let _ = writeln!(file, "P {}", self.program_name); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: structure field `Type` should have a snake case name [INFO] [stdout] --> src/compiler.rs:32:5 [INFO] [stdout] | [INFO] [stdout] 32 | Type: VarType, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` (part of `#[warn(nonstandard_style)]`) on by default [INFO] [stdout] help: rename the identifier or convert it to a snake case raw identifier [INFO] [stdout] | [INFO] [stdout] 32 - Type: VarType, [INFO] [stdout] 32 + r#type: VarType, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: structure field `Location` should have a snake case name [INFO] [stdout] --> src/compiler.rs:33:5 [INFO] [stdout] | [INFO] [stdout] 33 | Location: String [INFO] [stdout] | ^^^^^^^^ help: convert the identifier to snake case: `location` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: structure field `Value` should have a snake case name [INFO] [stdout] --> src/compiler.rs:184:5 [INFO] [stdout] | [INFO] [stdout] 184 | Value: String, [INFO] [stdout] | ^^^^^ help: convert the identifier to snake case (notice the capitalization): `value` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: structure field `Type` should have a snake case name [INFO] [stdout] --> src/compiler.rs:185:5 [INFO] [stdout] | [INFO] [stdout] 185 | Type: VarType, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] help: rename the identifier or convert it to a snake case raw identifier [INFO] [stdout] | [INFO] [stdout] 185 - Type: VarType, [INFO] [stdout] 185 + r#type: VarType, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: structure field `Location` should have a snake case name [INFO] [stdout] --> src/compiler.rs:186:5 [INFO] [stdout] | [INFO] [stdout] 186 | Location: String [INFO] [stdout] | ^^^^^^^^ help: convert the identifier to snake case: `location` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `std::mem::drop` with a value that implements `Copy` does nothing [INFO] [stdout] --> src/compiler.rs:414:21 [INFO] [stdout] | [INFO] [stdout] 414 | drop(temp_loc); [INFO] [stdout] | ^^^^^--------^ [INFO] [stdout] | | [INFO] [stdout] | argument has type `i32` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dropping_copy_types)]` on by default [INFO] [stdout] help: use `let _ = ...` to ignore the expression or result [INFO] [stdout] | [INFO] [stdout] 414 - drop(temp_loc); [INFO] [stdout] 414 + let _ = temp_loc; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `VC` should have a snake case name [INFO] [stdout] --> src/compiler.rs:780:29 [INFO] [stdout] | [INFO] [stdout] 780 | let VC = Var { Location: new_loc.to_string(), Type: VarType::Int }; [INFO] [stdout] | ^^ help: convert the identifier to snake case (notice the capitalization): `vc` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `VF` should have a snake case name [INFO] [stdout] --> src/compiler.rs:781:29 [INFO] [stdout] | [INFO] [stdout] 781 | let VF = Var { Location: new_loc2.to_string(), Type: VarType::Int }; [INFO] [stdout] | ^^ help: convert the identifier to snake case (notice the capitalization): `vf` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `VC` should have a snake case name [INFO] [stdout] --> src/compiler.rs:791:29 [INFO] [stdout] | [INFO] [stdout] 791 | let VC = Var { Location: new_loc.to_string(), Type: VarType::Float }; [INFO] [stdout] | ^^ help: convert the identifier to snake case (notice the capitalization): `vc` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `VF` should have a snake case name [INFO] [stdout] --> src/compiler.rs:792:29 [INFO] [stdout] | [INFO] [stdout] 792 | let VF = Var { Location: new_loc2.to_string(), Type: VarType::Float }; [INFO] [stdout] | ^^ help: convert the identifier to snake case (notice the capitalization): `vf` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `VC` should have a snake case name [INFO] [stdout] --> src/compiler.rs:774:22 [INFO] [stdout] | [INFO] [stdout] 774 | let (VC, VF, temp_comp): (Var, Var, Var) = match control_var.Type { [INFO] [stdout] | ^^ help: convert the identifier to snake case (notice the capitalization): `vc` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `VF` should have a snake case name [INFO] [stdout] --> src/compiler.rs:774:26 [INFO] [stdout] | [INFO] [stdout] 774 | let (VC, VF, temp_comp): (Var, Var, Var) = match control_var.Type { [INFO] [stdout] | ^^ help: convert the identifier to snake case (notice the capitalization): `vf` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/compiler.rs:1105:9 [INFO] [stdout] | [INFO] [stdout] 1105 | writeln!(file, "P {}", self.program_name); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 1105 | let _ = writeln!(file, "P {}", self.program_name); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 47.35s [INFO] [stderr] warning: the following packages contain code that will be rejected by a future version of Rust: svg v0.8.0 [INFO] [stderr] note: to see what the problems were, use the option `--future-incompat-report`, or run `cargo report future-incompatibilities --id 3` [INFO] running `Command { std: "docker" "inspect" "a49874bc938fbf6da814c074e9c64e8cd6c78371c52c1a40062bca325b806f7f", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "a49874bc938fbf6da814c074e9c64e8cd6c78371c52c1a40062bca325b806f7f", kill_on_drop: false }` [INFO] [stdout] a49874bc938fbf6da814c074e9c64e8cd6c78371c52c1a40062bca325b806f7f