[INFO] cloning repository https://github.com/pawanspace/rlox [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/pawanspace/rlox" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fpawanspace%2Frlox", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fpawanspace%2Frlox'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 6ce0ccc7b564ae3165e510eb3ae3fe143ff6fce6 [INFO] checking pawanspace/rlox against master#db0e836148accac8a22532e3596ac612b63c2d8e for pr-139272 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fpawanspace%2Frlox" "/workspace/builds/worker-3-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-3-tc1/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/pawanspace/rlox on toolchain db0e836148accac8a22532e3596ac612b63c2d8e [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+db0e836148accac8a22532e3596ac612b63c2d8e" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/pawanspace/rlox [INFO] finished tweaking git repo https://github.com/pawanspace/rlox [INFO] tweaked toml for git repo https://github.com/pawanspace/rlox written to /workspace/builds/worker-3-tc1/source/Cargo.toml [INFO] crate git repo https://github.com/pawanspace/rlox 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" "+db0e836148accac8a22532e3596ac612b63c2d8e" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [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:b0b074c097205a61b89e8ad263052f976b2b332c4dc5f02aef1fe52501660d6e" "/opt/rustwide/cargo-home/bin/cargo" "+db0e836148accac8a22532e3596ac612b63c2d8e" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 69ed3c23b9a1624eee57f657c7c1269d5eac03006cd8a5e45c803c77e8bb693b [INFO] running `Command { std: "docker" "start" "-a" "69ed3c23b9a1624eee57f657c7c1269d5eac03006cd8a5e45c803c77e8bb693b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "69ed3c23b9a1624eee57f657c7c1269d5eac03006cd8a5e45c803c77e8bb693b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "69ed3c23b9a1624eee57f657c7c1269d5eac03006cd8a5e45c803c77e8bb693b", kill_on_drop: false }` [INFO] [stdout] 69ed3c23b9a1624eee57f657c7c1269d5eac03006cd8a5e45c803c77e8bb693b [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:b0b074c097205a61b89e8ad263052f976b2b332c4dc5f02aef1fe52501660d6e" "/opt/rustwide/cargo-home/bin/cargo" "+db0e836148accac8a22532e3596ac612b63c2d8e" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 4256402a7d4e2b30e585364d8731d15ca8adc352473a1842297f6eaaa3e67bf8 [INFO] running `Command { std: "docker" "start" "-a" "4256402a7d4e2b30e585364d8731d15ca8adc352473a1842297f6eaaa3e67bf8", kill_on_drop: false }` [INFO] [stderr] Compiling autocfg v1.1.0 [INFO] [stderr] Compiling proc-macro2 v1.0.36 [INFO] [stderr] Compiling unicode-xid v0.2.2 [INFO] [stderr] Compiling syn v1.0.89 [INFO] [stderr] Compiling libc v0.2.132 [INFO] [stderr] Compiling version_check v0.9.4 [INFO] [stderr] Checking cfg-if v1.0.0 [INFO] [stderr] Compiling serde_derive v1.0.136 [INFO] [stderr] Compiling serde v1.0.136 [INFO] [stderr] Compiling serde_json v1.0.89 [INFO] [stderr] Compiling anyhow v1.0.66 [INFO] [stderr] Compiling proc-macro-error-attr v1.0.4 [INFO] [stderr] Compiling proc-macro-error v1.0.4 [INFO] [stderr] Compiling num-traits v0.2.14 [INFO] [stderr] Compiling num-integer v0.1.44 [INFO] [stderr] Compiling num-bigint v0.4.3 [INFO] [stderr] Compiling indexmap v1.9.1 [INFO] [stderr] Compiling num-iter v0.1.42 [INFO] [stderr] Compiling quote v1.0.16 [INFO] [stderr] Compiling num-rational v0.4.0 [INFO] [stderr] Compiling log v0.4.17 [INFO] [stderr] Checking getrandom v0.2.8 [INFO] [stderr] Checking atty v0.2.14 [INFO] [stderr] Checking hashbrown v0.12.3 [INFO] [stderr] Compiling heck v0.4.0 [INFO] [stderr] Checking os_str_bytes v6.3.0 [INFO] [stderr] Checking ryu v1.0.11 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Checking ppv-lite86 v0.2.17 [INFO] [stderr] Checking itoa v1.0.4 [INFO] [stderr] Checking once_cell v1.13.1 [INFO] [stderr] Checking clap_lex v0.2.4 [INFO] [stderr] Checking num-complex v0.4.0 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking strsim v0.10.0 [INFO] [stderr] Checking termcolor v1.1.3 [INFO] [stderr] Checking textwrap v0.15.0 [INFO] [stderr] Checking bitflags v1.3.2 [INFO] [stderr] Checking lazy_static v1.4.0 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Checking colored v2.0.0 [INFO] [stderr] Checking num v0.4.0 [INFO] [stderr] Compiling clap_derive v3.2.17 [INFO] [stderr] Compiling num-derive v0.3.3 [INFO] [stderr] Checking clap v3.2.17 [INFO] [stderr] Checking rustfix v0.6.1 [INFO] [stderr] Checking rlox v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `Path` [INFO] [stdout] --> src/main.rs:5:17 [INFO] [stdout] | [INFO] [stdout] 5 | use std::path::{Path, PathBuf}; [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: elided lifetime has a name [INFO] [stdout] --> src/compiler.rs:205:74 [INFO] [stdout] | [INFO] [stdout] 204 | impl<'c> Compiler<'c> { [INFO] [stdout] | -- lifetime `'c` declared here [INFO] [stdout] 205 | pub(crate) fn init(scanner: Scanner, table: &'c mut Table) -> Compiler { [INFO] [stdout] | ^^^^^^^^ this elided lifetime gets resolved as `'c` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(elided_named_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::borrow::BorrowMut` [INFO] [stdout] --> src/hash_map.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use std::borrow::BorrowMut; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Entry` [INFO] [stdout] --> src/vm.rs:5:30 [INFO] [stdout] | [INFO] [stdout] 5 | use crate::hash_map::{Table, Entry}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Path` [INFO] [stdout] --> src/main.rs:5:17 [INFO] [stdout] | [INFO] [stdout] 5 | use std::path::{Path, PathBuf}; [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: elided lifetime has a name [INFO] [stdout] --> src/compiler.rs:205:74 [INFO] [stdout] | [INFO] [stdout] 204 | impl<'c> Compiler<'c> { [INFO] [stdout] | -- lifetime `'c` declared here [INFO] [stdout] 205 | pub(crate) fn init(scanner: Scanner, table: &'c mut Table) -> Compiler { [INFO] [stdout] | ^^^^^^^^ this elided lifetime gets resolved as `'c` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(elided_named_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::borrow::BorrowMut` [INFO] [stdout] --> src/hash_map.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use std::borrow::BorrowMut; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Entry` [INFO] [stdout] --> src/vm.rs:5:30 [INFO] [stdout] | [INFO] [stdout] 5 | use crate::hash_map::{Table, Entry}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `unsafe` block [INFO] [stdout] --> src/common.rs:75:32 [INFO] [stdout] | [INFO] [stdout] 75 | Value::Obj(obj) => unsafe { obj.is_string() }, [INFO] [stdout] | ^^^^^^ unnecessary `unsafe` block [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_unsafe)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/compiler.rs:126:11 [INFO] [stdout] | [INFO] [stdout] 126 | | _ => ParseRule { [INFO] [stdout] | ^ no value can reach this [INFO] [stdout] | [INFO] [stdout] note: multiple earlier patterns match some of the same values [INFO] [stdout] --> src/compiler.rs:126:11 [INFO] [stdout] | [INFO] [stdout] 44 | TokenType::LeftParen => ParseRule { [INFO] [stdout] | -------------------- matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 49 | TokenType::Minus | TokenType::Bang => ParseRule { [INFO] [stdout] | ---------------- --------------- matches some of the same values [INFO] [stdout] | | [INFO] [stdout] | matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 54 | TokenType::Plus => ParseRule { [INFO] [stdout] | --------------- matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 126 | | _ => ParseRule { [INFO] [stdout] | ^ ...and 36 other patterns collectively make this unreachable [INFO] [stdout] = note: `#[warn(unreachable_patterns)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `set_op` is never read [INFO] [stdout] --> src/compiler.rs:495:17 [INFO] [stdout] | [INFO] [stdout] 495 | let mut set_op = OpCode::Nil; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `get_op` is never read [INFO] [stdout] --> src/compiler.rs:496:17 [INFO] [stdout] | [INFO] [stdout] 496 | let mut get_op = OpCode::Nil; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `unsafe` block [INFO] [stdout] --> src/debug.rs:25:34 [INFO] [stdout] | [INFO] [stdout] 25 | Obj::Str(fat_ptr) => unsafe { [INFO] [stdout] | ^^^^^^ unnecessary `unsafe` block [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `value` [INFO] [stdout] --> src/hash_map.rs:52:29 [INFO] [stdout] | [INFO] [stdout] 52 | Entry::Occupied(value, data) => Some(data), [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_value` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `value` [INFO] [stdout] --> src/hash_map.rs:60:29 [INFO] [stdout] | [INFO] [stdout] 60 | Entry::Occupied(value, data) => Some(data), [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_value` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `unsafe` block [INFO] [stdout] --> src/memory.rs:35:5 [INFO] [stdout] | [INFO] [stdout] 35 | unsafe { mem::size_of_val(&ptr) } [INFO] [stdout] | ^^^^^^ unnecessary `unsafe` block [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `unsafe` block [INFO] [stdout] --> src/memory.rs:39:5 [INFO] [stdout] | [INFO] [stdout] 39 | unsafe { std::ptr::eq(ptr, other_ptr) } [INFO] [stdout] | ^^^^^^ unnecessary `unsafe` block [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `unsafe` block [INFO] [stdout] --> src/common.rs:75:32 [INFO] [stdout] | [INFO] [stdout] 75 | Value::Obj(obj) => unsafe { obj.is_string() }, [INFO] [stdout] | ^^^^^^ unnecessary `unsafe` block [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_unsafe)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/compiler.rs:126:11 [INFO] [stdout] | [INFO] [stdout] 126 | | _ => ParseRule { [INFO] [stdout] | ^ no value can reach this [INFO] [stdout] | [INFO] [stdout] note: multiple earlier patterns match some of the same values [INFO] [stdout] --> src/compiler.rs:126:11 [INFO] [stdout] | [INFO] [stdout] 44 | TokenType::LeftParen => ParseRule { [INFO] [stdout] | -------------------- matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 49 | TokenType::Minus | TokenType::Bang => ParseRule { [INFO] [stdout] | ---------------- --------------- matches some of the same values [INFO] [stdout] | | [INFO] [stdout] | matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 54 | TokenType::Plus => ParseRule { [INFO] [stdout] | --------------- matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 126 | | _ => ParseRule { [INFO] [stdout] | ^ ...and 36 other patterns collectively make this unreachable [INFO] [stdout] = note: `#[warn(unreachable_patterns)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `set_op` is never read [INFO] [stdout] --> src/compiler.rs:495:17 [INFO] [stdout] | [INFO] [stdout] 495 | let mut set_op = OpCode::Nil; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `get_op` is never read [INFO] [stdout] --> src/compiler.rs:496:17 [INFO] [stdout] | [INFO] [stdout] 496 | let mut get_op = OpCode::Nil; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `unsafe` block [INFO] [stdout] --> src/debug.rs:25:34 [INFO] [stdout] | [INFO] [stdout] 25 | Obj::Str(fat_ptr) => unsafe { [INFO] [stdout] | ^^^^^^ unnecessary `unsafe` block [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `value` [INFO] [stdout] --> src/hash_map.rs:52:29 [INFO] [stdout] | [INFO] [stdout] 52 | Entry::Occupied(value, data) => Some(data), [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_value` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `value` [INFO] [stdout] --> src/hash_map.rs:60:29 [INFO] [stdout] | [INFO] [stdout] 60 | Entry::Occupied(value, data) => Some(data), [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_value` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `unsafe` block [INFO] [stdout] --> src/memory.rs:35:5 [INFO] [stdout] | [INFO] [stdout] 35 | unsafe { mem::size_of_val(&ptr) } [INFO] [stdout] | ^^^^^^ unnecessary `unsafe` block [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `unsafe` block [INFO] [stdout] --> src/memory.rs:39:5 [INFO] [stdout] | [INFO] [stdout] 39 | unsafe { std::ptr::eq(ptr, other_ptr) } [INFO] [stdout] | ^^^^^^ unnecessary `unsafe` block [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Repl` is never constructed [INFO] [stdout] --> src/main.rs:39:8 [INFO] [stdout] | [INFO] [stdout] 39 | struct Repl<'a> { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `init` and `prompt` are never used [INFO] [stdout] --> src/main.rs:44:8 [INFO] [stdout] | [INFO] [stdout] 43 | impl<'a> Repl<'a> { [INFO] [stdout] | ----------------- associated items in this implementation [INFO] [stdout] 44 | fn init(vm: &'a mut vm::VM) -> Repl<'a> { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 48 | fn prompt(&mut self, name: &str) { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `repl` is never used [INFO] [stdout] --> src/main.rs:59:4 [INFO] [stdout] | [INFO] [stdout] 59 | fn repl() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `disassemble_chunk` is never used [INFO] [stdout] --> src/chunk.rs:55:19 [INFO] [stdout] | [INFO] [stdout] 12 | impl<'a> Chunk { [INFO] [stdout] | -------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 55 | pub(crate) fn disassemble_chunk(&self, name: &str) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `func_type` is never read [INFO] [stdout] --> src/common.rs:181:16 [INFO] [stdout] | [INFO] [stdout] 177 | pub(crate) struct Function { [INFO] [stdout] | -------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 181 | pub(crate) func_type: FunctionType, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Function` 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: variant `Function` is never constructed [INFO] [stdout] --> src/common.rs:197:5 [INFO] [stdout] | [INFO] [stdout] 196 | pub(crate) enum FunctionType { [INFO] [stdout] | ------------ variant in this enum [INFO] [stdout] 197 | Function, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `FunctionType` 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: variant `Nil` is never constructed [INFO] [stdout] --> src/common.rs:207:5 [INFO] [stdout] | [INFO] [stdout] 203 | pub(crate) enum Obj { [INFO] [stdout] | --- variant in this enum [INFO] [stdout] ... [INFO] [stdout] 207 | Nil, [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Obj` 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: method `is_nil` is never used [INFO] [stdout] --> src/common.rs:217:12 [INFO] [stdout] | [INFO] [stdout] 210 | impl Obj { [INFO] [stdout] | -------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 217 | pub fn is_nil(&self) -> bool { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `emit_bytes` is never used [INFO] [stdout] --> src/compiler.rs:834:8 [INFO] [stdout] | [INFO] [stdout] 204 | impl<'c> Compiler<'c> { [INFO] [stdout] | --------------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 834 | fn emit_bytes(&mut self, byte_1: u8, byte_2: u8) { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `get_mut`, `dump`, and `find_entry_mut` are never used [INFO] [stdout] --> src/hash_map.rs:57:19 [INFO] [stdout] | [INFO] [stdout] 24 | / impl Table [INFO] [stdout] 25 | | where [INFO] [stdout] 26 | | T: Clone, [INFO] [stdout] 27 | | T: Debug, [INFO] [stdout] | |_____________- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 57 | pub(crate) fn get_mut(&mut self, key: FatPointer) -> Option<&mut T> { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 117 | pub(crate) fn dump(&self) { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 152 | fn find_entry_mut(&mut self, key: &FatPointer) -> Option<&mut Entry> { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `TestValue` is never constructed [INFO] [stdout] --> src/hash_map.rs:201:8 [INFO] [stdout] | [INFO] [stdout] 201 | struct TestValue { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `allocate_for_value` is never used [INFO] [stdout] --> src/memory.rs:16:8 [INFO] [stdout] | [INFO] [stdout] 16 | pub fn allocate_for_value(value: T) -> *mut u8 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `add` is never used [INFO] [stdout] --> src/memory.rs:28:8 [INFO] [stdout] | [INFO] [stdout] 28 | pub fn add(ptr: *mut u8, value: T) { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `size_of` is never used [INFO] [stdout] --> src/memory.rs:34:8 [INFO] [stdout] | [INFO] [stdout] 34 | pub fn size_of(ptr: *mut u8) -> usize { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `print` is never used [INFO] [stdout] --> src/memory.rs:42:8 [INFO] [stdout] | [INFO] [stdout] 42 | pub fn print(ptr: *mut u8) [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `drop` is never used [INFO] [stdout] --> src/memory.rs:51:8 [INFO] [stdout] | [INFO] [stdout] 51 | pub fn drop(ptr: *mut u8) { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get` is never used [INFO] [stdout] --> src/memory.rs:72:8 [INFO] [stdout] | [INFO] [stdout] 72 | pub fn get(ptr: *mut T) -> T { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `display` is never used [INFO] [stdout] --> src/metrics.rs:26:15 [INFO] [stdout] | [INFO] [stdout] 26 | pub(crate) fn display() { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `reset_stack` and `is_equal` are never used [INFO] [stdout] --> src/vm.rs:133:8 [INFO] [stdout] | [INFO] [stdout] 111 | impl VM { [INFO] [stdout] | ------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 133 | fn reset_stack(&mut self) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 541 | fn is_equal(&self, left: Value, right: Value) -> bool { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/common.rs:10:10 [INFO] [stdout] | [INFO] [stdout] 10 | #[derive(FromPrimitive)] [INFO] [stdout] | ^------------ [INFO] [stdout] | | [INFO] [stdout] | `FromPrimitive` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_NUM_FromPrimitive_FOR_OpCode` [INFO] [stdout] 11 | pub(crate) enum OpCode { [INFO] [stdout] | ------ `OpCode` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `FromPrimitive` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `FromPrimitive` may come from an old version of the `num_derive` crate, try updating your dependency with `cargo update -p num_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: `#[warn(non_local_definitions)]` on by default [INFO] [stdout] = note: this warning originates in the derive macro `FromPrimitive` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: a dangling pointer will be produced because the temporary `std::string::String` will be dropped [INFO] [stdout] --> src/common.rs:270:37 [INFO] [stdout] | [INFO] [stdout] 270 | ptr: "".to_string().as_mut_ptr(), [INFO] [stdout] | -------------- ^^^^^^^^^^ this pointer will immediately be invalid [INFO] [stdout] | | [INFO] [stdout] | this `std::string::String` is deallocated at the end of the statement, bind it to a variable to extend its lifetime [INFO] [stdout] | [INFO] [stdout] = note: pointers do not have a lifetime; when calling `as_mut_ptr` the `std::string::String` will be deallocated at the end of the statement because nothing is referencing it as far as the type system is concerned [INFO] [stdout] = help: you must make sure that the variable you bind the `std::string::String` to lives at least as long as the pointer returned by the call to `as_mut_ptr` [INFO] [stdout] = help: in particular, if this pointer is returned from the current function, binding the `std::string::String` inside the function will not suffice [INFO] [stdout] = help: for more information, see [INFO] [stdout] = note: `#[warn(dangling_pointers_from_temporaries)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/compiler.rs:13:10 [INFO] [stdout] | [INFO] [stdout] 13 | #[derive(FromPrimitive, Eq, PartialEq)] [INFO] [stdout] | ^------------ [INFO] [stdout] | | [INFO] [stdout] | `FromPrimitive` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_NUM_FromPrimitive_FOR_Precedence` [INFO] [stdout] 14 | enum Precedence { [INFO] [stdout] | ---------- `Precedence` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `FromPrimitive` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `FromPrimitive` may come from an old version of the `num_derive` crate, try updating your dependency with `cargo update -p num_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `FromPrimitive` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/metrics.rs:21:9 [INFO] [stdout] | [INFO] [stdout] 21 | EVENTS.as_mut().unwrap().insert(name, total_time); [INFO] [stdout] | ^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [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: `#[warn(static_mut_refs)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/metrics.rs:29:9 [INFO] [stdout] | [INFO] [stdout] 29 | EVENTS.as_ref().unwrap().iter().for_each(|(key, value)| { [INFO] [stdout] | ^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [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] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/scanner.rs:4:41 [INFO] [stdout] | [INFO] [stdout] 4 | #[derive(Debug, PartialEq, Copy, Clone, FromPrimitive, Hash, Eq)] [INFO] [stdout] | ^------------ [INFO] [stdout] | | [INFO] [stdout] | `FromPrimitive` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_NUM_FromPrimitive_FOR_TokenType` [INFO] [stdout] 5 | pub(crate) enum TokenType { [INFO] [stdout] | --------- `TokenType` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `FromPrimitive` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `FromPrimitive` may come from an old version of the `num_derive` crate, try updating your dependency with `cargo update -p num_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `FromPrimitive` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Repl` is never constructed [INFO] [stdout] --> src/main.rs:39:8 [INFO] [stdout] | [INFO] [stdout] 39 | struct Repl<'a> { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `init` and `prompt` are never used [INFO] [stdout] --> src/main.rs:44:8 [INFO] [stdout] | [INFO] [stdout] 43 | impl<'a> Repl<'a> { [INFO] [stdout] | ----------------- associated items in this implementation [INFO] [stdout] 44 | fn init(vm: &'a mut vm::VM) -> Repl<'a> { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 48 | fn prompt(&mut self, name: &str) { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `repl` is never used [INFO] [stdout] --> src/main.rs:59:4 [INFO] [stdout] | [INFO] [stdout] 59 | fn repl() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `disassemble_chunk` is never used [INFO] [stdout] --> src/chunk.rs:55:19 [INFO] [stdout] | [INFO] [stdout] 12 | impl<'a> Chunk { [INFO] [stdout] | -------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 55 | pub(crate) fn disassemble_chunk(&self, name: &str) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `func_type` is never read [INFO] [stdout] --> src/common.rs:181:16 [INFO] [stdout] | [INFO] [stdout] 177 | pub(crate) struct Function { [INFO] [stdout] | -------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 181 | pub(crate) func_type: FunctionType, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Function` 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: variant `Function` is never constructed [INFO] [stdout] --> src/common.rs:197:5 [INFO] [stdout] | [INFO] [stdout] 196 | pub(crate) enum FunctionType { [INFO] [stdout] | ------------ variant in this enum [INFO] [stdout] 197 | Function, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `FunctionType` 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: variant `Nil` is never constructed [INFO] [stdout] --> src/common.rs:207:5 [INFO] [stdout] | [INFO] [stdout] 203 | pub(crate) enum Obj { [INFO] [stdout] | --- variant in this enum [INFO] [stdout] ... [INFO] [stdout] 207 | Nil, [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Obj` 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: method `is_nil` is never used [INFO] [stdout] --> src/common.rs:217:12 [INFO] [stdout] | [INFO] [stdout] 210 | impl Obj { [INFO] [stdout] | -------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 217 | pub fn is_nil(&self) -> bool { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `emit_bytes` is never used [INFO] [stdout] --> src/compiler.rs:834:8 [INFO] [stdout] | [INFO] [stdout] 204 | impl<'c> Compiler<'c> { [INFO] [stdout] | --------------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 834 | fn emit_bytes(&mut self, byte_1: u8, byte_2: u8) { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `dump` is never used [INFO] [stdout] --> src/hash_map.rs:117:19 [INFO] [stdout] | [INFO] [stdout] 24 | / impl Table [INFO] [stdout] 25 | | where [INFO] [stdout] 26 | | T: Clone, [INFO] [stdout] 27 | | T: Debug, [INFO] [stdout] | |_____________- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 117 | pub(crate) fn dump(&self) { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `allocate_for_value` is never used [INFO] [stdout] --> src/memory.rs:16:8 [INFO] [stdout] | [INFO] [stdout] 16 | pub fn allocate_for_value(value: T) -> *mut u8 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `add` is never used [INFO] [stdout] --> src/memory.rs:28:8 [INFO] [stdout] | [INFO] [stdout] 28 | pub fn add(ptr: *mut u8, value: T) { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `size_of` is never used [INFO] [stdout] --> src/memory.rs:34:8 [INFO] [stdout] | [INFO] [stdout] 34 | pub fn size_of(ptr: *mut u8) -> usize { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `print` is never used [INFO] [stdout] --> src/memory.rs:42:8 [INFO] [stdout] | [INFO] [stdout] 42 | pub fn print(ptr: *mut u8) [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `drop` is never used [INFO] [stdout] --> src/memory.rs:51:8 [INFO] [stdout] | [INFO] [stdout] 51 | pub fn drop(ptr: *mut u8) { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get` is never used [INFO] [stdout] --> src/memory.rs:72:8 [INFO] [stdout] | [INFO] [stdout] 72 | pub fn get(ptr: *mut T) -> T { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `display` is never used [INFO] [stdout] --> src/metrics.rs:26:15 [INFO] [stdout] | [INFO] [stdout] 26 | pub(crate) fn display() { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `reset_stack` and `is_equal` are never used [INFO] [stdout] --> src/vm.rs:133:8 [INFO] [stdout] | [INFO] [stdout] 111 | impl VM { [INFO] [stdout] | ------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 133 | fn reset_stack(&mut self) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 541 | fn is_equal(&self, left: Value, right: Value) -> bool { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/common.rs:10:10 [INFO] [stdout] | [INFO] [stdout] 10 | #[derive(FromPrimitive)] [INFO] [stdout] | ^------------ [INFO] [stdout] | | [INFO] [stdout] | `FromPrimitive` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_NUM_FromPrimitive_FOR_OpCode` [INFO] [stdout] 11 | pub(crate) enum OpCode { [INFO] [stdout] | ------ `OpCode` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `FromPrimitive` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `FromPrimitive` may come from an old version of the `num_derive` crate, try updating your dependency with `cargo update -p num_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: `#[warn(non_local_definitions)]` on by default [INFO] [stdout] = note: this warning originates in the derive macro `FromPrimitive` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: a dangling pointer will be produced because the temporary `std::string::String` will be dropped [INFO] [stdout] --> src/common.rs:270:37 [INFO] [stdout] | [INFO] [stdout] 270 | ptr: "".to_string().as_mut_ptr(), [INFO] [stdout] | -------------- ^^^^^^^^^^ this pointer will immediately be invalid [INFO] [stdout] | | [INFO] [stdout] | this `std::string::String` is deallocated at the end of the statement, bind it to a variable to extend its lifetime [INFO] [stdout] | [INFO] [stdout] = note: pointers do not have a lifetime; when calling `as_mut_ptr` the `std::string::String` will be deallocated at the end of the statement because nothing is referencing it as far as the type system is concerned [INFO] [stdout] = help: you must make sure that the variable you bind the `std::string::String` to lives at least as long as the pointer returned by the call to `as_mut_ptr` [INFO] [stdout] = help: in particular, if this pointer is returned from the current function, binding the `std::string::String` inside the function will not suffice [INFO] [stdout] = help: for more information, see [INFO] [stdout] = note: `#[warn(dangling_pointers_from_temporaries)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/compiler.rs:13:10 [INFO] [stdout] | [INFO] [stdout] 13 | #[derive(FromPrimitive, Eq, PartialEq)] [INFO] [stdout] | ^------------ [INFO] [stdout] | | [INFO] [stdout] | `FromPrimitive` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_NUM_FromPrimitive_FOR_Precedence` [INFO] [stdout] 14 | enum Precedence { [INFO] [stdout] | ---------- `Precedence` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `FromPrimitive` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `FromPrimitive` may come from an old version of the `num_derive` crate, try updating your dependency with `cargo update -p num_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `FromPrimitive` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: a dangling pointer will be produced because the temporary `std::string::String` will be dropped [INFO] [stdout] --> src/hash_map.rs:212:36 [INFO] [stdout] | [INFO] [stdout] 212 | ptr: value.to_string().as_mut_ptr(), [INFO] [stdout] | ----------------- ^^^^^^^^^^ this pointer will immediately be invalid [INFO] [stdout] | | [INFO] [stdout] | this `std::string::String` is deallocated at the end of the statement, bind it to a variable to extend its lifetime [INFO] [stdout] | [INFO] [stdout] = note: pointers do not have a lifetime; when calling `as_mut_ptr` the `std::string::String` will be deallocated at the end of the statement because nothing is referencing it as far as the type system is concerned [INFO] [stdout] = help: you must make sure that the variable you bind the `std::string::String` to lives at least as long as the pointer returned by the call to `as_mut_ptr` [INFO] [stdout] = help: in particular, if this pointer is returned from the current function, binding the `std::string::String` inside the function will not suffice [INFO] [stdout] = help: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/metrics.rs:21:9 [INFO] [stdout] | [INFO] [stdout] 21 | EVENTS.as_mut().unwrap().insert(name, total_time); [INFO] [stdout] | ^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [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: `#[warn(static_mut_refs)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/metrics.rs:29:9 [INFO] [stdout] | [INFO] [stdout] 29 | EVENTS.as_ref().unwrap().iter().for_each(|(key, value)| { [INFO] [stdout] | ^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [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] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/scanner.rs:4:41 [INFO] [stdout] | [INFO] [stdout] 4 | #[derive(Debug, PartialEq, Copy, Clone, FromPrimitive, Hash, Eq)] [INFO] [stdout] | ^------------ [INFO] [stdout] | | [INFO] [stdout] | `FromPrimitive` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_NUM_FromPrimitive_FOR_TokenType` [INFO] [stdout] 5 | pub(crate) enum TokenType { [INFO] [stdout] | --------- `TokenType` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `FromPrimitive` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `FromPrimitive` may come from an old version of the `num_derive` crate, try updating your dependency with `cargo update -p num_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `FromPrimitive` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 21.71s [INFO] running `Command { std: "docker" "inspect" "4256402a7d4e2b30e585364d8731d15ca8adc352473a1842297f6eaaa3e67bf8", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "4256402a7d4e2b30e585364d8731d15ca8adc352473a1842297f6eaaa3e67bf8", kill_on_drop: false }` [INFO] [stdout] 4256402a7d4e2b30e585364d8731d15ca8adc352473a1842297f6eaaa3e67bf8