[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] testing pawanspace/rlox against try#8de4c7234dd9b97c9d76b58671343fdbbc9a433e+target=x86_64-unknown-linux-musl for musl_upgrade_1_2_5_with_libc_patch_0 [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] 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] validating manifest of git repo https://github.com/pawanspace/rlox on toolchain 8de4c7234dd9b97c9d76b58671343fdbbc9a433e [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+8de4c7234dd9b97c9d76b58671343fdbbc9a433e" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [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" "+8de4c7234dd9b97c9d76b58671343fdbbc9a433e" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Updating crates.io index [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded rustfix v0.6.1 [INFO] [stderr] Downloaded clap_derive v3.2.17 [INFO] [stderr] Downloaded quote v1.0.16 [INFO] [stderr] Downloaded syn v1.0.89 [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:90999bfc7ae267e83380e433d8e61a7c072ca6729e92edbae886d3423b3a6f4c" "/opt/rustwide/cargo-home/bin/cargo" "+8de4c7234dd9b97c9d76b58671343fdbbc9a433e" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 8139bc71ec10e62b7595c970684b137a5b4ce742934fdf7aa862568e65d7675f [INFO] running `Command { std: "docker" "start" "-a" "8139bc71ec10e62b7595c970684b137a5b4ce742934fdf7aa862568e65d7675f", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "8139bc71ec10e62b7595c970684b137a5b4ce742934fdf7aa862568e65d7675f", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "8139bc71ec10e62b7595c970684b137a5b4ce742934fdf7aa862568e65d7675f", kill_on_drop: false }` [INFO] [stdout] 8139bc71ec10e62b7595c970684b137a5b4ce742934fdf7aa862568e65d7675f [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:90999bfc7ae267e83380e433d8e61a7c072ca6729e92edbae886d3423b3a6f4c" "/opt/rustwide/cargo-home/bin/cargo" "+8de4c7234dd9b97c9d76b58671343fdbbc9a433e" "build" "--frozen" "--message-format=json" "--target" "x86_64-unknown-linux-musl", kill_on_drop: false }` [INFO] [stdout] 6d86ac3237ab76d73892db41db00c844c8f1a321399110ddb8d238028a0e2959 [INFO] running `Command { std: "docker" "start" "-a" "6d86ac3237ab76d73892db41db00c844c8f1a321399110ddb8d238028a0e2959", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.36 [INFO] [stderr] Compiling syn v1.0.89 [INFO] [stderr] Compiling libc v0.2.132 [INFO] [stderr] Compiling num-traits v0.2.14 [INFO] [stderr] Compiling num-integer v0.1.44 [INFO] [stderr] Compiling serde_derive v1.0.136 [INFO] [stderr] Compiling num-bigint v0.4.3 [INFO] [stderr] Compiling serde v1.0.136 [INFO] [stderr] Compiling num-rational v0.4.0 [INFO] [stderr] Compiling indexmap v1.9.1 [INFO] [stderr] Compiling num-iter v0.1.42 [INFO] [stderr] Compiling log v0.4.17 [INFO] [stderr] Compiling serde_json v1.0.89 [INFO] [stderr] Compiling proc-macro-error-attr v1.0.4 [INFO] [stderr] Compiling proc-macro-error v1.0.4 [INFO] [stderr] Compiling anyhow v1.0.66 [INFO] [stderr] Compiling os_str_bytes v6.3.0 [INFO] [stderr] Compiling hashbrown v0.12.3 [INFO] [stderr] Compiling itoa v1.0.4 [INFO] [stderr] Compiling heck v0.4.0 [INFO] [stderr] Compiling textwrap v0.15.0 [INFO] [stderr] Compiling once_cell v1.13.1 [INFO] [stderr] Compiling termcolor v1.1.3 [INFO] [stderr] Compiling clap_lex v0.2.4 [INFO] [stderr] Compiling quote v1.0.16 [INFO] [stderr] Compiling getrandom v0.2.8 [INFO] [stderr] Compiling atty v0.2.14 [INFO] [stderr] Compiling colored v2.0.0 [INFO] [stderr] Compiling rand_core v0.6.4 [INFO] [stderr] Compiling num-complex v0.4.0 [INFO] [stderr] Compiling rand_chacha v0.3.1 [INFO] [stderr] Compiling rand v0.8.5 [INFO] [stderr] Compiling num v0.4.0 [INFO] [stderr] Compiling clap_derive v3.2.17 [INFO] [stderr] Compiling num-derive v0.3.3 [INFO] [stderr] Compiling clap v3.2.17 [INFO] [stderr] Compiling rustfix v0.6.1 [INFO] [stderr] Compiling 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: 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: 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 `Debug` and `Clone`, 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 `Debug` and `Clone`, 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 `Debug` and `Clone`, 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] = note: `TestValue` has derived impls for the traits `Debug` and `Clone`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 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: lifetime flowing from input to output with different syntax can be confusing [INFO] [stdout] --> src/compiler.rs:205:50 [INFO] [stdout] | [INFO] [stdout] 205 | pub(crate) fn init(scanner: Scanner, table: &'c mut Table) -> Compiler { [INFO] [stdout] | ^^ -------- the lifetime gets resolved as `'c` [INFO] [stdout] | | [INFO] [stdout] | this lifetime flows to the output [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: one option is to consistently use `'c` [INFO] [stdout] | [INFO] [stdout] 205 | pub(crate) fn init(scanner: Scanner, table: &'c mut Table) -> Compiler<'c> { [INFO] [stdout] | ++++ [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 18.94s [INFO] running `Command { std: "docker" "inspect" "6d86ac3237ab76d73892db41db00c844c8f1a321399110ddb8d238028a0e2959", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "6d86ac3237ab76d73892db41db00c844c8f1a321399110ddb8d238028a0e2959", kill_on_drop: false }` [INFO] [stdout] 6d86ac3237ab76d73892db41db00c844c8f1a321399110ddb8d238028a0e2959 [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:90999bfc7ae267e83380e433d8e61a7c072ca6729e92edbae886d3423b3a6f4c" "/opt/rustwide/cargo-home/bin/cargo" "+8de4c7234dd9b97c9d76b58671343fdbbc9a433e" "test" "--frozen" "--no-run" "--message-format=json" "--target" "x86_64-unknown-linux-musl", kill_on_drop: false }` [INFO] [stdout] 77bf0eee6136f174596dad0ab7235f53f44a0855225d78e7ec221fb57c57742c [INFO] running `Command { std: "docker" "start" "-a" "77bf0eee6136f174596dad0ab7235f53f44a0855225d78e7ec221fb57c57742c", kill_on_drop: false }` [INFO] [stderr] Compiling 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: 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: 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 `Debug` and `Clone`, 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 `Debug` and `Clone`, 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 `Debug` and `Clone`, 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: lifetime flowing from input to output with different syntax can be confusing [INFO] [stdout] --> src/compiler.rs:205:50 [INFO] [stdout] | [INFO] [stdout] 205 | pub(crate) fn init(scanner: Scanner, table: &'c mut Table) -> Compiler { [INFO] [stdout] | ^^ -------- the lifetime gets resolved as `'c` [INFO] [stdout] | | [INFO] [stdout] | this lifetime flows to the output [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: one option is to consistently use `'c` [INFO] [stdout] | [INFO] [stdout] 205 | pub(crate) fn init(scanner: Scanner, table: &'c mut Table) -> Compiler<'c> { [INFO] [stdout] | ++++ [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 `test` profile [unoptimized + debuginfo] target(s) in 1.48s [INFO] running `Command { std: "docker" "inspect" "77bf0eee6136f174596dad0ab7235f53f44a0855225d78e7ec221fb57c57742c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "77bf0eee6136f174596dad0ab7235f53f44a0855225d78e7ec221fb57c57742c", kill_on_drop: false }` [INFO] [stdout] 77bf0eee6136f174596dad0ab7235f53f44a0855225d78e7ec221fb57c57742c [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:90999bfc7ae267e83380e433d8e61a7c072ca6729e92edbae886d3423b3a6f4c" "/opt/rustwide/cargo-home/bin/cargo" "+8de4c7234dd9b97c9d76b58671343fdbbc9a433e" "test" "--frozen" "--target" "x86_64-unknown-linux-musl", kill_on_drop: false }` [INFO] [stdout] 6c1a79bcf0470d3a8962b6291aac6ae4c8f92fc8f00f53a52ea3b15cfec1a9f1 [INFO] running `Command { std: "docker" "start" "-a" "6c1a79bcf0470d3a8962b6291aac6ae4c8f92fc8f00f53a52ea3b15cfec1a9f1", kill_on_drop: false }` [INFO] [stderr] warning: unused import: `Path` [INFO] [stderr] --> src/main.rs:5:17 [INFO] [stderr] | [INFO] [stderr] 5 | use std::path::{Path, PathBuf}; [INFO] [stderr] | ^^^^ [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(unused_imports)]` on by default [INFO] [stderr] [INFO] [stderr] warning: unused import: `std::borrow::BorrowMut` [INFO] [stderr] --> src/hash_map.rs:3:5 [INFO] [stderr] | [INFO] [stderr] 3 | use std::borrow::BorrowMut; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: unused import: `Entry` [INFO] [stderr] --> src/vm.rs:5:30 [INFO] [stderr] | [INFO] [stderr] 5 | use crate::hash_map::{Table, Entry}; [INFO] [stderr] | ^^^^^ [INFO] [stderr] [INFO] [stderr] warning: unnecessary `unsafe` block [INFO] [stderr] --> src/common.rs:75:32 [INFO] [stderr] | [INFO] [stderr] 75 | Value::Obj(obj) => unsafe { obj.is_string() }, [INFO] [stderr] | ^^^^^^ unnecessary `unsafe` block [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(unused_unsafe)]` on by default [INFO] [stderr] [INFO] [stderr] warning: unreachable pattern [INFO] [stderr] --> src/compiler.rs:126:11 [INFO] [stderr] | [INFO] [stderr] 126 | | _ => ParseRule { [INFO] [stderr] | ^ no value can reach this [INFO] [stderr] | [INFO] [stderr] note: multiple earlier patterns match some of the same values [INFO] [stderr] --> src/compiler.rs:126:11 [INFO] [stderr] | [INFO] [stderr] 44 | TokenType::LeftParen => ParseRule { [INFO] [stderr] | -------------------- matches some of the same values [INFO] [stderr] ... [INFO] [stderr] 49 | TokenType::Minus | TokenType::Bang => ParseRule { [INFO] [stderr] | ---------------- --------------- matches some of the same values [INFO] [stderr] | | [INFO] [stderr] | matches some of the same values [INFO] [stderr] ... [INFO] [stderr] 54 | TokenType::Plus => ParseRule { [INFO] [stderr] | --------------- matches some of the same values [INFO] [stderr] ... [INFO] [stderr] 126 | | _ => ParseRule { [INFO] [stderr] | ^ ...and 36 other patterns collectively make this unreachable [INFO] [stderr] = note: `#[warn(unreachable_patterns)]` on by default [INFO] [stderr] [INFO] [stderr] warning: value assigned to `set_op` is never read [INFO] [stderr] --> src/compiler.rs:495:17 [INFO] [stderr] | [INFO] [stderr] 495 | let mut set_op = OpCode::Nil; [INFO] [stderr] | ^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: maybe it is overwritten before being read? [INFO] [stderr] = note: `#[warn(unused_assignments)]` on by default [INFO] [stderr] [INFO] [stderr] warning: value assigned to `get_op` is never read [INFO] [stderr] --> src/compiler.rs:496:17 [INFO] [stderr] | [INFO] [stderr] 496 | let mut get_op = OpCode::Nil; [INFO] [stderr] | ^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: maybe it is overwritten before being read? [INFO] [stderr] [INFO] [stderr] warning: unnecessary `unsafe` block [INFO] [stderr] --> src/debug.rs:25:34 [INFO] [stderr] | [INFO] [stderr] 25 | Obj::Str(fat_ptr) => unsafe { [INFO] [stderr] | ^^^^^^ unnecessary `unsafe` block [INFO] [stderr] [INFO] [stderr] warning: unused variable: `value` [INFO] [stderr] --> src/hash_map.rs:52:29 [INFO] [stderr] | [INFO] [stderr] 52 | Entry::Occupied(value, data) => Some(data), [INFO] [stderr] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_value` [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(unused_variables)]` on by default [INFO] [stderr] [INFO] [stderr] warning: unused variable: `value` [INFO] [stderr] --> src/hash_map.rs:60:29 [INFO] [stderr] | [INFO] [stderr] 60 | Entry::Occupied(value, data) => Some(data), [INFO] [stderr] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_value` [INFO] [stderr] [INFO] [stderr] warning: unnecessary `unsafe` block [INFO] [stderr] --> src/memory.rs:35:5 [INFO] [stderr] | [INFO] [stderr] 35 | unsafe { mem::size_of_val(&ptr) } [INFO] [stderr] | ^^^^^^ unnecessary `unsafe` block [INFO] [stderr] [INFO] [stderr] warning: unnecessary `unsafe` block [INFO] [stderr] --> src/memory.rs:39:5 [INFO] [stderr] | [INFO] [stderr] 39 | unsafe { std::ptr::eq(ptr, other_ptr) } [INFO] [stderr] | ^^^^^^ unnecessary `unsafe` block [INFO] [stderr] [INFO] [stderr] warning: struct `Repl` is never constructed [INFO] [stderr] --> src/main.rs:39:8 [INFO] [stderr] | [INFO] [stderr] 39 | struct Repl<'a> { [INFO] [stderr] | ^^^^ [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(dead_code)]` on by default [INFO] [stderr] [INFO] [stderr] warning: associated items `init` and `prompt` are never used [INFO] [stderr] --> src/main.rs:44:8 [INFO] [stderr] | [INFO] [stderr] 43 | impl<'a> Repl<'a> { [INFO] [stderr] | ----------------- associated items in this implementation [INFO] [stderr] 44 | fn init(vm: &'a mut vm::VM) -> Repl<'a> { [INFO] [stderr] | ^^^^ [INFO] [stderr] ... [INFO] [stderr] 48 | fn prompt(&mut self, name: &str) { [INFO] [stderr] | ^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: function `repl` is never used [INFO] [stderr] --> src/main.rs:59:4 [INFO] [stderr] | [INFO] [stderr] 59 | fn repl() { [INFO] [stderr] | ^^^^ [INFO] [stderr] [INFO] [stderr] warning: method `disassemble_chunk` is never used [INFO] [stderr] --> src/chunk.rs:55:19 [INFO] [stderr] | [INFO] [stderr] 12 | impl<'a> Chunk { [INFO] [stderr] | -------------- method in this implementation [INFO] [stderr] ... [INFO] [stderr] 55 | pub(crate) fn disassemble_chunk(&self, name: &str) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: field `func_type` is never read [INFO] [stderr] --> src/common.rs:181:16 [INFO] [stderr] | [INFO] [stderr] 177 | pub(crate) struct Function { [INFO] [stderr] | -------- field in this struct [INFO] [stderr] ... [INFO] [stderr] 181 | pub(crate) func_type: FunctionType, [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: `Function` has derived impls for the traits `Debug` and `Clone`, but these are intentionally ignored during dead code analysis [INFO] [stderr] [INFO] [stderr] warning: variant `Function` is never constructed [INFO] [stderr] --> src/common.rs:197:5 [INFO] [stderr] | [INFO] [stderr] 196 | pub(crate) enum FunctionType { [INFO] [stderr] | ------------ variant in this enum [INFO] [stderr] 197 | Function, [INFO] [stderr] | ^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: `FunctionType` has derived impls for the traits `Debug` and `Clone`, but these are intentionally ignored during dead code analysis [INFO] [stderr] [INFO] [stderr] warning: variant `Nil` is never constructed [INFO] [stderr] --> src/common.rs:207:5 [INFO] [stderr] | [INFO] [stderr] 203 | pub(crate) enum Obj { [INFO] [stderr] | --- variant in this enum [INFO] [stderr] ... [INFO] [stderr] 207 | Nil, [INFO] [stderr] | ^^^ [INFO] [stderr] | [INFO] [stderr] = note: `Obj` has derived impls for the traits `Debug` and `Clone`, but these are intentionally ignored during dead code analysis [INFO] [stderr] [INFO] [stderr] warning: method `is_nil` is never used [INFO] [stderr] --> src/common.rs:217:12 [INFO] [stderr] | [INFO] [stderr] 210 | impl Obj { [INFO] [stderr] | -------- method in this implementation [INFO] [stderr] ... [INFO] [stderr] 217 | pub fn is_nil(&self) -> bool { [INFO] [stderr] | ^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: method `emit_bytes` is never used [INFO] [stderr] --> src/compiler.rs:834:8 [INFO] [stderr] | [INFO] [stderr] 204 | impl<'c> Compiler<'c> { [INFO] [stderr] | --------------------- method in this implementation [INFO] [stderr] ... [INFO] [stderr] 834 | fn emit_bytes(&mut self, byte_1: u8, byte_2: u8) { [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: method `dump` is never used [INFO] [stderr] --> src/hash_map.rs:117:19 [INFO] [stderr] | [INFO] [stderr] 24 | / impl Table [INFO] [stderr] 25 | | where [INFO] [stderr] 26 | | T: Clone, [INFO] [stderr] 27 | | T: Debug, [INFO] [stderr] | |_____________- method in this implementation [INFO] [stderr] ... [INFO] [stderr] 117 | pub(crate) fn dump(&self) { [INFO] [stderr] | ^^^^ [INFO] [stderr] [INFO] [stderr] warning: function `allocate_for_value` is never used [INFO] [stderr] --> src/memory.rs:16:8 [INFO] [stderr] | [INFO] [stderr] 16 | pub fn allocate_for_value(value: T) -> *mut u8 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: function `add` is never used [INFO] [stderr] --> src/memory.rs:28:8 [INFO] [stderr] | [INFO] [stderr] 28 | pub fn add(ptr: *mut u8, value: T) { [INFO] [stderr] | ^^^ [INFO] [stderr] [INFO] [stderr] warning: function `size_of` is never used [INFO] [stderr] --> src/memory.rs:34:8 [INFO] [stderr] | [INFO] [stderr] 34 | pub fn size_of(ptr: *mut u8) -> usize { [INFO] [stderr] | ^^^^^^^ [INFO] [stdout] [INFO] [stderr] [INFO] [stdout] running 7 tests [INFO] [stderr] warning: function `print` is never used [INFO] [stdout] test hash_map::tests::can_expand_capacity_as_required ... ok [INFO] [stderr] --> src/memory.rs:42:8 [INFO] [stdout] test hash_map::tests::can_hold_and_return_multiple_keys ... ok [INFO] [stderr] | [INFO] [stderr] 42 | pub fn print(ptr: *mut u8) [INFO] [stderr] | ^^^^^ [INFO] [stderr] [INFO] [stderr] warning: function `drop` is never used [INFO] [stderr] --> src/memory.rs:51:8 [INFO] [stderr] | [INFO] [stderr] 51 | pub fn drop(ptr: *mut u8) { [INFO] [stderr] | ^^^^ [INFO] [stderr] [INFO] [stderr] warning: function `get` is never used [INFO] [stderr] --> src/memory.rs:72:8 [INFO] [stderr] | [INFO] [stderr] 72 | pub fn get(ptr: *mut T) -> T { [INFO] [stderr] | ^^^ [INFO] [stderr] [INFO] [stderr] warning: function `display` is never used [INFO] [stderr] --> src/metrics.rs:26:15 [INFO] [stderr] | [INFO] [stderr] 26 | pub(crate) fn display() { [INFO] [stderr] | ^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: methods `reset_stack` and `is_equal` are never used [INFO] [stderr] --> src/vm.rs:133:8 [INFO] [stderr] | [INFO] [stderr] 111 | impl VM { [INFO] [stderr] | ------- methods in this implementation [INFO] [stderr] ... [INFO] [stderr] 133 | fn reset_stack(&mut self) { [INFO] [stderr] | ^^^^^^^^^^^ [INFO] [stderr] ... [INFO] [stderr] 541 | fn is_equal(&self, left: Value, right: Value) -> bool { [INFO] [stderr] | ^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stderr] --> src/common.rs:10:10 [INFO] [stderr] | [INFO] [stderr] 10 | #[derive(FromPrimitive)] [INFO] [stderr] | ^------------ [INFO] [stderr] | | [INFO] [stderr] | `FromPrimitive` is not local [INFO] [stderr] | move the `impl` block outside of this constant `_IMPL_NUM_FromPrimitive_FOR_OpCode` [INFO] [stderr] 11 | pub(crate) enum OpCode { [INFO] [stderr] | ------ `OpCode` is not local [INFO] [stderr] | [INFO] [stderr] = note: the derive macro `FromPrimitive` defines the non-local `impl`, and may need to be changed [INFO] [stderr] = 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] [stderr] = 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] [stderr] = 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] [stderr] = note: `#[warn(non_local_definitions)]` on by default [INFO] [stderr] = note: this warning originates in the derive macro `FromPrimitive` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] warning: a dangling pointer will be produced because the temporary `std::string::String` will be dropped [INFO] [stderr] --> src/common.rs:270:37 [INFO] [stderr] | [INFO] [stderr] 270 | ptr: "".to_string().as_mut_ptr(), [INFO] [stderr] | -------------- ^^^^^^^^^^ this pointer will immediately be invalid [INFO] [stderr] | | [INFO] [stderr] | this `std::string::String` is deallocated at the end of the statement, bind it to a variable to extend its lifetime [INFO] [stderr] | [INFO] [stderr] = 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] [stderr] = 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] [stderr] = help: in particular, if this pointer is returned from the current function, binding the `std::string::String` inside the function will not suffice [INFO] [stderr] = help: for more information, see [INFO] [stderr] = note: `#[warn(dangling_pointers_from_temporaries)]` on by default [INFO] [stderr] [INFO] [stderr] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stderr] --> src/compiler.rs:13:10 [INFO] [stderr] | [INFO] [stderr] 13 | #[derive(FromPrimitive, Eq, PartialEq)] [INFO] [stderr] | ^------------ [INFO] [stderr] | | [INFO] [stderr] | `FromPrimitive` is not local [INFO] [stderr] | move the `impl` block outside of this constant `_IMPL_NUM_FromPrimitive_FOR_Precedence` [INFO] [stderr] 14 | enum Precedence { [INFO] [stderr] | ---------- `Precedence` is not local [INFO] [stderr] | [INFO] [stderr] = note: the derive macro `FromPrimitive` defines the non-local `impl`, and may need to be changed [INFO] [stderr] = 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] [stderr] = 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] [stderr] = 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] [stderr] = note: this warning originates in the derive macro `FromPrimitive` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] warning: lifetime flowing from input to output with different syntax can be confusing [INFO] [stderr] --> src/compiler.rs:205:50 [INFO] [stderr] | [INFO] [stderr] 205 | pub(crate) fn init(scanner: Scanner, table: &'c mut Table) -> Compiler { [INFO] [stderr] | ^^ -------- the lifetime gets resolved as `'c` [INFO] [stderr] | | [INFO] [stderr] | this lifetime flows to the output [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stderr] help: one option is to consistently use `'c` [INFO] [stderr] | [INFO] [stderr] 205 | pub(crate) fn init(scanner: Scanner, table: &'c mut Table) -> Compiler<'c> { [INFO] [stderr] | ++++ [INFO] [stderr] [INFO] [stderr] warning: a dangling pointer will be produced because the temporary `std::string::String` will be dropped [INFO] [stderr] --> src/hash_map.rs:212:36 [INFO] [stderr] | [INFO] [stderr] 212 | ptr: value.to_string().as_mut_ptr(), [INFO] [stderr] | ----------------- ^^^^^^^^^^ this pointer will immediately be invalid [INFO] [stderr] | | [INFO] [stderr] | this `std::string::String` is deallocated at the end of the statement, bind it to a variable to extend its lifetime [INFO] [stderr] | [INFO] [stderr] = 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] [stderr] = 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] [stderr] = help: in particular, if this pointer is returned from the current function, binding the `std::string::String` inside the function will not suffice [INFO] [stderr] = help: for more information, see [INFO] [stderr] [INFO] [stderr] warning: creating a mutable reference to mutable static [INFO] [stderr] --> src/metrics.rs:21:9 [INFO] [stderr] | [INFO] [stderr] 21 | EVENTS.as_mut().unwrap().insert(name, total_time); [INFO] [stderr] | ^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stderr] | [INFO] [stderr] = note: for more information, see [INFO] [stderr] = 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] [stderr] = note: `#[warn(static_mut_refs)]` on by default [INFO] [stderr] [INFO] [stderr] warning: creating a shared reference to mutable static [INFO] [stderr] --> src/metrics.rs:29:9 [INFO] [stderr] | [INFO] [stderr] 29 | EVENTS.as_ref().unwrap().iter().for_each(|(key, value)| { [INFO] [stderr] | ^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stderr] | [INFO] [stderr] = note: for more information, see [INFO] [stderr] = 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] [stderr] [INFO] [stderr] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stderr] --> src/scanner.rs:4:41 [INFO] [stderr] | [INFO] [stderr] 4 | #[derive(Debug, PartialEq, Copy, Clone, FromPrimitive, Hash, Eq)] [INFO] [stderr] | ^------------ [INFO] [stderr] | | [INFO] [stderr] | `FromPrimitive` is not local [INFO] [stderr] | move the `impl` block outside of this constant `_IMPL_NUM_FromPrimitive_FOR_TokenType` [INFO] [stderr] 5 | pub(crate) enum TokenType { [INFO] [stderr] | --------- `TokenType` is not local [INFO] [stdout] test hash_map::tests::can_hold_multiple_keys ... ok [INFO] [stderr] | [INFO] [stderr] = note: the derive macro `FromPrimitive` defines the non-local `impl`, and may need to be changed [INFO] [stderr] = 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] [stderr] = 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] [stderr] = 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] [stderr] = note: this warning originates in the derive macro `FromPrimitive` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] warning: `rlox` (bin "rlox" test) generated 38 warnings (run `cargo fix --bin "rlox" --tests` to apply 4 suggestions) [INFO] [stderr] Finished `test` profile [unoptimized + debuginfo] target(s) in 0.08s [INFO] [stderr] Running unittests src/main.rs (/opt/rustwide/target/x86_64-unknown-linux-musl/debug/deps/rlox-7c96514a62e3d9ad) [INFO] [stdout] test hash_map::tests::can_hold_multiple_keys_multiple_tables ... ok [INFO] [stdout] test hasher::tests::can_calculate_hash ... ok [INFO] [stdout] test hash_map::tests::can_handle_reference ... ok [INFO] [stdout] test hash_map::tests::can_hold_and_delete_multiple_keys ... FAILED [INFO] [stdout] [INFO] [stdout] failures: [INFO] [stdout] [INFO] [stdout] ---- hash_map::tests::can_hold_and_delete_multiple_keys stdout ---- [INFO] [stdout] Entry index: None [INFO] [stdout] [INFO] [stdout] thread 'hash_map::tests::can_hold_and_delete_multiple_keys' panicked at src/hash_map.rs:50:43: [INFO] [stdout] called `Option::unwrap()` on a `None` value [INFO] [stdout] stack backtrace: [INFO] [stdout] 0: 0x794f1b8aada2 - std::backtrace_rs::backtrace::libunwind::trace::h559918daaaf51ab7 [INFO] [stdout] at /rustc/8de4c7234dd9b97c9d76b58671343fdbbc9a433e/library/std/src/../../backtrace/src/backtrace/libunwind.rs:117:9 [INFO] [stdout] 1: 0x794f1b8aada2 - std::backtrace_rs::backtrace::trace_unsynchronized::hb04fbcf80d07af8b [INFO] [stdout] at /rustc/8de4c7234dd9b97c9d76b58671343fdbbc9a433e/library/std/src/../../backtrace/src/backtrace/mod.rs:66:14 [INFO] [stdout] 2: 0x794f1b8aada2 - std::sys::backtrace::_print_fmt::h7c0bbbbfac0065d4 [INFO] [stdout] at /rustc/8de4c7234dd9b97c9d76b58671343fdbbc9a433e/library/std/src/sys/backtrace.rs:66:9 [INFO] [stdout] 3: 0x794f1b8aada2 - ::fmt::hb62c8ed31943daa5 [INFO] [stdout] at /rustc/8de4c7234dd9b97c9d76b58671343fdbbc9a433e/library/std/src/sys/backtrace.rs:39:26 [INFO] [stdout] 4: 0x794f1b8e4ec3 - core::fmt::rt::Argument::fmt::he5eaa7dd607ed4c9 [INFO] [stdout] at /rustc/8de4c7234dd9b97c9d76b58671343fdbbc9a433e/library/core/src/fmt/rt.rs:173:76 [INFO] [stdout] 5: 0x794f1b8e4ec3 - core::fmt::write::h375399f8cb90b45a [INFO] [stdout] at /rustc/8de4c7234dd9b97c9d76b58671343fdbbc9a433e/library/core/src/fmt/mod.rs:1460:25 [INFO] [stdout] 6: 0x794f1b8a80d3 - std::io::default_write_fmt::hdc1b4dd565dd0099 [INFO] [stdout] at /rustc/8de4c7234dd9b97c9d76b58671343fdbbc9a433e/library/std/src/io/mod.rs:639:11 [INFO] [stdout] 7: 0x794f1b8a80d3 - std::io::Write::write_fmt::h29f6044e9bc43c23 [INFO] [stdout] at /rustc/8de4c7234dd9b97c9d76b58671343fdbbc9a433e/library/std/src/io/mod.rs:1954:13 [INFO] [stdout] 8: 0x794f1b8aabf2 - std::sys::backtrace::BacktraceLock::print::ha189c586374f916a [INFO] [stdout] at /rustc/8de4c7234dd9b97c9d76b58671343fdbbc9a433e/library/std/src/sys/backtrace.rs:42:9 [INFO] [stdout] 9: 0x794f1b8ac36c - std::panicking::default_hook::{{closure}}::ha3a26c98ff210e12 [INFO] [stdout] at /rustc/8de4c7234dd9b97c9d76b58671343fdbbc9a433e/library/std/src/panicking.rs:300:27 [INFO] [stdout] 10: 0x794f1b8ac1c2 - std::panicking::default_hook::h8c8a86b4390ab794 [INFO] [stdout] at /rustc/8de4c7234dd9b97c9d76b58671343fdbbc9a433e/library/std/src/panicking.rs:324:9 [INFO] [stdout] 11: 0x794f1b876ea4 - as core::ops::function::Fn>::call::ha39ae63ed1e9a130 [INFO] [stdout] at /rustc/8de4c7234dd9b97c9d76b58671343fdbbc9a433e/library/alloc/src/boxed.rs:1980:9 [INFO] [stdout] 12: 0x794f1b876ea4 - test::test_main_with_exit_callback::{{closure}}::h9df7c328ebe18c28 [INFO] [stdout] at /rustc/8de4c7234dd9b97c9d76b58671343fdbbc9a433e/library/test/src/lib.rs:145:21 [INFO] [stdout] 13: 0x794f1b8accf3 - as core::ops::function::Fn>::call::h96b7201b552e9069 [INFO] [stdout] at /rustc/8de4c7234dd9b97c9d76b58671343fdbbc9a433e/library/alloc/src/boxed.rs:1980:9 [INFO] [stdout] 14: 0x794f1b8accf3 - std::panicking::rust_panic_with_hook::hb3b66c2e80efa371 [INFO] [stdout] at /rustc/8de4c7234dd9b97c9d76b58671343fdbbc9a433e/library/std/src/panicking.rs:841:13 [INFO] [stdout] 15: 0x794f1b8aca86 - std::panicking::begin_panic_handler::{{closure}}::h9c68d0f839e62070 [INFO] [stdout] at /rustc/8de4c7234dd9b97c9d76b58671343fdbbc9a433e/library/std/src/panicking.rs:699:13 [INFO] [stdout] 16: 0x794f1b8ab299 - std::sys::backtrace::__rust_end_short_backtrace::h68d22ddde4a73ad6 [INFO] [stdout] at /rustc/8de4c7234dd9b97c9d76b58671343fdbbc9a433e/library/std/src/sys/backtrace.rs:168:18 [INFO] [stdout] 17: 0x794f1b8ac74d - __rustc[f4ffc7196a45a630]::rust_begin_unwind [INFO] [stdout] at /rustc/8de4c7234dd9b97c9d76b58671343fdbbc9a433e/library/std/src/panicking.rs:697:5 [INFO] [stdout] 18: 0x794f1b838de0 - core::panicking::panic_fmt::h8cdd4c81eb9069aa [INFO] [stdout] at /rustc/8de4c7234dd9b97c9d76b58671343fdbbc9a433e/library/core/src/panicking.rs:75:14 [INFO] [stdout] 19: 0x794f1b838e6c - core::panicking::panic::hd54a104e9b8d4d02 [INFO] [stdout] at /rustc/8de4c7234dd9b97c9d76b58671343fdbbc9a433e/library/core/src/panicking.rs:145:5 [INFO] [stdout] 20: 0x794f1b838d59 - core::option::unwrap_failed::hd4464c0b866bac5c [INFO] [stdout] at /rustc/8de4c7234dd9b97c9d76b58671343fdbbc9a433e/library/core/src/option.rs:2072:5 [INFO] [stdout] 21: 0x794f1b83ae6c - core::option::Option::unwrap::h3ad45aed02528b4e [INFO] [stdout] at /rustc/8de4c7234dd9b97c9d76b58671343fdbbc9a433e/library/core/src/option.rs:1005:21 [INFO] [stdout] 22: 0x794f1b83ae6c - rlox::hash_map::Table::get::h18ce4f668a12b5cf [INFO] [stdout] at /opt/rustwide/workdir/src/hash_map.rs:50:43 [INFO] [stdout] 23: 0x794f1b83e665 - rlox::hash_map::tests::can_hold_and_delete_multiple_keys::h6ee85230a9d50019 [INFO] [stdout] at /opt/rustwide/workdir/src/hash_map.rs:273:24 [INFO] [stdout] 24: 0x794f1b83e517 - rlox::hash_map::tests::can_hold_and_delete_multiple_keys::{{closure}}::h5a5b7cc698092066 [INFO] [stdout] at /opt/rustwide/workdir/src/hash_map.rs:264:43 [INFO] [stdout] 25: 0x794f1b83c706 - core::ops::function::FnOnce::call_once::h134514d6bfc8b15b [INFO] [stdout] at /rustc/8de4c7234dd9b97c9d76b58671343fdbbc9a433e/library/core/src/ops/function.rs:250:5 [INFO] [stdout] 26: 0x794f1b87c59b - core::ops::function::FnOnce::call_once::h9633dcf760ae81b2 [INFO] [stdout] at /rustc/8de4c7234dd9b97c9d76b58671343fdbbc9a433e/library/core/src/ops/function.rs:250:5 [INFO] [stdout] 27: 0x794f1b87c59b - test::__rust_begin_short_backtrace::h12ad5e04c8d7b4a5 [INFO] [stdout] at /rustc/8de4c7234dd9b97c9d76b58671343fdbbc9a433e/library/test/src/lib.rs:648:18 [INFO] [stdout] 28: 0x794f1b87b80e - test::run_test_in_process::{{closure}}::he596b4fd3fa4893c [INFO] [stdout] at /rustc/8de4c7234dd9b97c9d76b58671343fdbbc9a433e/library/test/src/lib.rs:671:74 [INFO] [stdout] 29: 0x794f1b87b80e - as core::ops::function::FnOnce<()>>::call_once::hc746bc3fa75190e0 [INFO] [stdout] at /rustc/8de4c7234dd9b97c9d76b58671343fdbbc9a433e/library/core/src/panic/unwind_safe.rs:272:9 [INFO] [stdout] 30: 0x794f1b87b80e - std::panicking::catch_unwind::do_call::hf4843906108d6299 [INFO] [stdout] at /rustc/8de4c7234dd9b97c9d76b58671343fdbbc9a433e/library/std/src/panicking.rs:589:40 [INFO] [stdout] 31: 0x794f1b87b80e - std::panicking::catch_unwind::h849d4e8b03577bb9 [INFO] [stdout] at /rustc/8de4c7234dd9b97c9d76b58671343fdbbc9a433e/library/std/src/panicking.rs:552:19 [INFO] [stdout] 32: 0x794f1b87b80e - std::panic::catch_unwind::ha1f814c1dec025d2 [INFO] [stdout] at /rustc/8de4c7234dd9b97c9d76b58671343fdbbc9a433e/library/std/src/panic.rs:359:14 [INFO] [stdout] 33: 0x794f1b87b80e - test::run_test_in_process::h542aad3fe61255e7 [INFO] [stdout] at /rustc/8de4c7234dd9b97c9d76b58671343fdbbc9a433e/library/test/src/lib.rs:671:27 [INFO] [stdout] 34: 0x794f1b87b80e - test::run_test::{{closure}}::h612788d75908cb63 [INFO] [stdout] at /rustc/8de4c7234dd9b97c9d76b58671343fdbbc9a433e/library/test/src/lib.rs:592:43 [INFO] [stdout] 35: 0x794f1b840694 - test::run_test::{{closure}}::hbfeea3bcb7245123 [INFO] [stdout] at /rustc/8de4c7234dd9b97c9d76b58671343fdbbc9a433e/library/test/src/lib.rs:622:41 [INFO] [stdout] 36: 0x794f1b840694 - std::sys::backtrace::__rust_begin_short_backtrace::h72542b83b4f87d5b [INFO] [stdout] at /rustc/8de4c7234dd9b97c9d76b58671343fdbbc9a433e/library/std/src/sys/backtrace.rs:152:18 [INFO] [stdout] 37: 0x794f1b843e8a - std::thread::Builder::spawn_unchecked_::{{closure}}::{{closure}}::hff26a7547ea762c9 [INFO] [stdout] at /rustc/8de4c7234dd9b97c9d76b58671343fdbbc9a433e/library/std/src/thread/mod.rs:559:17 [INFO] [stdout] 38: 0x794f1b843e8a - as core::ops::function::FnOnce<()>>::call_once::hbee49bc759312884 [INFO] [stdout] at /rustc/8de4c7234dd9b97c9d76b58671343fdbbc9a433e/library/core/src/panic/unwind_safe.rs:272:9 [INFO] [stdout] 39: 0x794f1b843e8a - std::panicking::catch_unwind::do_call::h61de12ce5e04e28f [INFO] [stdout] at /rustc/8de4c7234dd9b97c9d76b58671343fdbbc9a433e/library/std/src/panicking.rs:589:40 [INFO] [stdout] 40: 0x794f1b843e8a - std::panicking::catch_unwind::h454dd49873d22e18 [INFO] [stdout] at /rustc/8de4c7234dd9b97c9d76b58671343fdbbc9a433e/library/std/src/panicking.rs:552:19 [INFO] [stdout] 41: 0x794f1b843e8a - std::panic::catch_unwind::h5c15187324f8cebb [INFO] [stdout] at /rustc/8de4c7234dd9b97c9d76b58671343fdbbc9a433e/library/std/src/panic.rs:359:14 [INFO] [stdout] 42: 0x794f1b843e8a - std::thread::Builder::spawn_unchecked_::{{closure}}::hbc9d9c7427673d42 [INFO] [stdout] at /rustc/8de4c7234dd9b97c9d76b58671343fdbbc9a433e/library/std/src/thread/mod.rs:557:30 [INFO] [stdout] 43: 0x794f1b843e8a - core::ops::function::FnOnce::call_once{{vtable.shim}}::hefd458a129ddca13 [INFO] [stdout] at /rustc/8de4c7234dd9b97c9d76b58671343fdbbc9a433e/library/core/src/ops/function.rs:250:5 [INFO] [stdout] 44: 0x794f1b8af747 - as core::ops::function::FnOnce>::call_once::h2d6e2e526b02c3da [INFO] [stdout] at /rustc/8de4c7234dd9b97c9d76b58671343fdbbc9a433e/library/alloc/src/boxed.rs:1966:9 [INFO] [stdout] 45: 0x794f1b8af747 - as core::ops::function::FnOnce>::call_once::h1aefced482b33c72 [INFO] [stdout] at /rustc/8de4c7234dd9b97c9d76b58671343fdbbc9a433e/library/alloc/src/boxed.rs:1966:9 [INFO] [stdout] 46: 0x794f1b8af747 - std::sys::pal::unix::thread::Thread::new::thread_start::h7c9c6951b48f721d [INFO] [stdout] at /rustc/8de4c7234dd9b97c9d76b58671343fdbbc9a433e/library/std/src/sys/pal/unix/thread.rs:97:17 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] failures: [INFO] [stdout] hash_map::tests::can_hold_and_delete_multiple_keys [INFO] [stdout] [INFO] [stdout] test result: FAILED. 6 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.10s [INFO] [stdout] [INFO] [stderr] error: test failed, to rerun pass `--bin rlox` [INFO] running `Command { std: "docker" "inspect" "6c1a79bcf0470d3a8962b6291aac6ae4c8f92fc8f00f53a52ea3b15cfec1a9f1", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "6c1a79bcf0470d3a8962b6291aac6ae4c8f92fc8f00f53a52ea3b15cfec1a9f1", kill_on_drop: false }` [INFO] [stdout] 6c1a79bcf0470d3a8962b6291aac6ae4c8f92fc8f00f53a52ea3b15cfec1a9f1