[INFO] cloning repository https://github.com/dave20874/rl-study [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/dave20874/rl-study" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fdave20874%2Frl-study", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fdave20874%2Frl-study'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] f095227ecdfb433b55d43af348285a490e3a1167 [INFO] testing dave20874/rl-study against try#0936b3db0ae648ba2d5b60eb08cf4faf2ddab0c6 for pr-137122-1 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fdave20874%2Frl-study" "/workspace/builds/worker-2-tc2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-2-tc2/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/dave20874/rl-study [INFO] finished tweaking git repo https://github.com/dave20874/rl-study [INFO] tweaked toml for git repo https://github.com/dave20874/rl-study written to /workspace/builds/worker-2-tc2/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/dave20874/rl-study on toolchain 0936b3db0ae648ba2d5b60eb08cf4faf2ddab0c6 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+0936b3db0ae648ba2d5b60eb08cf4faf2ddab0c6" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/dave20874/rl-study 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" "+0936b3db0ae648ba2d5b60eb08cf4faf2ddab0c6" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc2/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" "+0936b3db0ae648ba2d5b60eb08cf4faf2ddab0c6" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 0fa20781f6e57db5f3fd0099e0eb63394dff8a2c9d8ba088ec03f3ab319bd88a [INFO] running `Command { std: "docker" "start" "-a" "0fa20781f6e57db5f3fd0099e0eb63394dff8a2c9d8ba088ec03f3ab319bd88a", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "0fa20781f6e57db5f3fd0099e0eb63394dff8a2c9d8ba088ec03f3ab319bd88a", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "0fa20781f6e57db5f3fd0099e0eb63394dff8a2c9d8ba088ec03f3ab319bd88a", kill_on_drop: false }` [INFO] [stdout] 0fa20781f6e57db5f3fd0099e0eb63394dff8a2c9d8ba088ec03f3ab319bd88a [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc2/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" "+0936b3db0ae648ba2d5b60eb08cf4faf2ddab0c6" "build" "--frozen" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 25d33f368e7238ba58d298623314534a56a51f24967a2cd462978e5831aceba2 [INFO] running `Command { std: "docker" "start" "-a" "25d33f368e7238ba58d298623314534a56a51f24967a2cd462978e5831aceba2", kill_on_drop: false }` [INFO] [stderr] Compiling rl-dp v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] error: struct fields are separated by `,` [INFO] [stdout] --> src/main.rs:78:34 [INFO] [stdout] | [INFO] [stdout] 76 | struct DPSolution [INFO] [stdout] | ---------- while parsing this struct [INFO] [stdout] 77 | where T : DPEnv { [INFO] [stdout] 78 | values: HashMap; // map state to value [INFO] [stdout] | ^ help: replace `;` with `,` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: struct fields are separated by `,` [INFO] [stdout] --> src/main.rs:79:30 [INFO] [stdout] | [INFO] [stdout] 76 | struct DPSolution [INFO] [stdout] | ---------- while parsing this struct [INFO] [stdout] ... [INFO] [stdout] 79 | policy: HashMap; // map state to best action [INFO] [stdout] | ^ help: replace `;` with `,` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0424]: expected value, found module `self` [INFO] [stdout] --> src/main.rs:43:21 [INFO] [stdout] | [INFO] [stdout] 37 | fn new(width: usize, height: usize) -> GridWorld1 { [INFO] [stdout] | --- this function doesn't have a `self` parameter [INFO] [stdout] ... [INFO] [stdout] 43 | for y in 0..self.dim.1 { [INFO] [stdout] | ^^^^ `self` value is a keyword only available in methods with a `self` parameter [INFO] [stdout] | [INFO] [stdout] help: add a `self` receiver parameter to make the associated `fn` a method [INFO] [stdout] | [INFO] [stdout] 37 | fn new(&self, width: usize, height: usize) -> GridWorld1 { [INFO] [stdout] | ++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0424]: expected value, found module `self` [INFO] [stdout] --> src/main.rs:44:25 [INFO] [stdout] | [INFO] [stdout] 37 | fn new(width: usize, height: usize) -> GridWorld1 { [INFO] [stdout] | --- this function doesn't have a `self` parameter [INFO] [stdout] ... [INFO] [stdout] 44 | for x in 0..self.dim.0 { [INFO] [stdout] | ^^^^ `self` value is a keyword only available in methods with a `self` parameter [INFO] [stdout] | [INFO] [stdout] help: add a `self` receiver parameter to make the associated `fn` a method [INFO] [stdout] | [INFO] [stdout] 37 | fn new(&self, width: usize, height: usize) -> GridWorld1 { [INFO] [stdout] | ++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0424]: expected value, found module `self` [INFO] [stdout] --> src/main.rs:45:33 [INFO] [stdout] | [INFO] [stdout] 37 | fn new(width: usize, height: usize) -> GridWorld1 { [INFO] [stdout] | --- this function doesn't have a `self` parameter [INFO] [stdout] ... [INFO] [stdout] 45 | states_vec.push(self.pos_to_state((x, y))); [INFO] [stdout] | ^^^^ `self` value is a keyword only available in methods with a `self` parameter [INFO] [stdout] | [INFO] [stdout] help: add a `self` receiver parameter to make the associated `fn` a method [INFO] [stdout] | [INFO] [stdout] 37 | fn new(&self, width: usize, height: usize) -> GridWorld1 { [INFO] [stdout] | ++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0412]: cannot find type `float64` in this scope [INFO] [stdout] --> src/main.rs:70:38 [INFO] [stdout] | [INFO] [stdout] 70 | fn p(s: usize, a: usize) -> Vec<(float64, float64, usize)> { [INFO] [stdout] | ^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] help: you might be missing a type parameter [INFO] [stdout] | [INFO] [stdout] 61 | impl DPEnv for GridWorld1 { [INFO] [stdout] | +++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0412]: cannot find type `float64` in this scope [INFO] [stdout] --> src/main.rs:70:47 [INFO] [stdout] | [INFO] [stdout] 70 | fn p(s: usize, a: usize) -> Vec<(float64, float64, usize)> { [INFO] [stdout] | ^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] help: you might be missing a type parameter [INFO] [stdout] | [INFO] [stdout] 61 | impl DPEnv for GridWorld1 { [INFO] [stdout] | +++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0412]: cannot find type `HashMap` in this scope [INFO] [stdout] --> src/main.rs:78:13 [INFO] [stdout] | [INFO] [stdout] 78 | values: HashMap; // map state to value [INFO] [stdout] | ^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] help: consider importing this struct [INFO] [stdout] | [INFO] [stdout] 13 + use std::collections::HashMap; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0412]: cannot find type `float64` in this scope [INFO] [stdout] --> src/main.rs:78:26 [INFO] [stdout] | [INFO] [stdout] 78 | values: HashMap; // map state to value [INFO] [stdout] | ^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] help: you might be missing a type parameter [INFO] [stdout] | [INFO] [stdout] 76 | struct DPSolution [INFO] [stdout] | +++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0412]: cannot find type `HashMap` in this scope [INFO] [stdout] --> src/main.rs:79:13 [INFO] [stdout] | [INFO] [stdout] 79 | policy: HashMap; // map state to best action [INFO] [stdout] | ^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] help: consider importing this struct [INFO] [stdout] | [INFO] [stdout] 13 + use std::collections::HashMap; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0423]: expected value, found macro `env` [INFO] [stdout] --> src/main.rs:92:5 [INFO] [stdout] | [INFO] [stdout] 92 | env = GridWorld1.new(); [INFO] [stdout] | ^^^ not a value [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0423]: expected value, found struct `GridWorld1` [INFO] [stdout] --> src/main.rs:92:11 [INFO] [stdout] | [INFO] [stdout] 92 | env = GridWorld1.new(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: use the path separator to refer to an item [INFO] [stdout] | [INFO] [stdout] 92 - env = GridWorld1.new(); [INFO] [stdout] 92 + env = GridWorld1::new(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `soln` in this scope [INFO] [stdout] --> src/main.rs:95:5 [INFO] [stdout] | [INFO] [stdout] 95 | soln = DPSolution.solve(&env); [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] help: you might have meant to introduce a new binding [INFO] [stdout] | [INFO] [stdout] 95 | let soln = DPSolution.solve(&env); [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0423]: expected value, found struct `DPSolution` [INFO] [stdout] --> src/main.rs:95:12 [INFO] [stdout] | [INFO] [stdout] 95 | soln = DPSolution.solve(&env); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: use the path separator to refer to an item [INFO] [stdout] | [INFO] [stdout] 95 - soln = DPSolution.solve(&env); [INFO] [stdout] 95 + soln = DPSolution::solve(&env); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0423]: expected value, found macro `env` [INFO] [stdout] --> src/main.rs:95:30 [INFO] [stdout] | [INFO] [stdout] 95 | soln = DPSolution.solve(&env); [INFO] [stdout] | ^^^ not a value [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0053]: method `states` has an incompatible type for trait [INFO] [stdout] --> src/main.rs:62:25 [INFO] [stdout] | [INFO] [stdout] 62 | fn states(&self) -> &Vec { [INFO] [stdout] | ^^^^^^^^^^^ expected `Vec`, found `&Vec` [INFO] [stdout] | [INFO] [stdout] note: type in trait [INFO] [stdout] --> src/main.rs:15:25 [INFO] [stdout] | [INFO] [stdout] 15 | fn states(&self) -> Vec; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] = note: expected signature `fn(&GridWorld1) -> Vec<_>` [INFO] [stdout] found signature `fn(&GridWorld1) -> &Vec<_>` [INFO] [stdout] help: change the output type to match the trait [INFO] [stdout] | [INFO] [stdout] 62 - fn states(&self) -> &Vec { [INFO] [stdout] 62 + fn states(&self) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0053]: method `actions` has an incompatible type for trait [INFO] [stdout] --> src/main.rs:66:40 [INFO] [stdout] | [INFO] [stdout] 66 | fn actions(&self, state: usize) -> &Vec { [INFO] [stdout] | ^^^^^^^^^^^ expected `Vec`, found `&Vec` [INFO] [stdout] | [INFO] [stdout] note: type in trait [INFO] [stdout] --> src/main.rs:18:40 [INFO] [stdout] | [INFO] [stdout] 18 | fn actions(&self, state: usize) -> Vec; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] = note: expected signature `fn(&GridWorld1, _) -> Vec<_>` [INFO] [stdout] found signature `fn(&GridWorld1, _) -> &Vec<_>` [INFO] [stdout] help: change the output type to match the trait [INFO] [stdout] | [INFO] [stdout] 66 - fn actions(&self, state: usize) -> &Vec { [INFO] [stdout] 66 + fn actions(&self, state: usize) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0186]: method `p` has a `&self` declaration in the trait, but not in the impl [INFO] [stdout] --> src/main.rs:70:5 [INFO] [stdout] | [INFO] [stdout] 21 | fn p(&self, s: usize, a: usize) -> Vec<(f64, f64, usize)>; [INFO] [stdout] | ---------------------------------------------------------- `&self` used in trait [INFO] [stdout] ... [INFO] [stdout] 70 | fn p(s: usize, a: usize) -> Vec<(float64, float64, usize)> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `&self` in impl [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0107]: missing generics for struct `DPSolution` [INFO] [stdout] --> src/main.rs:83:6 [INFO] [stdout] | [INFO] [stdout] 83 | impl DPSolution { [INFO] [stdout] | ^^^^^^^^^^ expected 1 generic argument [INFO] [stdout] | [INFO] [stdout] note: struct defined here, with 1 generic parameter: `T` [INFO] [stdout] --> src/main.rs:76:8 [INFO] [stdout] | [INFO] [stdout] 76 | struct DPSolution [INFO] [stdout] | ^^^^^^^^^^ - [INFO] [stdout] help: add missing generic argument [INFO] [stdout] | [INFO] [stdout] 83 | impl DPSolution { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0782]: expected a type, found a trait [INFO] [stdout] --> src/main.rs:84:20 [INFO] [stdout] | [INFO] [stdout] 84 | fn solve(env: &DPEnv) -> DPSolution { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] help: use a new generic type parameter, constrained by `DPEnv` [INFO] [stdout] | [INFO] [stdout] 84 - fn solve(env: &DPEnv) -> DPSolution { [INFO] [stdout] 84 + fn solve(env: &T) -> DPSolution { [INFO] [stdout] | [INFO] [stdout] help: you can also use an opaque type, but users won't be able to specify the type parameter when calling the `fn`, having to rely exclusively on type inference [INFO] [stdout] | [INFO] [stdout] 84 | fn solve(env: &impl DPEnv) -> DPSolution { [INFO] [stdout] | ++++ [INFO] [stdout] help: alternatively, use a trait object to accept any type that implements `DPEnv`, accessing its methods at runtime using dynamic dispatch [INFO] [stdout] | [INFO] [stdout] 84 | fn solve(env: &dyn DPEnv) -> DPSolution { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0107]: missing generics for struct `DPSolution` [INFO] [stdout] --> src/main.rs:84:30 [INFO] [stdout] | [INFO] [stdout] 84 | fn solve(env: &DPEnv) -> DPSolution { [INFO] [stdout] | ^^^^^^^^^^ expected 1 generic argument [INFO] [stdout] | [INFO] [stdout] note: struct defined here, with 1 generic parameter: `T` [INFO] [stdout] --> src/main.rs:76:8 [INFO] [stdout] | [INFO] [stdout] 76 | struct DPSolution [INFO] [stdout] | ^^^^^^^^^^ - [INFO] [stdout] help: add missing generic argument [INFO] [stdout] | [INFO] [stdout] 84 | fn solve(env: &DPEnv) -> DPSolution { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0609]: no field `width` on type `&GridWorld1` [INFO] [stdout] --> src/main.rs:57:28 [INFO] [stdout] | [INFO] [stdout] 57 | pos.0 + pos.1*self.width [INFO] [stdout] | ^^^^^ unknown field [INFO] [stdout] | [INFO] [stdout] = note: available fields are: `dim`, `start`, `goal`, `current`, `states_vec`, `actions_vec` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0615]: attempted to take value of method `states` on type `&GridWorld1` [INFO] [stdout] --> src/main.rs:63:15 [INFO] [stdout] | [INFO] [stdout] 63 | &self.states [INFO] [stdout] | ^^^^^^ method, not a field [INFO] [stdout] | [INFO] [stdout] help: use parentheses to call the method [INFO] [stdout] | [INFO] [stdout] 63 | &self.states() [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0063]: missing fields `policy` and `values` in initializer of `DPSolution<_>` [INFO] [stdout] --> src/main.rs:86:9 [INFO] [stdout] | [INFO] [stdout] 86 | DPSolution { } [INFO] [stdout] | ^^^^^^^^^^ missing `policy` and `values` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `state` [INFO] [stdout] --> src/main.rs:66:23 [INFO] [stdout] | [INFO] [stdout] 66 | fn actions(&self, state: usize) -> &Vec { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_state` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0053, E0063, E0107, E0186, E0412, E0423, E0424, E0425, E0609... [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0053`. [INFO] [stdout] [INFO] [stderr] error: could not compile `rl-dp` (bin "rl-dp") due to 24 previous errors; 1 warning emitted [INFO] running `Command { std: "docker" "inspect" "25d33f368e7238ba58d298623314534a56a51f24967a2cd462978e5831aceba2", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "25d33f368e7238ba58d298623314534a56a51f24967a2cd462978e5831aceba2", kill_on_drop: false }` [INFO] [stdout] 25d33f368e7238ba58d298623314534a56a51f24967a2cd462978e5831aceba2