[INFO] cloning repository https://github.com/devDesu/RustyMoon [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/devDesu/RustyMoon" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FdevDesu%2FRustyMoon", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FdevDesu%2FRustyMoon'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 8da2a6615202bc34243e6e2e35bb322ed4b923c3 [INFO] testing devDesu/RustyMoon against master#cdb45c87e2cd43495379f7e867e3cc15dcee9f93 for pr-145838-1 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FdevDesu%2FRustyMoon" "/workspace/builds/worker-0-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-0-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/devDesu/RustyMoon [INFO] finished tweaking git repo https://github.com/devDesu/RustyMoon [INFO] tweaked toml for git repo https://github.com/devDesu/RustyMoon written to /workspace/builds/worker-0-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/devDesu/RustyMoon on toolchain cdb45c87e2cd43495379f7e867e3cc15dcee9f93 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+cdb45c87e2cd43495379f7e867e3cc15dcee9f93" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/devDesu/RustyMoon 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" "+cdb45c87e2cd43495379f7e867e3cc15dcee9f93" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-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:7ad1b28ee6f5f7f699f6cf7015098d6ccdd96d6f2d78dd06228f5b4c9faf309c" "/opt/rustwide/cargo-home/bin/cargo" "+cdb45c87e2cd43495379f7e867e3cc15dcee9f93" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 6edea864efb7a9df2f229fc17752d1a83d4942b3f5a5e74f6101360d33b5571a [INFO] running `Command { std: "docker" "start" "-a" "6edea864efb7a9df2f229fc17752d1a83d4942b3f5a5e74f6101360d33b5571a", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "6edea864efb7a9df2f229fc17752d1a83d4942b3f5a5e74f6101360d33b5571a", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "6edea864efb7a9df2f229fc17752d1a83d4942b3f5a5e74f6101360d33b5571a", kill_on_drop: false }` [INFO] [stdout] 6edea864efb7a9df2f229fc17752d1a83d4942b3f5a5e74f6101360d33b5571a [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-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:7ad1b28ee6f5f7f699f6cf7015098d6ccdd96d6f2d78dd06228f5b4c9faf309c" "/opt/rustwide/cargo-home/bin/cargo" "+cdb45c87e2cd43495379f7e867e3cc15dcee9f93" "build" "--frozen" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] d2e91e40396bb8da8b88d0711d46462c2ea2a9679378030a229c4f229b0d37aa [INFO] running `Command { std: "docker" "start" "-a" "d2e91e40396bb8da8b88d0711d46462c2ea2a9679378030a229c4f229b0d37aa", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.66 [INFO] [stderr] Compiling unicode-ident v1.0.11 [INFO] [stderr] Compiling serde v1.0.188 [INFO] [stderr] Compiling vm-core v0.0.1 (/opt/rustwide/workdir/crates/vm-core) [INFO] [stderr] Compiling quote v1.0.33 [INFO] [stderr] Compiling syn v2.0.29 [INFO] [stderr] Compiling serde_derive v1.0.188 [INFO] [stderr] Compiling RustyMoon v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: type `u17` should have an upper camel case name [INFO] [stdout] --> src/core/opcodes.rs:50:6 [INFO] [stdout] | [INFO] [stdout] 50 | type u17 = u32; [INFO] [stdout] | ^^^ help: convert the identifier to upper camel case (notice the capitalization): `U17` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_camel_case_types)]` (part of `#[warn(nonstandard_style)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `i17` should have an upper camel case name [INFO] [stdout] --> src/core/opcodes.rs:51:6 [INFO] [stdout] | [INFO] [stdout] 51 | type i17 = i32; [INFO] [stdout] | ^^^ help: convert the identifier to upper camel case (notice the capitalization): `I17` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `u25` should have an upper camel case name [INFO] [stdout] --> src/core/opcodes.rs:52:6 [INFO] [stdout] | [INFO] [stdout] 52 | type u25 = u32; [INFO] [stdout] | ^^^ help: convert the identifier to upper camel case (notice the capitalization): `U25` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `i25` should have an upper camel case name [INFO] [stdout] --> src/core/opcodes.rs:53:6 [INFO] [stdout] | [INFO] [stdout] 53 | type i25 = i32; [INFO] [stdout] | ^^^ help: convert the identifier to upper camel case (notice the capitalization): `I25` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `b` is never read [INFO] [stdout] --> src/core/parser.rs:27:17 [INFO] [stdout] | [INFO] [stdout] 27 | let mut b = 0_u8; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `line_defined` [INFO] [stdout] --> src/core/parser.rs:176:13 [INFO] [stdout] | [INFO] [stdout] 176 | let line_defined = self.read_int() as usize; [INFO] [stdout] | ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_line_defined` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `last_line_defined` [INFO] [stdout] --> src/core/parser.rs:177:13 [INFO] [stdout] | [INFO] [stdout] 177 | let last_line_defined = self.read_int() as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_last_line_defined` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0502]: cannot borrow `*stack` as mutable because it is also borrowed as immutable [INFO] [stdout] --> src/core/types/stack.rs:58:16 [INFO] [stdout] | [INFO] [stdout] 57 | let closure = call_info.get_lua_closure(stack); [INFO] [stdout] | ----- immutable borrow occurs here [INFO] [stdout] 58 | Self { stack, base: call_info.base, top: call_info.top, num_varargs: call_info.nextraargs, num_args: closure.proto.num_params } [INFO] [stdout] | ^^^^^ mutable borrow occurs here ------------------------ immutable borrow later used here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `arg` [INFO] [stdout] --> src/core/types/stack.rs:73:27 [INFO] [stdout] | [INFO] [stdout] 73 | pub fn get_arg(&self, arg: usize) -> &TValue { panic!("") } [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_arg` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `values` [INFO] [stdout] --> src/core/types/stack.rs:75:41 [INFO] [stdout] | [INFO] [stdout] 75 | pub fn set_return_values(&mut self, values: &[TValue]) { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_values` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: lifetime may not live long enough [INFO] [stdout] --> src/core/types/mod.rs:73:9 [INFO] [stdout] | [INFO] [stdout] 72 | pub fn get_value(&self, stack: &stack::LuaStack) -> &TValue { [INFO] [stdout] | - - let's call the lifetime of this reference `'1` [INFO] [stdout] | | [INFO] [stdout] | let's call the lifetime of this reference `'2` [INFO] [stdout] 73 | / match self { [INFO] [stdout] 74 | | Self::Open(offset) => stack.get_at_offset(*offset), [INFO] [stdout] 75 | | Self::Closed(val) => val, [INFO] [stdout] 76 | | } [INFO] [stdout] | |_________^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1` [INFO] [stdout] | [INFO] [stdout] help: consider introducing a named lifetime parameter and update trait if needed [INFO] [stdout] | [INFO] [stdout] 72 | pub fn get_value<'a>(&self, stack: &'a stack::LuaStack) -> &'a TValue { [INFO] [stdout] | ++++ ++ ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: lifetime may not live long enough [INFO] [stdout] --> src/core/types/mod.rs:82:26 [INFO] [stdout] | [INFO] [stdout] 79 | pub fn set_value(&mut self, stack: &mut stack::LuaStack, value: &mut TValue) -> () { [INFO] [stdout] | - let's call the lifetime of this reference `'1` [INFO] [stdout] ... [INFO] [stdout] 82 | Self::Closed(old) => { [INFO] [stdout] | ^^^ assignment requires that `'1` must outlive `'static` [INFO] [stdout] | [INFO] [stdout] = note: requirement occurs because of a mutable reference to `&mut TValue` [INFO] [stdout] = note: mutable references are invariant over their type parameter [INFO] [stdout] = help: see for more information about variance [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0507]: cannot move out of a shared reference [INFO] [stdout] --> src/core/types/mod.rs:118:37 [INFO] [stdout] | [INFO] [stdout] 118 | self.set_upvalue(i, *parent_upvalues.get(descr.idx as usize).unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ move occurs because value has type `UpVal`, which does not implement the `Copy` trait [INFO] [stdout] | [INFO] [stdout] note: if `UpVal` implemented `Clone`, you could clone the value [INFO] [stdout] --> src/core/types/mod.rs:62:1 [INFO] [stdout] | [INFO] [stdout] 62 | pub enum UpVal { [INFO] [stdout] | ^^^^^^^^^^^^^^^ consider implementing `Clone` for this type [INFO] [stdout] ... [INFO] [stdout] 118 | self.set_upvalue(i, *parent_upvalues.get(descr.idx as usize).unwrap()); [INFO] [stdout] | ------------------------------------------------- you could clone this value [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `c_closure` [INFO] [stdout] --> src/core/types/mod.rs:125:24 [INFO] [stdout] | [INFO] [stdout] 125 | Closure::C(c_closure) => todo!(), [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_c_closure` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `lua_closure` [INFO] [stdout] --> src/core/types/mod.rs:155:13 [INFO] [stdout] | [INFO] [stdout] 155 | let lua_closure = Closure::new_lua(proto); [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_lua_closure` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0521]: borrowed data escapes outside of associated function [INFO] [stdout] --> src/core/types/mod.rs:155:27 [INFO] [stdout] | [INFO] [stdout] 154 | pub fn new_lua(proto: &Proto, fn_idx: StackIndex) -> Self { [INFO] [stdout] | ----- - let's call the lifetime of this reference `'1` [INFO] [stdout] | | [INFO] [stdout] | `proto` is a reference that is only valid in the associated function body [INFO] [stdout] 155 | let lua_closure = Closure::new_lua(proto); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | `proto` escapes the associated function body here [INFO] [stdout] | argument requires that `'1` must outlive `'static` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0596]: cannot borrow `*node` as mutable, as it is behind a `&` reference [INFO] [stdout] --> src/structures/linked_list.rs:52:48 [INFO] [stdout] | [INFO] [stdout] 52 | self.head.as_ref().map(| node | { &mut node.as_mut().value }) [INFO] [stdout] | ---- ^^^^ `node` is a `&` reference, so the data it refers to cannot be borrowed as mutable [INFO] [stdout] | | [INFO] [stdout] | consider changing this binding's type to be: `&mut Box>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `result` is never read [INFO] [stdout] --> src/vm/mod.rs:16:13 [INFO] [stdout] | [INFO] [stdout] 16 | let mut result = 0_usize; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0502]: cannot borrow `thread.stack` as mutable because it is also borrowed as immutable [INFO] [stdout] --> src/vm/mod.rs:78:43 [INFO] [stdout] | [INFO] [stdout] 72 | let lua_closure = match call_info.get_closure(&thread.stack) { [INFO] [stdout] | ------------- immutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 78 | let mut frame = LuaStackView::new(&mut thread.stack, &mut call_info); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ mutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 94 | let extra_arg = lua_closure.proto.code.get(call_info.pc).unwrap(); [INFO] [stdout] | ---------------------- immutable borrow later used here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0596]: cannot borrow `call_info` as mutable, as it is not declared as mutable [INFO] [stdout] --> src/vm/mod.rs:78:62 [INFO] [stdout] | [INFO] [stdout] 78 | let mut frame = LuaStackView::new(&mut thread.stack, &mut call_info); [INFO] [stdout] | ^^^^^^^^^^^^^^ cannot borrow as mutable [INFO] [stdout] | [INFO] [stdout] note: the binding is already a mutable borrow [INFO] [stdout] --> src/vm/mod.rs:71:13 [INFO] [stdout] | [INFO] [stdout] 71 | let call_info = thread.current_call.front_mut().unwrap(); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] help: try removing `&mut` here [INFO] [stdout] | [INFO] [stdout] 78 - let mut frame = LuaStackView::new(&mut thread.stack, &mut call_info); [INFO] [stdout] 78 + let mut frame = LuaStackView::new(&mut thread.stack, call_info); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0382]: borrow of moved value: `frame` [INFO] [stdout] --> src/vm/mod.rs:82:69 [INFO] [stdout] | [INFO] [stdout] 78 | let mut frame = LuaStackView::new(&mut thread.stack, &mut call_info); [INFO] [stdout] | --------- move occurs because `frame` has type `LuaStackView<'_>`, which does not implement the `Copy` trait [INFO] [stdout] ... [INFO] [stdout] 82 | frame.set_register(instruction.args.get_A().into(), frame.get_register(instruction.args.get_B().into()).clone()); [INFO] [stdout] | ----- value moved here ^^^^^ value borrowed here after move [INFO] [stdout] | [INFO] [stdout] note: if `LuaStackView<'_>` implemented `Clone`, you could clone the value [INFO] [stdout] --> src/core/types/stack.rs:46:1 [INFO] [stdout] | [INFO] [stdout] 46 | pub struct LuaStackView<'stack> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ consider implementing `Clone` for this type [INFO] [stdout] | [INFO] [stdout] ::: src/vm/mod.rs:82:17 [INFO] [stdout] | [INFO] [stdout] 82 | frame.set_register(instruction.args.get_A().into(), frame.get_register(instruction.args.get_B().into()).clone()); [INFO] [stdout] | ----- you could clone this value [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0382]: use of moved value: `frame` [INFO] [stdout] --> src/vm/mod.rs:114:21 [INFO] [stdout] | [INFO] [stdout] 78 | let mut frame = LuaStackView::new(&mut thread.stack, &mut call_info); [INFO] [stdout] | --------- move occurs because `frame` has type `LuaStackView<'_>`, which does not implement the `Copy` trait [INFO] [stdout] ... [INFO] [stdout] 113 | for i in 0..count { [INFO] [stdout] | ----------------- inside of this loop [INFO] [stdout] 114 | frame.set_register(base + (i as StackIndex), TValue::NIL); [INFO] [stdout] | ^^^^^ value moved here, in previous iteration of loop [INFO] [stdout] | [INFO] [stdout] note: if `LuaStackView<'_>` implemented `Clone`, you could clone the value [INFO] [stdout] --> src/core/types/stack.rs:46:1 [INFO] [stdout] | [INFO] [stdout] 46 | pub struct LuaStackView<'stack> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ consider implementing `Clone` for this type [INFO] [stdout] | [INFO] [stdout] ::: src/vm/mod.rs:114:21 [INFO] [stdout] | [INFO] [stdout] 114 | frame.set_register(base + (i as StackIndex), TValue::NIL); [INFO] [stdout] | ----- you could clone this value [INFO] [stdout] help: consider moving the expression out of the loop so it is only moved once [INFO] [stdout] | [INFO] [stdout] 113 ~ let mut value = frame.set_register(base + (i as StackIndex), TValue::NIL); [INFO] [stdout] 114 ~ for i in 0..count { [INFO] [stdout] 115 ~ value; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0507]: cannot move out of a shared reference [INFO] [stdout] --> src/vm/mod.rs:119:69 [INFO] [stdout] | [INFO] [stdout] 119 | frame.set_register(instruction.args.get_A().into(), *upval.get_value(&thread.stack)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ move occurs because value has type `TValue`, which does not implement the `Copy` trait [INFO] [stdout] | [INFO] [stdout] help: consider cloning the value if the performance cost is acceptable [INFO] [stdout] | [INFO] [stdout] 119 - frame.set_register(instruction.args.get_A().into(), *upval.get_value(&thread.stack)); [INFO] [stdout] 119 + frame.set_register(instruction.args.get_A().into(), upval.get_value(&thread.stack).clone()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0502]: cannot borrow `thread.stack` as immutable because it is also borrowed as mutable [INFO] [stdout] --> src/vm/mod.rs:119:86 [INFO] [stdout] | [INFO] [stdout] 78 | let mut frame = LuaStackView::new(&mut thread.stack, &mut call_info); [INFO] [stdout] | ----------------- mutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 119 | frame.set_register(instruction.args.get_A().into(), *upval.get_value(&thread.stack)); [INFO] [stdout] | ------------ mutable borrow later used by call ^^^^^^^^^^^^^ immutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0596]: cannot borrow `lua_closure.upvalues` as mutable, as it is behind a `&` reference [INFO] [stdout] --> src/vm/mod.rs:123:17 [INFO] [stdout] | [INFO] [stdout] 123 | lua_closure.upvalues[instruction.args.get_B() as usize].set_value(&mut thread.stack, val); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ `lua_closure` is a `&` reference, so the data it refers to cannot be borrowed as mutable [INFO] [stdout] | [INFO] [stdout] help: consider specifying this binding's type [INFO] [stdout] | [INFO] [stdout] 72 | let lua_closure: &mut LuaClosure = match call_info.get_closure(&thread.stack) { [INFO] [stdout] | +++++++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0502]: cannot borrow `thread.stack` as mutable because it is also borrowed as immutable [INFO] [stdout] --> src/vm/mod.rs:123:83 [INFO] [stdout] | [INFO] [stdout] 72 | let lua_closure = match call_info.get_closure(&thread.stack) { [INFO] [stdout] | ------------- immutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 123 | lua_closure.upvalues[instruction.args.get_B() as usize].set_value(&mut thread.stack, val); [INFO] [stdout] | --------- ^^^^^^^^^^^^^^^^^ mutable borrow occurs here [INFO] [stdout] | | [INFO] [stdout] | immutable borrow later used by call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0502]: cannot borrow `thread.stack` as mutable because it is also borrowed as immutable [INFO] [stdout] --> src/vm/mod.rs:315:17 [INFO] [stdout] | [INFO] [stdout] 72 | let lua_closure = match call_info.get_closure(&thread.stack) { [INFO] [stdout] | ------------- immutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 315 | thread.stack.set_at_offset(TValue::CLOSURE(Rc::new(new_closure)), instruction.args.get_A().into()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ mutable borrow occurs here [INFO] [stdout] 316 | new_closure.init_upvalues(proto.upvalues, lua_closure.upvalues); [INFO] [stdout] | -------------------- immutable borrow later used here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0382]: borrow of moved value: `new_closure` [INFO] [stdout] --> src/vm/mod.rs:316:17 [INFO] [stdout] | [INFO] [stdout] 314 | let mut new_closure = Closure::new_lua(proto); [INFO] [stdout] | --------------- move occurs because `new_closure` has type `Closure`, which does not implement the `Copy` trait [INFO] [stdout] 315 | thread.stack.set_at_offset(TValue::CLOSURE(Rc::new(new_closure)), instruction.args.get_A().into()); [INFO] [stdout] | ----------- value moved here [INFO] [stdout] 316 | new_closure.init_upvalues(proto.upvalues, lua_closure.upvalues); [INFO] [stdout] | ^^^^^^^^^^^ value borrowed here after move [INFO] [stdout] | [INFO] [stdout] note: if `Closure` implemented `Clone`, you could clone the value [INFO] [stdout] --> src/core/types/mod.rs:102:1 [INFO] [stdout] | [INFO] [stdout] 102 | pub enum Closure { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ consider implementing `Clone` for this type [INFO] [stdout] | [INFO] [stdout] ::: src/vm/mod.rs:315:68 [INFO] [stdout] | [INFO] [stdout] 315 | thread.stack.set_at_offset(TValue::CLOSURE(Rc::new(new_closure)), instruction.args.get_A().into()); [INFO] [stdout] | ----------- you could clone this value [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0507]: cannot move out of `proto.upvalues` which is behind a shared reference [INFO] [stdout] --> src/vm/mod.rs:316:43 [INFO] [stdout] | [INFO] [stdout] 316 | new_closure.init_upvalues(proto.upvalues, lua_closure.upvalues); [INFO] [stdout] | ^^^^^^^^^^^^^^ move occurs because `proto.upvalues` has type `Vec`, which does not implement the `Copy` trait [INFO] [stdout] | [INFO] [stdout] note: if `UpvalueDescription` implemented `Clone`, you could clone the value [INFO] [stdout] --> src/core/types/mod.rs:36:1 [INFO] [stdout] | [INFO] [stdout] 36 | pub struct UpvalueDescription { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ consider implementing `Clone` for this type [INFO] [stdout] | [INFO] [stdout] ::: src/vm/mod.rs:316:43 [INFO] [stdout] | [INFO] [stdout] 316 | new_closure.init_upvalues(proto.upvalues, lua_closure.upvalues); [INFO] [stdout] | -------------- you could clone this value [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `RustyMoon` (bin "RustyMoon") due to 19 previous errors; 12 warnings emitted [INFO] [stdout] error[E0507]: cannot move out of `lua_closure.upvalues` which is behind a shared reference [INFO] [stdout] --> src/vm/mod.rs:316:59 [INFO] [stdout] | [INFO] [stdout] 316 | new_closure.init_upvalues(proto.upvalues, lua_closure.upvalues); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ move occurs because `lua_closure.upvalues` has type `Vec`, which does not implement the `Copy` trait [INFO] [stdout] | [INFO] [stdout] note: if `UpVal` implemented `Clone`, you could clone the value [INFO] [stdout] --> src/core/types/mod.rs:62:1 [INFO] [stdout] | [INFO] [stdout] 62 | pub enum UpVal { [INFO] [stdout] | ^^^^^^^^^^^^^^^ consider implementing `Clone` for this type [INFO] [stdout] | [INFO] [stdout] ::: src/vm/mod.rs:316:59 [INFO] [stdout] | [INFO] [stdout] 316 | new_closure.init_upvalues(proto.upvalues, lua_closure.upvalues); [INFO] [stdout] | -------------------- you could clone this value [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0382]: use of moved value: `frame` [INFO] [stdout] --> src/vm/mod.rs:326:34 [INFO] [stdout] | [INFO] [stdout] 78 | let mut frame = LuaStackView::new(&mut thread.stack, &mut call_info); [INFO] [stdout] | --------- move occurs because `frame` has type `LuaStackView<'_>`, which does not implement the `Copy` trait [INFO] [stdout] ... [INFO] [stdout] 323 | for i in 0..wanted { [INFO] [stdout] | ------------------ inside of this loop [INFO] [stdout] ... [INFO] [stdout] 326 | false => frame.set_register(wh + i, TValue::NIL), [INFO] [stdout] | ^^^^^ value moved here, in previous iteration of loop [INFO] [stdout] | [INFO] [stdout] note: if `LuaStackView<'_>` implemented `Clone`, you could clone the value [INFO] [stdout] --> src/core/types/stack.rs:46:1 [INFO] [stdout] | [INFO] [stdout] 46 | pub struct LuaStackView<'stack> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ consider implementing `Clone` for this type [INFO] [stdout] | [INFO] [stdout] ::: src/vm/mod.rs:326:34 [INFO] [stdout] | [INFO] [stdout] 326 | false => frame.set_register(wh + i, TValue::NIL), [INFO] [stdout] | ----- you could clone this value [INFO] [stdout] help: consider moving the expression out of the loop so it is only moved once [INFO] [stdout] | [INFO] [stdout] 323 ~ let mut value = frame.set_register(wh + i, TValue::NIL); [INFO] [stdout] 324 ~ for i in 0..wanted { [INFO] [stdout] 325 | match i < count { [INFO] [stdout] 326 | true => todo!("vararg"), //self.stack.set_at_offset(value, wh + i), [INFO] [stdout] 327 ~ false => value, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0382, E0502, E0507, E0521, E0596. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0382`. [INFO] [stdout] [INFO] running `Command { std: "docker" "inspect" "d2e91e40396bb8da8b88d0711d46462c2ea2a9679378030a229c4f229b0d37aa", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "d2e91e40396bb8da8b88d0711d46462c2ea2a9679378030a229c4f229b0d37aa", kill_on_drop: false }` [INFO] [stdout] d2e91e40396bb8da8b88d0711d46462c2ea2a9679378030a229c4f229b0d37aa