[INFO] cloning repository https://github.com/aceinetx/rbf [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/aceinetx/rbf" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Faceinetx%2Frbf", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Faceinetx%2Frbf'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] fd76c750f41dd51099b80273179c3b8963fa35ca [INFO] linting aceinetx/rbf against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Faceinetx%2Frbf" "/workspace/builds/worker-3-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-3-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/aceinetx/rbf [INFO] finished tweaking git repo https://github.com/aceinetx/rbf [INFO] tweaked toml for git repo https://github.com/aceinetx/rbf written to /workspace/builds/worker-3-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/aceinetx/rbf 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/aceinetx/rbf 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 crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded getch v0.3.1 [INFO] [stderr] Downloaded hlua v0.4.1 [INFO] [stderr] Downloaded colorful v0.2.2 [INFO] [stderr] Downloaded lua52-sys v0.1.2 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 8c2c1b61a1be43e01b08ffff736f4b28364932d1e3b4203f786530567423bbe0 [INFO] running `Command { std: "docker" "start" "-a" "8c2c1b61a1be43e01b08ffff736f4b28364932d1e3b4203f786530567423bbe0", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "8c2c1b61a1be43e01b08ffff736f4b28364932d1e3b4203f786530567423bbe0", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "8c2c1b61a1be43e01b08ffff736f4b28364932d1e3b4203f786530567423bbe0", kill_on_drop: false }` [INFO] [stdout] 8c2c1b61a1be43e01b08ffff736f4b28364932d1e3b4203f786530567423bbe0 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 82b535b3f9bbe61ded09aebd1a787b75a20ecfa3e3979328b676acb46533ce65 [INFO] running `Command { std: "docker" "start" "-a" "82b535b3f9bbe61ded09aebd1a787b75a20ecfa3e3979328b676acb46533ce65", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.150 [INFO] [stderr] Checking colorful v0.2.2 [INFO] [stderr] Compiling cc v1.0.83 [INFO] [stderr] Checking termios v0.3.3 [INFO] [stderr] Checking getch v0.3.1 [INFO] [stderr] Compiling lua52-sys v0.1.2 [INFO] [stderr] Checking hlua v0.4.1 [INFO] [stderr] Checking rBF v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unnecessary parentheses around function argument [INFO] [stdout] --> src/main.rs:306:37 [INFO] [stdout] | [INFO] [stdout] 306 | sleep(Duration::new((delay as u64), 0)); [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 306 - sleep(Duration::new((delay as u64), 0)); [INFO] [stdout] 306 + sleep(Duration::new(delay as u64 , 0)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable expression [INFO] [stdout] --> src/main.rs:312:17 [INFO] [stdout] | [INFO] [stdout] 311 | process::exit(code); [INFO] [stdout] | ------------------- any code following this expression is unreachable [INFO] [stdout] 312 | 0 [INFO] [stdout] | ^ unreachable expression [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unreachable_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:149:18 [INFO] [stdout] | [INFO] [stdout] 149 | fn bf_clean_code(mut code: &mut String){ [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/main.rs:286:17 [INFO] [stdout] | [INFO] [stdout] 286 | let mut lua = &mut llua; [INFO] [stdout] | ----^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `x` [INFO] [stdout] --> src/main.rs:349:57 [INFO] [stdout] | [INFO] [stdout] 349 | lua.set("rbf_setptr", hlua::function1(move |x: i32| -> i32 {- [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_x` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static `FILE_SOURCE` is never used [INFO] [stdout] --> src/main.rs:17:12 [INFO] [stdout] | [INFO] [stdout] 17 | static mut FILE_SOURCE: &str = "stdin"; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `check_ptr_cell` is never used [INFO] [stdout] --> src/main.rs:52:4 [INFO] [stdout] | [INFO] [stdout] 52 | fn check_ptr_cell(){ [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `move_pointer` is never used [INFO] [stdout] --> src/main.rs:131:4 [INFO] [stdout] | [INFO] [stdout] 131 | fn move_pointer(move_steps: i32){ [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/main.rs:14:40 [INFO] [stdout] | [INFO] [stdout] 14 | static mut llua: Lazy = Lazy::new(|| Lua::new()); [INFO] [stdout] | ^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Lua::new` [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: redundant closure [INFO] [stdout] --> src/main.rs:15:71 [INFO] [stdout] | [INFO] [stdout] 15 | static mut custom_commands: Lazy> = Lazy::new(|| HashMap::new()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `HashMap::new` [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: redundant closure [INFO] [stdout] --> src/main.rs:16:73 [INFO] [stdout] | [INFO] [stdout] 16 | static mut custom_instructions: Lazy> = Lazy::new(|| HashMap::new()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `HashMap::new` [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: useless use of `format!` [INFO] [stdout] --> src/main.rs:29:15 [INFO] [stdout] | [INFO] [stdout] 29 | let txt = format!("{text}").color(RGB::new(_r, _g, _b)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `text.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/main.rs:34:15 [INFO] [stdout] | [INFO] [stdout] 34 | let txt = format!("{text}").color(RGB::new(_r, _g, _b)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `text.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: unneeded `return` statement [INFO] [stdout] --> src/main.rs:49:5 [INFO] [stdout] | [INFO] [stdout] 49 | return value; [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] 49 - return value; [INFO] [stdout] 49 + value [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:145:9 [INFO] [stdout] | [INFO] [stdout] 145 | return (BF_MEMORY[clamp(pointer_index, 0, MEMORY_CELLS-1) as usize] as u8) as i32; [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] 145 - return (BF_MEMORY[clamp(pointer_index, 0, MEMORY_CELLS-1) as usize] as u8) as i32; [INFO] [stdout] 145 + (BF_MEMORY[clamp(pointer_index, 0, MEMORY_CELLS-1) as usize] as u8) as i32 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:266:5 [INFO] [stdout] | [INFO] [stdout] 266 | return 0; [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] 266 - return 0; [INFO] [stdout] 266 + 0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:170:13 [INFO] [stdout] | [INFO] [stdout] 170 | / if SKIP_LOOP{ [INFO] [stdout] 171 | | if c != ']' { [INFO] [stdout] 172 | | idx += 1; [INFO] [stdout] 173 | | continue; [INFO] [stdout] 174 | | } [INFO] [stdout] 175 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 170 ~ if SKIP_LOOP [INFO] [stdout] 171 ~ && c != ']' { [INFO] [stdout] 172 | idx += 1; [INFO] [stdout] 173 | continue; [INFO] [stdout] 174 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/main.rs:218:31 [INFO] [stdout] | [INFO] [stdout] 218 | let buf = String::from(current_value.to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `current_value.to_string()` [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 `usize` which implements the `Copy` trait [INFO] [stdout] --> src/main.rs:226:43 [INFO] [stdout] | [INFO] [stdout] 226 | BF_JUMPSTACK.push(idx.clone() as i32); [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `idx` [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: equality checks against true are unnecessary [INFO] [stdout] --> src/main.rs:236:24 [INFO] [stdout] | [INFO] [stdout] 236 | if SKIP_LOOP == true{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `SKIP_LOOP` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/main.rs:242:24 [INFO] [stdout] | [INFO] [stdout] 242 | if BF_JUMPSTACK.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!BF_JUMPSTACK.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/main.rs:263:50 [INFO] [stdout] | [INFO] [stdout] 263 | check_ptr_cell_with_source(code.clone(), (idx as usize).try_into().unwrap(), Some(ln)); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `idx` [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: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:283:12 [INFO] [stdout] | [INFO] [stdout] 283 | if !contents.is_err() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `contents.is_ok()` [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: called `unwrap` on `contents` after checking its variant with `is_err` [INFO] [stdout] --> src/main.rs:392:25 [INFO] [stdout] | [INFO] [stdout] 283 | if !contents.is_err() { [INFO] [stdout] | ----------------- the check is happening here [INFO] [stdout] ... [INFO] [stdout] 392 | let _code = contents.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: useless use of `format!` [INFO] [stdout] --> src/main.rs:291:27 [INFO] [stdout] | [INFO] [stdout] 291 | rgb_print(format!("{}", x).as_str(), 252, 140, 3); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `x.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: useless use of `format!` [INFO] [stdout] --> src/main.rs:296:27 [INFO] [stdout] | [INFO] [stdout] 296 | rgb_print(format!("{}", x).as_str(), 255, 0, 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `x.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: useless use of `format!` [INFO] [stdout] --> src/main.rs:301:27 [INFO] [stdout] | [INFO] [stdout] 301 | rgb_print(format!("{}", x).as_str(), r.try_into().unwrap(), g.try_into().unwrap(), b.try_into().unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `x.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: unneeded `return` statement [INFO] [stdout] --> src/main.rs:362:17 [INFO] [stdout] | [INFO] [stdout] 362 | return read_memory(x); [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] 362 - return read_memory(x); [INFO] [stdout] 362 + read_memory(x) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:379:17 [INFO] [stdout] | [INFO] [stdout] 379 | return BF_MEMORY.clone(); [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] 379 - return BF_MEMORY.clone(); [INFO] [stdout] 379 + BF_MEMORY.clone() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:383:17 [INFO] [stdout] | [INFO] [stdout] 383 | return POINTER_CELL.clone(); [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] 383 - return POINTER_CELL.clone(); [INFO] [stdout] 383 + POINTER_CELL.clone() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/main.rs:383:24 [INFO] [stdout] | [INFO] [stdout] 383 | return POINTER_CELL.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `POINTER_CELL` [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/main.rs:387:56 [INFO] [stdout] | [INFO] [stdout] 387 | raise_error("ScriptingError:LuaError", format!("{}", x).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `x.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/main.rs:519:12 [INFO] [stdout] | [INFO] [stdout] 519 | if !contents.is_err() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `contents.is_ok()` [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: called `unwrap` on `contents` after checking its variant with `is_err` [INFO] [stdout] --> src/main.rs:520:25 [INFO] [stdout] | [INFO] [stdout] 519 | if !contents.is_err() { [INFO] [stdout] | ----------------- the check is happening here [INFO] [stdout] 520 | let _code = contents.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: redundant closure [INFO] [stdout] --> src/main.rs:492:38 [INFO] [stdout] | [INFO] [stdout] 492 | llua = Lazy::new(|| Lua::new()); [INFO] [stdout] | ^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Lua::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `l` is used as a loop counter [INFO] [stdout] --> src/main.rs:522:13 [INFO] [stdout] | [INFO] [stdout] 522 | for line in _code.split("\n"){ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (l, line) in _code.split("\n").enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] = note: `#[warn(clippy::explicit_counter_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static variable `llua` should have an upper case name [INFO] [stdout] --> src/main.rs:14:12 [INFO] [stdout] | [INFO] [stdout] 14 | static mut llua: Lazy = Lazy::new(|| Lua::new()); [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_upper_case_globals)]` (part of `#[warn(nonstandard_style)]`) on by default [INFO] [stdout] help: convert the identifier to upper case [INFO] [stdout] | [INFO] [stdout] 14 - static mut llua: Lazy = Lazy::new(|| Lua::new()); [INFO] [stdout] 14 + static mut LLUA: Lazy = Lazy::new(|| Lua::new()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static variable `custom_commands` should have an upper case name [INFO] [stdout] --> src/main.rs:15:12 [INFO] [stdout] | [INFO] [stdout] 15 | static mut custom_commands: Lazy> = Lazy::new(|| HashMap::new()); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: convert the identifier to upper case [INFO] [stdout] | [INFO] [stdout] 15 - static mut custom_commands: Lazy> = Lazy::new(|| HashMap::new()); [INFO] [stdout] 15 + static mut CUSTOM_COMMANDS: Lazy> = Lazy::new(|| HashMap::new()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static variable `custom_instructions` should have an upper case name [INFO] [stdout] --> src/main.rs:16:12 [INFO] [stdout] | [INFO] [stdout] 16 | static mut custom_instructions: Lazy> = Lazy::new(|| HashMap::new()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: convert the identifier to upper case [INFO] [stdout] | [INFO] [stdout] 16 - static mut custom_instructions: Lazy> = Lazy::new(|| HashMap::new()); [INFO] [stdout] 16 + static mut CUSTOM_INSTRUCTIONS: Lazy> = Lazy::new(|| HashMap::new()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/main.rs:151:12 [INFO] [stdout] | [INFO] [stdout] 151 | if custom_instructions.is_empty() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/main.rs:181:25 [INFO] [stdout] | [INFO] [stdout] 181 | if !USED_MEMORY_CELLS_INDEXES.contains(&POINTER_CELL) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/main.rs:181:60 [INFO] [stdout] | [INFO] [stdout] 181 | if !USED_MEMORY_CELLS_INDEXES.contains(&POINTER_CELL) { [INFO] [stdout] | ^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: use `&raw const` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 181 | if !USED_MEMORY_CELLS_INDEXES.contains(&raw const POINTER_CELL) { [INFO] [stdout] | +++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/main.rs:182:25 [INFO] [stdout] | [INFO] [stdout] 182 | USED_MEMORY_CELLS_INDEXES.push(POINTER_CELL); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/main.rs:189:25 [INFO] [stdout] | [INFO] [stdout] 189 | if !USED_MEMORY_CELLS_INDEXES.contains(&POINTER_CELL) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/main.rs:189:60 [INFO] [stdout] | [INFO] [stdout] 189 | if !USED_MEMORY_CELLS_INDEXES.contains(&POINTER_CELL) { [INFO] [stdout] | ^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: use `&raw const` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 189 | if !USED_MEMORY_CELLS_INDEXES.contains(&raw const POINTER_CELL) { [INFO] [stdout] | +++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/main.rs:190:25 [INFO] [stdout] | [INFO] [stdout] 190 | USED_MEMORY_CELLS_INDEXES.push(POINTER_CELL); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/main.rs:226:25 [INFO] [stdout] | [INFO] [stdout] 226 | BF_JUMPSTACK.push(idx.clone() as i32); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/main.rs:242:24 [INFO] [stdout] | [INFO] [stdout] 242 | if BF_JUMPSTACK.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/main.rs:245:48 [INFO] [stdout] | [INFO] [stdout] 245 | ... idx = BF_JUMPSTACK[BF_JUMPSTACK.len() - 1] as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/main.rs:247:29 [INFO] [stdout] | [INFO] [stdout] 247 | ... BF_JUMPSTACK.pop(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/main.rs:255:37 [INFO] [stdout] | [INFO] [stdout] 255 | for (inst, funcname) in custom_instructions.clone(){ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/main.rs:257:58 [INFO] [stdout] | [INFO] [stdout] 257 | let mut func: hlua::LuaFunction<_> = llua.get(funcname).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/main.rs:271:9 [INFO] [stdout] | [INFO] [stdout] 271 | BF_MEMORY.clear(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/main.rs:274:17 [INFO] [stdout] | [INFO] [stdout] 274 | BF_MEMORY.push(0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/main.rs:286:27 [INFO] [stdout] | [INFO] [stdout] 286 | let mut lua = &mut llua; [INFO] [stdout] | ^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 286 | let mut lua = &raw mut llua; [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/main.rs:316:20 [INFO] [stdout] | [INFO] [stdout] 316 | if BF_MEMORY.is_empty() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/main.rs:327:20 [INFO] [stdout] | [INFO] [stdout] 327 | if BF_MEMORY.is_empty() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/main.rs:338:17 [INFO] [stdout] | [INFO] [stdout] 338 | custom_commands.insert(format!("!{cmd}"), funcname); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/main.rs:344:17 [INFO] [stdout] | [INFO] [stdout] 344 | custom_instructions.insert(inst.chars().collect::>()[0], funcname); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/main.rs:379:24 [INFO] [stdout] | [INFO] [stdout] 379 | return BF_MEMORY.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/main.rs:383:24 [INFO] [stdout] | [INFO] [stdout] 383 | return POINTER_CELL.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/main.rs:449:59 [INFO] [stdout] | [INFO] [stdout] 449 | rgb_println(format!("rBF v1.0 (repl, memlen: {MEMORY_CELLS}) !cmds - cmd list").as_str(), 3, 252, 202); [INFO] [stdout] | ^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/main.rs:456:31 [INFO] [stdout] | [INFO] [stdout] 456 | unsafe { print!("{POINTER_CELL} >> "); } [INFO] [stdout] | ^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/main.rs:479:37 [INFO] [stdout] | [INFO] [stdout] 479 | for mem_cell in &USED_MEMORY_CELLS_INDEXES { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: use `&raw const` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 479 | for mem_cell in &raw const USED_MEMORY_CELLS_INDEXES { [INFO] [stdout] | +++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/main.rs:493:21 [INFO] [stdout] | [INFO] [stdout] 493 | custom_commands.clear(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/main.rs:494:21 [INFO] [stdout] | [INFO] [stdout] 494 | custom_instructions.clear(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/main.rs:500:44 [INFO] [stdout] | [INFO] [stdout] 500 | for (cmd, funcname) in custom_commands.clone() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/main.rs:502:66 [INFO] [stdout] | [INFO] [stdout] 502 | ... let mut func: hlua::LuaFunction<_> = llua.get(funcname).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around function argument [INFO] [stdout] --> src/main.rs:306:37 [INFO] [stdout] | [INFO] [stdout] 306 | sleep(Duration::new((delay as u64), 0)); [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 306 - sleep(Duration::new((delay as u64), 0)); [INFO] [stdout] 306 + sleep(Duration::new(delay as u64 , 0)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable expression [INFO] [stdout] --> src/main.rs:312:17 [INFO] [stdout] | [INFO] [stdout] 311 | process::exit(code); [INFO] [stdout] | ------------------- any code following this expression is unreachable [INFO] [stdout] 312 | 0 [INFO] [stdout] | ^ unreachable expression [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unreachable_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:149:18 [INFO] [stdout] | [INFO] [stdout] 149 | fn bf_clean_code(mut code: &mut String){ [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/main.rs:286:17 [INFO] [stdout] | [INFO] [stdout] 286 | let mut lua = &mut llua; [INFO] [stdout] | ----^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `x` [INFO] [stdout] --> src/main.rs:349:57 [INFO] [stdout] | [INFO] [stdout] 349 | lua.set("rbf_setptr", hlua::function1(move |x: i32| -> i32 {- [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_x` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static `FILE_SOURCE` is never used [INFO] [stdout] --> src/main.rs:17:12 [INFO] [stdout] | [INFO] [stdout] 17 | static mut FILE_SOURCE: &str = "stdin"; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `check_ptr_cell` is never used [INFO] [stdout] --> src/main.rs:52:4 [INFO] [stdout] | [INFO] [stdout] 52 | fn check_ptr_cell(){ [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `move_pointer` is never used [INFO] [stdout] --> src/main.rs:131:4 [INFO] [stdout] | [INFO] [stdout] 131 | fn move_pointer(move_steps: i32){ [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/main.rs:14:40 [INFO] [stdout] | [INFO] [stdout] 14 | static mut llua: Lazy = Lazy::new(|| Lua::new()); [INFO] [stdout] | ^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Lua::new` [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: redundant closure [INFO] [stdout] --> src/main.rs:15:71 [INFO] [stdout] | [INFO] [stdout] 15 | static mut custom_commands: Lazy> = Lazy::new(|| HashMap::new()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `HashMap::new` [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: redundant closure [INFO] [stdout] --> src/main.rs:16:73 [INFO] [stdout] | [INFO] [stdout] 16 | static mut custom_instructions: Lazy> = Lazy::new(|| HashMap::new()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `HashMap::new` [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: useless use of `format!` [INFO] [stdout] --> src/main.rs:29:15 [INFO] [stdout] | [INFO] [stdout] 29 | let txt = format!("{text}").color(RGB::new(_r, _g, _b)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `text.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/main.rs:34:15 [INFO] [stdout] | [INFO] [stdout] 34 | let txt = format!("{text}").color(RGB::new(_r, _g, _b)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `text.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: unneeded `return` statement [INFO] [stdout] --> src/main.rs:49:5 [INFO] [stdout] | [INFO] [stdout] 49 | return value; [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] 49 - return value; [INFO] [stdout] 49 + value [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:145:9 [INFO] [stdout] | [INFO] [stdout] 145 | return (BF_MEMORY[clamp(pointer_index, 0, MEMORY_CELLS-1) as usize] as u8) as i32; [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] 145 - return (BF_MEMORY[clamp(pointer_index, 0, MEMORY_CELLS-1) as usize] as u8) as i32; [INFO] [stdout] 145 + (BF_MEMORY[clamp(pointer_index, 0, MEMORY_CELLS-1) as usize] as u8) as i32 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:266:5 [INFO] [stdout] | [INFO] [stdout] 266 | return 0; [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] 266 - return 0; [INFO] [stdout] 266 + 0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:170:13 [INFO] [stdout] | [INFO] [stdout] 170 | / if SKIP_LOOP{ [INFO] [stdout] 171 | | if c != ']' { [INFO] [stdout] 172 | | idx += 1; [INFO] [stdout] 173 | | continue; [INFO] [stdout] 174 | | } [INFO] [stdout] 175 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 170 ~ if SKIP_LOOP [INFO] [stdout] 171 ~ && c != ']' { [INFO] [stdout] 172 | idx += 1; [INFO] [stdout] 173 | continue; [INFO] [stdout] 174 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/main.rs:218:31 [INFO] [stdout] | [INFO] [stdout] 218 | let buf = String::from(current_value.to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `current_value.to_string()` [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 `usize` which implements the `Copy` trait [INFO] [stdout] --> src/main.rs:226:43 [INFO] [stdout] | [INFO] [stdout] 226 | BF_JUMPSTACK.push(idx.clone() as i32); [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `idx` [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: equality checks against true are unnecessary [INFO] [stdout] --> src/main.rs:236:24 [INFO] [stdout] | [INFO] [stdout] 236 | if SKIP_LOOP == true{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `SKIP_LOOP` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/main.rs:242:24 [INFO] [stdout] | [INFO] [stdout] 242 | if BF_JUMPSTACK.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!BF_JUMPSTACK.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/main.rs:263:50 [INFO] [stdout] | [INFO] [stdout] 263 | check_ptr_cell_with_source(code.clone(), (idx as usize).try_into().unwrap(), Some(ln)); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `idx` [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: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:283:12 [INFO] [stdout] | [INFO] [stdout] 283 | if !contents.is_err() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `contents.is_ok()` [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: called `unwrap` on `contents` after checking its variant with `is_err` [INFO] [stdout] --> src/main.rs:392:25 [INFO] [stdout] | [INFO] [stdout] 283 | if !contents.is_err() { [INFO] [stdout] | ----------------- the check is happening here [INFO] [stdout] ... [INFO] [stdout] 392 | let _code = contents.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: useless use of `format!` [INFO] [stdout] --> src/main.rs:291:27 [INFO] [stdout] | [INFO] [stdout] 291 | rgb_print(format!("{}", x).as_str(), 252, 140, 3); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `x.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: useless use of `format!` [INFO] [stdout] --> src/main.rs:296:27 [INFO] [stdout] | [INFO] [stdout] 296 | rgb_print(format!("{}", x).as_str(), 255, 0, 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `x.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: useless use of `format!` [INFO] [stdout] --> src/main.rs:301:27 [INFO] [stdout] | [INFO] [stdout] 301 | rgb_print(format!("{}", x).as_str(), r.try_into().unwrap(), g.try_into().unwrap(), b.try_into().unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `x.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: unneeded `return` statement [INFO] [stdout] --> src/main.rs:362:17 [INFO] [stdout] | [INFO] [stdout] 362 | return read_memory(x); [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] 362 - return read_memory(x); [INFO] [stdout] 362 + read_memory(x) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:379:17 [INFO] [stdout] | [INFO] [stdout] 379 | return BF_MEMORY.clone(); [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] 379 - return BF_MEMORY.clone(); [INFO] [stdout] 379 + BF_MEMORY.clone() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:383:17 [INFO] [stdout] | [INFO] [stdout] 383 | return POINTER_CELL.clone(); [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] 383 - return POINTER_CELL.clone(); [INFO] [stdout] 383 + POINTER_CELL.clone() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/main.rs:383:24 [INFO] [stdout] | [INFO] [stdout] 383 | return POINTER_CELL.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `POINTER_CELL` [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/main.rs:387:56 [INFO] [stdout] | [INFO] [stdout] 387 | raise_error("ScriptingError:LuaError", format!("{}", x).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `x.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/main.rs:519:12 [INFO] [stdout] | [INFO] [stdout] 519 | if !contents.is_err() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `contents.is_ok()` [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: called `unwrap` on `contents` after checking its variant with `is_err` [INFO] [stdout] --> src/main.rs:520:25 [INFO] [stdout] | [INFO] [stdout] 519 | if !contents.is_err() { [INFO] [stdout] | ----------------- the check is happening here [INFO] [stdout] 520 | let _code = contents.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: redundant closure [INFO] [stdout] --> src/main.rs:492:38 [INFO] [stdout] | [INFO] [stdout] 492 | llua = Lazy::new(|| Lua::new()); [INFO] [stdout] | ^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Lua::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `l` is used as a loop counter [INFO] [stdout] --> src/main.rs:522:13 [INFO] [stdout] | [INFO] [stdout] 522 | for line in _code.split("\n"){ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (l, line) in _code.split("\n").enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] = note: `#[warn(clippy::explicit_counter_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static variable `llua` should have an upper case name [INFO] [stdout] --> src/main.rs:14:12 [INFO] [stdout] | [INFO] [stdout] 14 | static mut llua: Lazy = Lazy::new(|| Lua::new()); [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_upper_case_globals)]` (part of `#[warn(nonstandard_style)]`) on by default [INFO] [stdout] help: convert the identifier to upper case [INFO] [stdout] | [INFO] [stdout] 14 - static mut llua: Lazy = Lazy::new(|| Lua::new()); [INFO] [stdout] 14 + static mut LLUA: Lazy = Lazy::new(|| Lua::new()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static variable `custom_commands` should have an upper case name [INFO] [stdout] --> src/main.rs:15:12 [INFO] [stdout] | [INFO] [stdout] 15 | static mut custom_commands: Lazy> = Lazy::new(|| HashMap::new()); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: convert the identifier to upper case [INFO] [stdout] | [INFO] [stdout] 15 - static mut custom_commands: Lazy> = Lazy::new(|| HashMap::new()); [INFO] [stdout] 15 + static mut CUSTOM_COMMANDS: Lazy> = Lazy::new(|| HashMap::new()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static variable `custom_instructions` should have an upper case name [INFO] [stdout] --> src/main.rs:16:12 [INFO] [stdout] | [INFO] [stdout] 16 | static mut custom_instructions: Lazy> = Lazy::new(|| HashMap::new()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: convert the identifier to upper case [INFO] [stdout] | [INFO] [stdout] 16 - static mut custom_instructions: Lazy> = Lazy::new(|| HashMap::new()); [INFO] [stdout] 16 + static mut CUSTOM_INSTRUCTIONS: Lazy> = Lazy::new(|| HashMap::new()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/main.rs:151:12 [INFO] [stdout] | [INFO] [stdout] 151 | if custom_instructions.is_empty() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/main.rs:181:25 [INFO] [stdout] | [INFO] [stdout] 181 | if !USED_MEMORY_CELLS_INDEXES.contains(&POINTER_CELL) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/main.rs:181:60 [INFO] [stdout] | [INFO] [stdout] 181 | if !USED_MEMORY_CELLS_INDEXES.contains(&POINTER_CELL) { [INFO] [stdout] | ^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: use `&raw const` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 181 | if !USED_MEMORY_CELLS_INDEXES.contains(&raw const POINTER_CELL) { [INFO] [stdout] | +++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/main.rs:182:25 [INFO] [stdout] | [INFO] [stdout] 182 | USED_MEMORY_CELLS_INDEXES.push(POINTER_CELL); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/main.rs:189:25 [INFO] [stdout] | [INFO] [stdout] 189 | if !USED_MEMORY_CELLS_INDEXES.contains(&POINTER_CELL) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/main.rs:189:60 [INFO] [stdout] | [INFO] [stdout] 189 | if !USED_MEMORY_CELLS_INDEXES.contains(&POINTER_CELL) { [INFO] [stdout] | ^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: use `&raw const` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 189 | if !USED_MEMORY_CELLS_INDEXES.contains(&raw const POINTER_CELL) { [INFO] [stdout] | +++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/main.rs:190:25 [INFO] [stdout] | [INFO] [stdout] 190 | USED_MEMORY_CELLS_INDEXES.push(POINTER_CELL); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/main.rs:226:25 [INFO] [stdout] | [INFO] [stdout] 226 | BF_JUMPSTACK.push(idx.clone() as i32); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/main.rs:242:24 [INFO] [stdout] | [INFO] [stdout] 242 | if BF_JUMPSTACK.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/main.rs:245:48 [INFO] [stdout] | [INFO] [stdout] 245 | ... idx = BF_JUMPSTACK[BF_JUMPSTACK.len() - 1] as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/main.rs:247:29 [INFO] [stdout] | [INFO] [stdout] 247 | ... BF_JUMPSTACK.pop(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/main.rs:255:37 [INFO] [stdout] | [INFO] [stdout] 255 | for (inst, funcname) in custom_instructions.clone(){ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/main.rs:257:58 [INFO] [stdout] | [INFO] [stdout] 257 | let mut func: hlua::LuaFunction<_> = llua.get(funcname).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/main.rs:271:9 [INFO] [stdout] | [INFO] [stdout] 271 | BF_MEMORY.clear(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/main.rs:274:17 [INFO] [stdout] | [INFO] [stdout] 274 | BF_MEMORY.push(0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/main.rs:286:27 [INFO] [stdout] | [INFO] [stdout] 286 | let mut lua = &mut llua; [INFO] [stdout] | ^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 286 | let mut lua = &raw mut llua; [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/main.rs:316:20 [INFO] [stdout] | [INFO] [stdout] 316 | if BF_MEMORY.is_empty() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/main.rs:327:20 [INFO] [stdout] | [INFO] [stdout] 327 | if BF_MEMORY.is_empty() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/main.rs:338:17 [INFO] [stdout] | [INFO] [stdout] 338 | custom_commands.insert(format!("!{cmd}"), funcname); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/main.rs:344:17 [INFO] [stdout] | [INFO] [stdout] 344 | custom_instructions.insert(inst.chars().collect::>()[0], funcname); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/main.rs:379:24 [INFO] [stdout] | [INFO] [stdout] 379 | return BF_MEMORY.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/main.rs:383:24 [INFO] [stdout] | [INFO] [stdout] 383 | return POINTER_CELL.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/main.rs:449:59 [INFO] [stdout] | [INFO] [stdout] 449 | rgb_println(format!("rBF v1.0 (repl, memlen: {MEMORY_CELLS}) !cmds - cmd list").as_str(), 3, 252, 202); [INFO] [stdout] | ^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/main.rs:456:31 [INFO] [stdout] | [INFO] [stdout] 456 | unsafe { print!("{POINTER_CELL} >> "); } [INFO] [stdout] | ^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/main.rs:479:37 [INFO] [stdout] | [INFO] [stdout] 479 | for mem_cell in &USED_MEMORY_CELLS_INDEXES { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: use `&raw const` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 479 | for mem_cell in &raw const USED_MEMORY_CELLS_INDEXES { [INFO] [stdout] | +++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/main.rs:493:21 [INFO] [stdout] | [INFO] [stdout] 493 | custom_commands.clear(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/main.rs:494:21 [INFO] [stdout] | [INFO] [stdout] 494 | custom_instructions.clear(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/main.rs:500:44 [INFO] [stdout] | [INFO] [stdout] 500 | for (cmd, funcname) in custom_commands.clone() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/main.rs:502:66 [INFO] [stdout] | [INFO] [stdout] 502 | ... let mut func: hlua::LuaFunction<_> = llua.get(funcname).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 7.40s [INFO] running `Command { std: "docker" "inspect" "82b535b3f9bbe61ded09aebd1a787b75a20ecfa3e3979328b676acb46533ce65", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "82b535b3f9bbe61ded09aebd1a787b75a20ecfa3e3979328b676acb46533ce65", kill_on_drop: false }` [INFO] [stdout] 82b535b3f9bbe61ded09aebd1a787b75a20ecfa3e3979328b676acb46533ce65