[INFO] cloning repository https://github.com/zack37/rust-cave-story [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/zack37/rust-cave-story" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fzack37%2Frust-cave-story", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fzack37%2Frust-cave-story'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] cd1283cce3e0082b28589aacfab9db859f1c9832 [INFO] checking zack37/rust-cave-story against try#f47dd4da3ae8c32c9e65d307bfe640b143e674df for pr-77526 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fzack37%2Frust-cave-story" "/workspace/builds/worker-14/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-14/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/zack37/rust-cave-story on toolchain f47dd4da3ae8c32c9e65d307bfe640b143e674df [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+f47dd4da3ae8c32c9e65d307bfe640b143e674df" "read-manifest" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/zack37/rust-cave-story [INFO] finished tweaking git repo https://github.com/zack37/rust-cave-story [INFO] tweaked toml for git repo https://github.com/zack37/rust-cave-story written to /workspace/builds/worker-14/source/Cargo.toml [INFO] crate git repo https://github.com/zack37/rust-cave-story already has a lockfile, it will not be regenerated [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+f47dd4da3ae8c32c9e65d307bfe640b143e674df" "fetch" "--locked" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] warning: unused manifest key: attributes [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded sdl2-sys v0.30.0 [INFO] [stderr] Downloaded sdl2 v0.30.0 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-14/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-14/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" "rustops/crates-build-env@sha256:d92eaeed33fa75130ca1ee6c8a01d1ffb62bac859dfdfb3450e3e5d1c0146529" "/opt/rustwide/cargo-home/bin/cargo" "+f47dd4da3ae8c32c9e65d307bfe640b143e674df" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] fd0ef04001c0d87702c1911a664830ba28eec6766db5cf2ae7373e0e45e3f6fc [INFO] [stderr] WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap. [INFO] running `Command { std: "docker" "start" "-a" "fd0ef04001c0d87702c1911a664830ba28eec6766db5cf2ae7373e0e45e3f6fc", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "fd0ef04001c0d87702c1911a664830ba28eec6766db5cf2ae7373e0e45e3f6fc", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "fd0ef04001c0d87702c1911a664830ba28eec6766db5cf2ae7373e0e45e3f6fc", kill_on_drop: false }` [INFO] [stdout] fd0ef04001c0d87702c1911a664830ba28eec6766db5cf2ae7373e0e45e3f6fc [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-14/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-14/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" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "rustops/crates-build-env@sha256:d92eaeed33fa75130ca1ee6c8a01d1ffb62bac859dfdfb3450e3e5d1c0146529" "/opt/rustwide/cargo-home/bin/cargo" "+f47dd4da3ae8c32c9e65d307bfe640b143e674df" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] bcebb8c29574eb1460abc2a9c48117dac13d30a2160632fcebd9acaec93f4d7c [INFO] [stderr] WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap. [INFO] running `Command { std: "docker" "start" "-a" "bcebb8c29574eb1460abc2a9c48117dac13d30a2160632fcebd9acaec93f4d7c", kill_on_drop: false }` [INFO] [stderr] warning: unused manifest key: attributes [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Checking bitflags v0.7.0 [INFO] [stderr] Checking num-integer v0.1.34 [INFO] [stderr] Checking time v0.1.37 [INFO] [stderr] Checking sdl2-sys v0.30.0 [INFO] [stderr] Checking num-iter v0.1.33 [INFO] [stderr] Checking num v0.1.37 [INFO] [stderr] Checking sdl2 v0.30.0 [INFO] [stderr] Checking cave-story v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: trait objects without an explicit `dyn` are deprecated [INFO] [stdout] --> src/map/tile.rs:12:34 [INFO] [stdout] | [INFO] [stdout] 12 | type TileSprite = Rc>>; [INFO] [stdout] | ^^^^^^ help: use `dyn`: `dyn Sprite` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(bare_trait_objects)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait objects without an explicit `dyn` are deprecated [INFO] [stdout] --> src/map/mod.rs:19:26 [INFO] [stdout] | [INFO] [stdout] 19 | backdrop: Option>, [INFO] [stdout] | ^^^^^^^^ help: use `dyn`: `dyn Backdrop` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait objects without an explicit `dyn` are deprecated [INFO] [stdout] --> src/map/mod.rs:51:47 [INFO] [stdout] | [INFO] [stdout] 51 | ... Box)); [INFO] [stdout] | ^^^^^^ help: use `dyn`: `dyn Sprite` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait objects without an explicit `dyn` are deprecated [INFO] [stdout] --> src/map/mod.rs:58:50 [INFO] [stdout] | [INFO] [stdout] 58 | ... Box)); [INFO] [stdout] | ^^^^^^ help: use `dyn`: `dyn Sprite` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait objects without an explicit `dyn` are deprecated [INFO] [stdout] --> src/map/mod.rs:66:53 [INFO] [stdout] | [INFO] [stdout] 66 | ... Box)); [INFO] [stdout] | ^^^^^^ help: use `dyn`: `dyn Sprite` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait objects without an explicit `dyn` are deprecated [INFO] [stdout] --> src/map/mod.rs:74:53 [INFO] [stdout] | [INFO] [stdout] 74 | ... Box)); [INFO] [stdout] | ^^^^^^ help: use `dyn`: `dyn Sprite` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait objects without an explicit `dyn` are deprecated [INFO] [stdout] --> src/player/mod.rs:51:39 [INFO] [stdout] | [INFO] [stdout] 51 | sprites: HashMap>, [INFO] [stdout] | ^^^^^^ help: use `dyn`: `dyn Sprite` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait objects without an explicit `dyn` are deprecated [INFO] [stdout] --> src/map/tile.rs:12:34 [INFO] [stdout] | [INFO] [stdout] 12 | type TileSprite = Rc>>; [INFO] [stdout] | ^^^^^^ help: use `dyn`: `dyn Sprite` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(bare_trait_objects)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait objects without an explicit `dyn` are deprecated [INFO] [stdout] --> src/map/mod.rs:19:26 [INFO] [stdout] | [INFO] [stdout] 19 | backdrop: Option>, [INFO] [stdout] | ^^^^^^^^ help: use `dyn`: `dyn Backdrop` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait objects without an explicit `dyn` are deprecated [INFO] [stdout] --> src/map/mod.rs:51:47 [INFO] [stdout] | [INFO] [stdout] 51 | ... Box)); [INFO] [stdout] | ^^^^^^ help: use `dyn`: `dyn Sprite` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait objects without an explicit `dyn` are deprecated [INFO] [stdout] --> src/map/mod.rs:58:50 [INFO] [stdout] | [INFO] [stdout] 58 | ... Box)); [INFO] [stdout] | ^^^^^^ help: use `dyn`: `dyn Sprite` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait objects without an explicit `dyn` are deprecated [INFO] [stdout] --> src/map/mod.rs:66:53 [INFO] [stdout] | [INFO] [stdout] 66 | ... Box)); [INFO] [stdout] | ^^^^^^ help: use `dyn`: `dyn Sprite` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait objects without an explicit `dyn` are deprecated [INFO] [stdout] --> src/map/mod.rs:74:53 [INFO] [stdout] | [INFO] [stdout] 74 | ... Box)); [INFO] [stdout] | ^^^^^^ help: use `dyn`: `dyn Sprite` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait objects without an explicit `dyn` are deprecated [INFO] [stdout] --> src/player/mod.rs:51:39 [INFO] [stdout] | [INFO] [stdout] 51 | sprites: HashMap>, [INFO] [stdout] | ^^^^^^ help: use `dyn`: `dyn Sprite` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/backdrop.rs:24:22 [INFO] [stdout] | [INFO] [stdout] 24 | for x in (0..SCREEN_WIDTH).step_by(BACKGROUND_SIZE) { [INFO] [stdout] | ^^^^^^^^^^^^ expected integer, found struct `drawing::Tile` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/backdrop.rs:24:44 [INFO] [stdout] | [INFO] [stdout] 24 | for x in (0..SCREEN_WIDTH).step_by(BACKGROUND_SIZE) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ expected `usize`, found `u32` [INFO] [stdout] | [INFO] [stdout] help: you can convert an `u32` to `usize` and panic if the converted value wouldn't fit [INFO] [stdout] | [INFO] [stdout] 24 | for x in (0..SCREEN_WIDTH).step_by(BACKGROUND_SIZE.try_into().unwrap()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/backdrop.rs:25:26 [INFO] [stdout] | [INFO] [stdout] 25 | for y in (0..SCREEN_HEIGHT).step_by(BACKGROUND_SIZE) { [INFO] [stdout] | ^^^^^^^^^^^^^ expected integer, found struct `drawing::Tile` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/backdrop.rs:25:49 [INFO] [stdout] | [INFO] [stdout] 25 | for y in (0..SCREEN_HEIGHT).step_by(BACKGROUND_SIZE) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ expected `usize`, found `u32` [INFO] [stdout] | [INFO] [stdout] help: you can convert an `u32` to `usize` and panic if the converted value wouldn't fit [INFO] [stdout] | [INFO] [stdout] 25 | for y in (0..SCREEN_HEIGHT).step_by(BACKGROUND_SIZE.try_into().unwrap()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/backdrop.rs:24:22 [INFO] [stdout] | [INFO] [stdout] 24 | for x in (0..SCREEN_WIDTH).step_by(BACKGROUND_SIZE) { [INFO] [stdout] | ^^^^^^^^^^^^ expected integer, found struct `drawing::Tile` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/backdrop.rs:24:44 [INFO] [stdout] | [INFO] [stdout] 24 | for x in (0..SCREEN_WIDTH).step_by(BACKGROUND_SIZE) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ expected `usize`, found `u32` [INFO] [stdout] | [INFO] [stdout] help: you can convert an `u32` to `usize` and panic if the converted value wouldn't fit [INFO] [stdout] | [INFO] [stdout] 24 | for x in (0..SCREEN_WIDTH).step_by(BACKGROUND_SIZE.try_into().unwrap()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the trait bound `{integer}: AsGame` is not satisfied [INFO] [stdout] --> src/game.rs:37:54 [INFO] [stdout] | [INFO] [stdout] 37 | let mut player = Player::new(graphics, width / 2, height / 2); [INFO] [stdout] | ^ the trait `AsGame` is not implemented for `{integer}` [INFO] [stdout] | [INFO] [stdout] = help: the following implementations were found: [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] = note: required because of the requirements on the impl of `Div<{integer}>` for `drawing::Game` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the trait bound `{integer}: AsGame` is not satisfied [INFO] [stdout] --> src/game.rs:37:66 [INFO] [stdout] | [INFO] [stdout] 37 | let mut player = Player::new(graphics, width / 2, height / 2); [INFO] [stdout] | ^ the trait `AsGame` is not implemented for `{integer}` [INFO] [stdout] | [INFO] [stdout] = help: the following implementations were found: [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] = note: required because of the requirements on the impl of `Div<{integer}>` for `drawing::Game` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/graphics.rs:22:49 [INFO] [stdout] | [INFO] [stdout] 22 | .window("Cave Story: Rust", SCREEN_WIDTH, SCREEN_HEIGHT) [INFO] [stdout] | ^^^^^^^^^^^^ expected `u32`, found struct `drawing::Tile` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/backdrop.rs:25:26 [INFO] [stdout] | [INFO] [stdout] 25 | for y in (0..SCREEN_HEIGHT).step_by(BACKGROUND_SIZE) { [INFO] [stdout] | ^^^^^^^^^^^^^ expected integer, found struct `drawing::Tile` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/backdrop.rs:25:49 [INFO] [stdout] | [INFO] [stdout] 25 | for y in (0..SCREEN_HEIGHT).step_by(BACKGROUND_SIZE) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ expected `usize`, found `u32` [INFO] [stdout] | [INFO] [stdout] help: you can convert an `u32` to `usize` and panic if the converted value wouldn't fit [INFO] [stdout] | [INFO] [stdout] 25 | for y in (0..SCREEN_HEIGHT).step_by(BACKGROUND_SIZE.try_into().unwrap()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/graphics.rs:22:63 [INFO] [stdout] | [INFO] [stdout] 22 | .window("Cave Story: Rust", SCREEN_WIDTH, SCREEN_HEIGHT) [INFO] [stdout] | ^^^^^^^^^^^^^ expected `u32`, found struct `drawing::Tile` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the trait bound `{integer}: AsGame` is not satisfied [INFO] [stdout] --> src/game.rs:37:54 [INFO] [stdout] | [INFO] [stdout] 37 | let mut player = Player::new(graphics, width / 2, height / 2); [INFO] [stdout] | ^ the trait `AsGame` is not implemented for `{integer}` [INFO] [stdout] | [INFO] [stdout] = help: the following implementations were found: [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] = note: required because of the requirements on the impl of `Div<{integer}>` for `drawing::Game` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the trait bound `{integer}: AsGame` is not satisfied [INFO] [stdout] --> src/game.rs:37:66 [INFO] [stdout] | [INFO] [stdout] 37 | let mut player = Player::new(graphics, width / 2, height / 2); [INFO] [stdout] | ^ the trait `AsGame` is not implemented for `{integer}` [INFO] [stdout] | [INFO] [stdout] = help: the following implementations were found: [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] = note: required because of the requirements on the impl of `Div<{integer}>` for `drawing::Game` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the trait bound `u32: AsTile` is not satisfied [INFO] [stdout] --> src/map/mod.rs:36:39 [INFO] [stdout] | [INFO] [stdout] 36 | let num_rows = (SCREEN_HEIGHT / TILE_SIZE) as usize; [INFO] [stdout] | ^ the trait `AsTile` is not implemented for `u32` [INFO] [stdout] | [INFO] [stdout] = note: required because of the requirements on the impl of `Div` for `drawing::Tile` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the trait bound `u32: AsTile` is not satisfied [INFO] [stdout] --> src/map/mod.rs:37:38 [INFO] [stdout] | [INFO] [stdout] 37 | let num_cols = (SCREEN_WIDTH / TILE_SIZE) as usize; [INFO] [stdout] | ^ the trait `AsTile` is not implemented for `u32` [INFO] [stdout] | [INFO] [stdout] = note: required because of the requirements on the impl of `Div` for `drawing::Tile` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0605]: non-primitive cast: `drawing::Tile` as `usize` [INFO] [stdout] --> src/map/mod.rs:36:24 [INFO] [stdout] | [INFO] [stdout] 36 | let num_rows = (SCREEN_HEIGHT / TILE_SIZE) as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ an `as` expression can only be used to convert between primitive types or to coerce to a specific trait object [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0605]: non-primitive cast: `drawing::Tile` as `usize` [INFO] [stdout] --> src/map/mod.rs:37:24 [INFO] [stdout] | [INFO] [stdout] 37 | let num_cols = (SCREEN_WIDTH / TILE_SIZE) as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ an `as` expression can only be used to convert between primitive types or to coerce to a specific trait object [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/player/mod.rs:132:63 [INFO] [stdout] | [INFO] [stdout] 132 | self.sprites[&self.get_sprite_state()].draw(graphics, self.x, self.y); [INFO] [stdout] | ^^^^^^ expected `i32`, found struct `drawing::Game` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/graphics.rs:22:49 [INFO] [stdout] | [INFO] [stdout] 22 | .window("Cave Story: Rust", SCREEN_WIDTH, SCREEN_HEIGHT) [INFO] [stdout] | ^^^^^^^^^^^^ expected `u32`, found struct `drawing::Tile` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/player/mod.rs:132:71 [INFO] [stdout] | [INFO] [stdout] 132 | self.sprites[&self.get_sprite_state()].draw(graphics, self.x, self.y); [INFO] [stdout] | ^^^^^^ expected `i32`, found struct `drawing::Game` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/graphics.rs:22:63 [INFO] [stdout] | [INFO] [stdout] 22 | .window("Cave Story: Rust", SCREEN_WIDTH, SCREEN_HEIGHT) [INFO] [stdout] | ^^^^^^^^^^^^^ expected `u32`, found struct `drawing::Tile` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the trait bound `u32: AsTile` is not satisfied [INFO] [stdout] --> src/map/mod.rs:36:39 [INFO] [stdout] | [INFO] [stdout] 36 | let num_rows = (SCREEN_HEIGHT / TILE_SIZE) as usize; [INFO] [stdout] | ^ the trait `AsTile` is not implemented for `u32` [INFO] [stdout] | [INFO] [stdout] = note: required because of the requirements on the impl of `Div` for `drawing::Tile` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the trait bound `u32: AsTile` is not satisfied [INFO] [stdout] --> src/map/mod.rs:37:38 [INFO] [stdout] | [INFO] [stdout] 37 | let num_cols = (SCREEN_WIDTH / TILE_SIZE) as usize; [INFO] [stdout] | ^ the trait `AsTile` is not implemented for `u32` [INFO] [stdout] | [INFO] [stdout] = note: required because of the requirements on the impl of `Div` for `drawing::Tile` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0605]: non-primitive cast: `drawing::Tile` as `usize` [INFO] [stdout] --> src/map/mod.rs:36:24 [INFO] [stdout] | [INFO] [stdout] 36 | let num_rows = (SCREEN_HEIGHT / TILE_SIZE) as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ an `as` expression can only be used to convert between primitive types or to coerce to a specific trait object [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0605]: non-primitive cast: `drawing::Tile` as `usize` [INFO] [stdout] --> src/map/mod.rs:37:24 [INFO] [stdout] | [INFO] [stdout] 37 | let num_cols = (SCREEN_WIDTH / TILE_SIZE) as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ an `as` expression can only be used to convert between primitive types or to coerce to a specific trait object [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/player/mod.rs:147:55 [INFO] [stdout] | [INFO] [stdout] 147 | let acceleration_x = if self.acceleration_x < 0 { [INFO] [stdout] | ^ expected struct `Acceleration`, found integer [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/player/mod.rs:153:41 [INFO] [stdout] | [INFO] [stdout] 153 | } else if self.acceleration_x > 0 { [INFO] [stdout] | ^ expected struct `Acceleration`, found integer [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/player/mod.rs:132:63 [INFO] [stdout] | [INFO] [stdout] 132 | self.sprites[&self.get_sprite_state()].draw(graphics, self.x, self.y); [INFO] [stdout] | ^^^^^^ expected `i32`, found struct `drawing::Game` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: `if` and `else` have incompatible types [INFO] [stdout] --> src/player/mod.rs:160:13 [INFO] [stdout] | [INFO] [stdout] 153 | } else if self.acceleration_x > 0 { [INFO] [stdout] | ________________- [INFO] [stdout] 154 | | if self.on_ground { [INFO] [stdout] | |_____________- [INFO] [stdout] 155 | || WALKING_ACCELERATION [INFO] [stdout] 156 | || } else { [INFO] [stdout] 157 | || AIR_ACCELERATION [INFO] [stdout] 158 | || } [INFO] [stdout] | ||_____________- expected because of this [INFO] [stdout] 159 | | } else { [INFO] [stdout] 160 | | 0.0 [INFO] [stdout] | | ^^^ expected struct `Acceleration`, found floating-point number [INFO] [stdout] 161 | | }; [INFO] [stdout] | |_________- `if` and `else` have incompatible types [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0368]: binary assignment operation `+=` cannot be applied to type `Velocity` [INFO] [stdout] --> src/player/mod.rs:162:9 [INFO] [stdout] | [INFO] [stdout] 162 | self.velocity_x += acceleration_x * elapsed_time_ms; [INFO] [stdout] | ---------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | cannot use `+=` on type `Velocity` [INFO] [stdout] | [INFO] [stdout] = note: an implementation of `std::ops::AddAssign` might be missing for `Velocity` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/player/mod.rs:132:71 [INFO] [stdout] | [INFO] [stdout] 132 | self.sprites[&self.get_sprite_state()].draw(graphics, self.x, self.y); [INFO] [stdout] | ^^^^^^ expected `i32`, found struct `drawing::Game` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/player/mod.rs:164:52 [INFO] [stdout] | [INFO] [stdout] 164 | self.velocity_x = if self.acceleration_x < 0 { [INFO] [stdout] | ^ expected struct `Acceleration`, found integer [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `max` found for struct `Velocity` in the current scope [INFO] [stdout] --> src/player/mod.rs:165:29 [INFO] [stdout] | [INFO] [stdout] 165 | self.velocity_x.max(-MAX_SPEED_X) [INFO] [stdout] | ^^^ method not found in `Velocity` [INFO] [stdout] | [INFO] [stdout] ::: src/units/physics.rs:28:1 [INFO] [stdout] | [INFO] [stdout] 28 | pub struct Velocity(pub f64); [INFO] [stdout] | ----------------------------- [INFO] [stdout] | | [INFO] [stdout] | method `max` not found for this [INFO] [stdout] | doesn't satisfy `Velocity: Iterator` [INFO] [stdout] | doesn't satisfy `Velocity: Ord` [INFO] [stdout] | [INFO] [stdout] = note: the method `max` exists but the following trait bounds were not satisfied: [INFO] [stdout] `Velocity: Ord` [INFO] [stdout] which is required by `&Velocity: Ord` [INFO] [stdout] `Velocity: Iterator` [INFO] [stdout] which is required by `&mut Velocity: Iterator` [INFO] [stdout] `Velocity: Ord` [INFO] [stdout] which is required by `&mut Velocity: Ord` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/player/mod.rs:166:41 [INFO] [stdout] | [INFO] [stdout] 166 | } else if self.acceleration_x > 0 { [INFO] [stdout] | ^ expected struct `Acceleration`, found integer [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/player/mod.rs:147:55 [INFO] [stdout] | [INFO] [stdout] 147 | let acceleration_x = if self.acceleration_x < 0 { [INFO] [stdout] | ^ expected struct `Acceleration`, found integer [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `min` found for struct `Velocity` in the current scope [INFO] [stdout] --> src/player/mod.rs:167:29 [INFO] [stdout] | [INFO] [stdout] 167 | self.velocity_x.min(MAX_SPEED_X) [INFO] [stdout] | ^^^ method not found in `Velocity` [INFO] [stdout] | [INFO] [stdout] ::: src/units/physics.rs:28:1 [INFO] [stdout] | [INFO] [stdout] 28 | pub struct Velocity(pub f64); [INFO] [stdout] | ----------------------------- [INFO] [stdout] | | [INFO] [stdout] | method `min` not found for this [INFO] [stdout] | doesn't satisfy `Velocity: Iterator` [INFO] [stdout] | doesn't satisfy `Velocity: Ord` [INFO] [stdout] | [INFO] [stdout] = note: the method `min` exists but the following trait bounds were not satisfied: [INFO] [stdout] `Velocity: Ord` [INFO] [stdout] which is required by `&Velocity: Ord` [INFO] [stdout] `Velocity: Iterator` [INFO] [stdout] which is required by `&mut Velocity: Iterator` [INFO] [stdout] `Velocity: Ord` [INFO] [stdout] which is required by `&mut Velocity: Ord` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0369]: binary operation `>` cannot be applied to type `Velocity` [INFO] [stdout] --> src/player/mod.rs:169:32 [INFO] [stdout] | [INFO] [stdout] 169 | if self.velocity_x > 0.0 { [INFO] [stdout] | --------------- ^ --- {float} [INFO] [stdout] | | [INFO] [stdout] | Velocity [INFO] [stdout] | [INFO] [stdout] = note: an implementation of `std::cmp::PartialOrd` might be missing for `Velocity` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/player/mod.rs:170:47 [INFO] [stdout] | [INFO] [stdout] 170 | (self.velocity_x - FRICTION * elapsed_time_ms).max(0.0) [INFO] [stdout] | ^^^^^^^^^^^^^^^ expected struct `Millis`, found `f32` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/player/mod.rs:153:41 [INFO] [stdout] | [INFO] [stdout] 153 | } else if self.acceleration_x > 0 { [INFO] [stdout] | ^ expected struct `Acceleration`, found integer [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `max` found for struct `Velocity` in the current scope [INFO] [stdout] --> src/player/mod.rs:170:64 [INFO] [stdout] | [INFO] [stdout] 170 | (self.velocity_x - FRICTION * elapsed_time_ms).max(0.0) [INFO] [stdout] | ^^^ method not found in `Velocity` [INFO] [stdout] | [INFO] [stdout] ::: src/units/physics.rs:28:1 [INFO] [stdout] | [INFO] [stdout] 28 | pub struct Velocity(pub f64); [INFO] [stdout] | ----------------------------- [INFO] [stdout] | | [INFO] [stdout] | method `max` not found for this [INFO] [stdout] | doesn't satisfy `Velocity: Iterator` [INFO] [stdout] | doesn't satisfy `Velocity: Ord` [INFO] [stdout] | [INFO] [stdout] = note: the method `max` exists but the following trait bounds were not satisfied: [INFO] [stdout] `Velocity: Ord` [INFO] [stdout] which is required by `&Velocity: Ord` [INFO] [stdout] `Velocity: Iterator` [INFO] [stdout] which is required by `&mut Velocity: Iterator` [INFO] [stdout] `Velocity: Ord` [INFO] [stdout] which is required by `&mut Velocity: Ord` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/player/mod.rs:172:47 [INFO] [stdout] | [INFO] [stdout] 172 | (self.velocity_x + FRICTION * elapsed_time_ms).min(0.0) [INFO] [stdout] | ^^^^^^^^^^^^^^^ expected struct `Millis`, found `f32` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `min` found for struct `Velocity` in the current scope [INFO] [stdout] --> src/player/mod.rs:172:64 [INFO] [stdout] | [INFO] [stdout] 172 | (self.velocity_x + FRICTION * elapsed_time_ms).min(0.0) [INFO] [stdout] | ^^^ method not found in `Velocity` [INFO] [stdout] | [INFO] [stdout] ::: src/units/physics.rs:28:1 [INFO] [stdout] | [INFO] [stdout] 28 | pub struct Velocity(pub f64); [INFO] [stdout] | ----------------------------- [INFO] [stdout] | | [INFO] [stdout] | method `min` not found for this [INFO] [stdout] | doesn't satisfy `Velocity: Iterator` [INFO] [stdout] | doesn't satisfy `Velocity: Ord` [INFO] [stdout] | [INFO] [stdout] = note: the method `min` exists but the following trait bounds were not satisfied: [INFO] [stdout] `Velocity: Ord` [INFO] [stdout] which is required by `&Velocity: Ord` [INFO] [stdout] `Velocity: Iterator` [INFO] [stdout] which is required by `&mut Velocity: Iterator` [INFO] [stdout] `Velocity: Ord` [INFO] [stdout] which is required by `&mut Velocity: Ord` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: `if` and `else` have incompatible types [INFO] [stdout] --> src/player/mod.rs:160:13 [INFO] [stdout] | [INFO] [stdout] 153 | } else if self.acceleration_x > 0 { [INFO] [stdout] | ________________- [INFO] [stdout] 154 | | if self.on_ground { [INFO] [stdout] | |_____________- [INFO] [stdout] 155 | || WALKING_ACCELERATION [INFO] [stdout] 156 | || } else { [INFO] [stdout] 157 | || AIR_ACCELERATION [INFO] [stdout] 158 | || } [INFO] [stdout] | ||_____________- expected because of this [INFO] [stdout] 159 | | } else { [INFO] [stdout] 160 | | 0.0 [INFO] [stdout] | | ^^^ expected struct `Acceleration`, found floating-point number [INFO] [stdout] 161 | | }; [INFO] [stdout] | |_________- `if` and `else` have incompatible types [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0368]: binary assignment operation `+=` cannot be applied to type `Velocity` [INFO] [stdout] --> src/player/mod.rs:162:9 [INFO] [stdout] | [INFO] [stdout] 162 | self.velocity_x += acceleration_x * elapsed_time_ms; [INFO] [stdout] | ---------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | cannot use `+=` on type `Velocity` [INFO] [stdout] | [INFO] [stdout] = note: an implementation of `std::ops::AddAssign` might be missing for `Velocity` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/player/mod.rs:179:40 [INFO] [stdout] | [INFO] [stdout] 179 | let delta = (self.velocity_x * elapsed_time_ms).round() as i32; [INFO] [stdout] | ^^^^^^^^^^^^^^^ expected struct `Millis`, found `f32` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `round` found for struct `drawing::Game` in the current scope [INFO] [stdout] --> src/player/mod.rs:179:57 [INFO] [stdout] | [INFO] [stdout] 179 | let delta = (self.velocity_x * elapsed_time_ms).round() as i32; [INFO] [stdout] | ^^^^^ method not found in `drawing::Game` [INFO] [stdout] | [INFO] [stdout] ::: src/units/drawing.rs:17:1 [INFO] [stdout] | [INFO] [stdout] 17 | pub struct Game(pub f64); [INFO] [stdout] | ------------------------- method `round` not found for this [INFO] [stdout] | [INFO] [stdout] = help: items from traits can only be used if the trait is implemented and in scope [INFO] [stdout] = note: the following trait defines an item `round`, perhaps you need to implement it: [INFO] [stdout] candidate #1: `num_traits::float::Float` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: can't compare `i32` with `drawing::Game` [INFO] [stdout] --> src/player/mod.rs:182:18 [INFO] [stdout] | [INFO] [stdout] 182 | if delta > units::Game(0.0) { [INFO] [stdout] | ^ no implementation for `i32 < drawing::Game` and `i32 > drawing::Game` [INFO] [stdout] | [INFO] [stdout] = help: the trait `PartialOrd` is not implemented for `i32` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/player/mod.rs:164:52 [INFO] [stdout] | [INFO] [stdout] 164 | self.velocity_x = if self.acceleration_x < 0 { [INFO] [stdout] | ^ expected struct `Acceleration`, found integer [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `max` found for struct `Velocity` in the current scope [INFO] [stdout] --> src/player/mod.rs:165:29 [INFO] [stdout] | [INFO] [stdout] 165 | self.velocity_x.max(-MAX_SPEED_X) [INFO] [stdout] | ^^^ method not found in `Velocity` [INFO] [stdout] | [INFO] [stdout] ::: src/units/physics.rs:28:1 [INFO] [stdout] | [INFO] [stdout] 28 | pub struct Velocity(pub f64); [INFO] [stdout] | ----------------------------- [INFO] [stdout] | | [INFO] [stdout] | method `max` not found for this [INFO] [stdout] | doesn't satisfy `Velocity: Iterator` [INFO] [stdout] | doesn't satisfy `Velocity: Ord` [INFO] [stdout] | [INFO] [stdout] = note: the method `max` exists but the following trait bounds were not satisfied: [INFO] [stdout] `Velocity: Ord` [INFO] [stdout] which is required by `&Velocity: Ord` [INFO] [stdout] `Velocity: Iterator` [INFO] [stdout] which is required by `&mut Velocity: Iterator` [INFO] [stdout] `Velocity: Ord` [INFO] [stdout] which is required by `&mut Velocity: Ord` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/player/mod.rs:187:26 [INFO] [stdout] | [INFO] [stdout] 187 | self.x = info.col * TILE_SIZE as i32 - self.collision_x.right(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `drawing::Game`, found `i32` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/player/mod.rs:166:41 [INFO] [stdout] | [INFO] [stdout] 166 | } else if self.acceleration_x > 0 { [INFO] [stdout] | ^ expected struct `Acceleration`, found integer [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/player/mod.rs:188:35 [INFO] [stdout] | [INFO] [stdout] 188 | self.velocity_x = 0.0; [INFO] [stdout] | ^^^ expected struct `Velocity`, found floating-point number [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0368]: binary assignment operation `+=` cannot be applied to type `drawing::Game` [INFO] [stdout] --> src/player/mod.rs:190:17 [INFO] [stdout] | [INFO] [stdout] 190 | self.x += delta; [INFO] [stdout] | ------^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | cannot use `+=` on type `drawing::Game` [INFO] [stdout] | [INFO] [stdout] = note: an implementation of `std::ops::AddAssign` might be missing for `drawing::Game` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `min` found for struct `Velocity` in the current scope [INFO] [stdout] --> src/player/mod.rs:167:29 [INFO] [stdout] | [INFO] [stdout] 167 | self.velocity_x.min(MAX_SPEED_X) [INFO] [stdout] | ^^^ method not found in `Velocity` [INFO] [stdout] | [INFO] [stdout] ::: src/units/physics.rs:28:1 [INFO] [stdout] | [INFO] [stdout] 28 | pub struct Velocity(pub f64); [INFO] [stdout] | ----------------------------- [INFO] [stdout] | | [INFO] [stdout] | method `min` not found for this [INFO] [stdout] | doesn't satisfy `Velocity: Iterator` [INFO] [stdout] | doesn't satisfy `Velocity: Ord` [INFO] [stdout] | [INFO] [stdout] = note: the method `min` exists but the following trait bounds were not satisfied: [INFO] [stdout] `Velocity: Ord` [INFO] [stdout] which is required by `&Velocity: Ord` [INFO] [stdout] `Velocity: Iterator` [INFO] [stdout] which is required by `&mut Velocity: Iterator` [INFO] [stdout] `Velocity: Ord` [INFO] [stdout] which is required by `&mut Velocity: Ord` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0369]: binary operation `>` cannot be applied to type `Velocity` [INFO] [stdout] --> src/player/mod.rs:169:32 [INFO] [stdout] | [INFO] [stdout] 169 | if self.velocity_x > 0.0 { [INFO] [stdout] | --------------- ^ --- {float} [INFO] [stdout] | | [INFO] [stdout] | Velocity [INFO] [stdout] | [INFO] [stdout] = note: an implementation of `std::cmp::PartialOrd` might be missing for `Velocity` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/player/mod.rs:196:26 [INFO] [stdout] | [INFO] [stdout] 196 | self.x = info.col * TILE_SIZE as i32 + self.collision_x.right() as i32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `drawing::Game`, found `i32` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/player/mod.rs:170:47 [INFO] [stdout] | [INFO] [stdout] 170 | (self.velocity_x - FRICTION * elapsed_time_ms).max(0.0) [INFO] [stdout] | ^^^^^^^^^^^^^^^ expected struct `Millis`, found `f32` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `max` found for struct `Velocity` in the current scope [INFO] [stdout] --> src/player/mod.rs:170:64 [INFO] [stdout] | [INFO] [stdout] 170 | (self.velocity_x - FRICTION * elapsed_time_ms).max(0.0) [INFO] [stdout] | ^^^ method not found in `Velocity` [INFO] [stdout] | [INFO] [stdout] ::: src/units/physics.rs:28:1 [INFO] [stdout] | [INFO] [stdout] 28 | pub struct Velocity(pub f64); [INFO] [stdout] | ----------------------------- [INFO] [stdout] | | [INFO] [stdout] | method `max` not found for this [INFO] [stdout] | doesn't satisfy `Velocity: Iterator` [INFO] [stdout] | doesn't satisfy `Velocity: Ord` [INFO] [stdout] | [INFO] [stdout] = note: the method `max` exists but the following trait bounds were not satisfied: [INFO] [stdout] `Velocity: Ord` [INFO] [stdout] which is required by `&Velocity: Ord` [INFO] [stdout] `Velocity: Iterator` [INFO] [stdout] which is required by `&mut Velocity: Iterator` [INFO] [stdout] `Velocity: Ord` [INFO] [stdout] which is required by `&mut Velocity: Ord` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/player/mod.rs:203:26 [INFO] [stdout] | [INFO] [stdout] 203 | self.x = info.col * TILE_SIZE as i32 + self.collision_x.right() as i32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `drawing::Game`, found `i32` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/player/mod.rs:172:47 [INFO] [stdout] | [INFO] [stdout] 172 | (self.velocity_x + FRICTION * elapsed_time_ms).min(0.0) [INFO] [stdout] | ^^^^^^^^^^^^^^^ expected struct `Millis`, found `f32` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `min` found for struct `Velocity` in the current scope [INFO] [stdout] --> src/player/mod.rs:172:64 [INFO] [stdout] | [INFO] [stdout] 172 | (self.velocity_x + FRICTION * elapsed_time_ms).min(0.0) [INFO] [stdout] | ^^^ method not found in `Velocity` [INFO] [stdout] | [INFO] [stdout] ::: src/units/physics.rs:28:1 [INFO] [stdout] | [INFO] [stdout] 28 | pub struct Velocity(pub f64); [INFO] [stdout] | ----------------------------- [INFO] [stdout] | | [INFO] [stdout] | method `min` not found for this [INFO] [stdout] | doesn't satisfy `Velocity: Iterator` [INFO] [stdout] | doesn't satisfy `Velocity: Ord` [INFO] [stdout] | [INFO] [stdout] = note: the method `min` exists but the following trait bounds were not satisfied: [INFO] [stdout] `Velocity: Ord` [INFO] [stdout] which is required by `&Velocity: Ord` [INFO] [stdout] `Velocity: Iterator` [INFO] [stdout] which is required by `&mut Velocity: Iterator` [INFO] [stdout] `Velocity: Ord` [INFO] [stdout] which is required by `&mut Velocity: Ord` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/player/mod.rs:204:35 [INFO] [stdout] | [INFO] [stdout] 204 | self.velocity_x = 0.0; [INFO] [stdout] | ^^^ expected struct `Velocity`, found floating-point number [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0368]: binary assignment operation `+=` cannot be applied to type `drawing::Game` [INFO] [stdout] --> src/player/mod.rs:206:17 [INFO] [stdout] | [INFO] [stdout] 206 | self.x += delta; [INFO] [stdout] | ------^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | cannot use `+=` on type `drawing::Game` [INFO] [stdout] | [INFO] [stdout] = note: an implementation of `std::ops::AddAssign` might be missing for `drawing::Game` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/player/mod.rs:212:26 [INFO] [stdout] | [INFO] [stdout] 212 | self.x = info.col * TILE_SIZE as i32 - self.collision_x.right(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `drawing::Game`, found `i32` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0369]: binary operation `<` cannot be applied to type `Velocity` [INFO] [stdout] --> src/player/mod.rs:219:62 [INFO] [stdout] | [INFO] [stdout] 219 | let gravity = if self.jump_active && self.velocity_y < 0.0 { [INFO] [stdout] | --------------- ^ --- {float} [INFO] [stdout] | | [INFO] [stdout] | Velocity [INFO] [stdout] | [INFO] [stdout] = note: an implementation of `std::cmp::PartialOrd` might be missing for `Velocity` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/player/mod.rs:179:40 [INFO] [stdout] | [INFO] [stdout] 179 | let delta = (self.velocity_x * elapsed_time_ms).round() as i32; [INFO] [stdout] | ^^^^^^^^^^^^^^^ expected struct `Millis`, found `f32` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `round` found for struct `drawing::Game` in the current scope [INFO] [stdout] --> src/player/mod.rs:179:57 [INFO] [stdout] | [INFO] [stdout] 179 | let delta = (self.velocity_x * elapsed_time_ms).round() as i32; [INFO] [stdout] | ^^^^^ method not found in `drawing::Game` [INFO] [stdout] | [INFO] [stdout] ::: src/units/drawing.rs:17:1 [INFO] [stdout] | [INFO] [stdout] 17 | pub struct Game(pub f64); [INFO] [stdout] | ------------------------- method `round` not found for this [INFO] [stdout] | [INFO] [stdout] = help: items from traits can only be used if the trait is implemented and in scope [INFO] [stdout] = note: the following trait defines an item `round`, perhaps you need to implement it: [INFO] [stdout] candidate #1: `num_traits::float::Float` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: can't compare `i32` with `drawing::Game` [INFO] [stdout] --> src/player/mod.rs:182:18 [INFO] [stdout] | [INFO] [stdout] 182 | if delta > units::Game(0.0) { [INFO] [stdout] | ^ no implementation for `i32 < drawing::Game` and `i32 > drawing::Game` [INFO] [stdout] | [INFO] [stdout] = help: the trait `PartialOrd` is not implemented for `i32` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: `if` and `else` have incompatible types [INFO] [stdout] --> src/player/mod.rs:222:13 [INFO] [stdout] | [INFO] [stdout] 219 | let gravity = if self.jump_active && self.velocity_y < 0.0 { [INFO] [stdout] | _______________________- [INFO] [stdout] 220 | | JUMP_GRAVITY [INFO] [stdout] | | ------------ expected because of this [INFO] [stdout] 221 | | } else { [INFO] [stdout] 222 | | GRAVITY [INFO] [stdout] | | ^^^^^^^ expected struct `Acceleration`, found `f32` [INFO] [stdout] 223 | | }; [INFO] [stdout] | |_________- `if` and `else` have incompatible types [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `min` found for struct `Velocity` in the current scope [INFO] [stdout] --> src/player/mod.rs:225:73 [INFO] [stdout] | [INFO] [stdout] 225 | self.velocity_y = (self.velocity_y + gravity * elapsed_time_ms).min(MAX_SPEED_Y); [INFO] [stdout] | ^^^ method not found in `Velocity` [INFO] [stdout] | [INFO] [stdout] ::: src/units/physics.rs:28:1 [INFO] [stdout] | [INFO] [stdout] 28 | pub struct Velocity(pub f64); [INFO] [stdout] | ----------------------------- [INFO] [stdout] | | [INFO] [stdout] | method `min` not found for this [INFO] [stdout] | doesn't satisfy `Velocity: Iterator` [INFO] [stdout] | doesn't satisfy `Velocity: Ord` [INFO] [stdout] | [INFO] [stdout] = note: the method `min` exists but the following trait bounds were not satisfied: [INFO] [stdout] `Velocity: Ord` [INFO] [stdout] which is required by `&Velocity: Ord` [INFO] [stdout] `Velocity: Iterator` [INFO] [stdout] which is required by `&mut Velocity: Iterator` [INFO] [stdout] `Velocity: Ord` [INFO] [stdout] which is required by `&mut Velocity: Ord` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/player/mod.rs:228:40 [INFO] [stdout] | [INFO] [stdout] 228 | let delta = (self.velocity_y * elapsed_time_ms).round() as i32; [INFO] [stdout] | ^^^^^^^^^^^^^^^ expected struct `Millis`, found `f32` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `round` found for struct `drawing::Game` in the current scope [INFO] [stdout] --> src/player/mod.rs:228:57 [INFO] [stdout] | [INFO] [stdout] 228 | let delta = (self.velocity_y * elapsed_time_ms).round() as i32; [INFO] [stdout] | ^^^^^ method not found in `drawing::Game` [INFO] [stdout] | [INFO] [stdout] ::: src/units/drawing.rs:17:1 [INFO] [stdout] | [INFO] [stdout] 17 | pub struct Game(pub f64); [INFO] [stdout] | ------------------------- method `round` not found for this [INFO] [stdout] | [INFO] [stdout] = help: items from traits can only be used if the trait is implemented and in scope [INFO] [stdout] = note: the following trait defines an item `round`, perhaps you need to implement it: [INFO] [stdout] candidate #1: `num_traits::float::Float` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/player/mod.rs:187:26 [INFO] [stdout] | [INFO] [stdout] 187 | self.x = info.col * TILE_SIZE as i32 - self.collision_x.right(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `drawing::Game`, found `i32` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/player/mod.rs:236:26 [INFO] [stdout] | [INFO] [stdout] 236 | self.y = info.row * (TILE_SIZE as i32) - self.collision_y.bottom(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `drawing::Game`, found `i32` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/player/mod.rs:188:35 [INFO] [stdout] | [INFO] [stdout] 188 | self.velocity_x = 0.0; [INFO] [stdout] | ^^^ expected struct `Velocity`, found floating-point number [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0368]: binary assignment operation `+=` cannot be applied to type `drawing::Game` [INFO] [stdout] --> src/player/mod.rs:190:17 [INFO] [stdout] | [INFO] [stdout] 190 | self.x += delta; [INFO] [stdout] | ------^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | cannot use `+=` on type `drawing::Game` [INFO] [stdout] | [INFO] [stdout] = note: an implementation of `std::ops::AddAssign` might be missing for `drawing::Game` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/player/mod.rs:237:35 [INFO] [stdout] | [INFO] [stdout] 237 | self.velocity_y = 0.0; [INFO] [stdout] | ^^^ expected struct `Velocity`, found floating-point number [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0368]: binary assignment operation `+=` cannot be applied to type `drawing::Game` [INFO] [stdout] --> src/player/mod.rs:239:17 [INFO] [stdout] | [INFO] [stdout] 239 | self.y += delta; [INFO] [stdout] | ------^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | cannot use `+=` on type `drawing::Game` [INFO] [stdout] | [INFO] [stdout] = note: an implementation of `std::ops::AddAssign` might be missing for `drawing::Game` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/player/mod.rs:245:26 [INFO] [stdout] | [INFO] [stdout] 245 | self.y = info.row * TILE_SIZE as i32 + self.collision_y.height() as i32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `drawing::Game`, found `i32` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/player/mod.rs:196:26 [INFO] [stdout] | [INFO] [stdout] 196 | self.x = info.col * TILE_SIZE as i32 + self.collision_x.right() as i32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `drawing::Game`, found `i32` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/player/mod.rs:251:26 [INFO] [stdout] | [INFO] [stdout] 251 | self.y = info.row * TILE_SIZE as i32 + self.collision_y.height() as i32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `drawing::Game`, found `i32` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/player/mod.rs:252:35 [INFO] [stdout] | [INFO] [stdout] 252 | self.velocity_y = 0.0; [INFO] [stdout] | ^^^ expected struct `Velocity`, found floating-point number [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0368]: binary assignment operation `+=` cannot be applied to type `drawing::Game` [INFO] [stdout] --> src/player/mod.rs:254:17 [INFO] [stdout] | [INFO] [stdout] 254 | self.y += delta; [INFO] [stdout] | ------^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | cannot use `+=` on type `drawing::Game` [INFO] [stdout] | [INFO] [stdout] = note: an implementation of `std::ops::AddAssign` might be missing for `drawing::Game` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/player/mod.rs:203:26 [INFO] [stdout] | [INFO] [stdout] 203 | self.x = info.col * TILE_SIZE as i32 + self.collision_x.right() as i32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `drawing::Game`, found `i32` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/player/mod.rs:262:26 [INFO] [stdout] | [INFO] [stdout] 262 | self.y = info.row * TILE_SIZE as i32 - self.collision_y.bottom(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `drawing::Game`, found `i32` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/player/mod.rs:204:35 [INFO] [stdout] | [INFO] [stdout] 204 | self.velocity_x = 0.0; [INFO] [stdout] | ^^^ expected struct `Velocity`, found floating-point number [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0368]: binary assignment operation `+=` cannot be applied to type `drawing::Game` [INFO] [stdout] --> src/player/mod.rs:206:17 [INFO] [stdout] | [INFO] [stdout] 206 | self.x += delta; [INFO] [stdout] | ------^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | cannot use `+=` on type `drawing::Game` [INFO] [stdout] | [INFO] [stdout] = note: an implementation of `std::ops::AddAssign` might be missing for `drawing::Game` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/player/mod.rs:310:39 [INFO] [stdout] | [INFO] [stdout] 310 | if self.acceleration_x == 0 { [INFO] [stdout] | ^ expected struct `Acceleration`, found integer [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0369]: binary operation `<` cannot be applied to type `Velocity` [INFO] [stdout] --> src/player/mod.rs:316:32 [INFO] [stdout] | [INFO] [stdout] 316 | if self.velocity_y < 0.0 { [INFO] [stdout] | --------------- ^ --- {float} [INFO] [stdout] | | [INFO] [stdout] | Velocity [INFO] [stdout] | [INFO] [stdout] = note: an implementation of `std::cmp::PartialOrd` might be missing for `Velocity` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the trait bound `i32: AsGame` is not satisfied [INFO] [stdout] --> src/player/mod.rs:327:26 [INFO] [stdout] | [INFO] [stdout] 327 | Rect::new(self.x + self.collision_x.left() + delta, [INFO] [stdout] | ^ the trait `AsGame` is not implemented for `i32` [INFO] [stdout] | [INFO] [stdout] = note: required because of the requirements on the impl of `std::ops::Add` for `drawing::Game` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/player/mod.rs:327:19 [INFO] [stdout] | [INFO] [stdout] 327 | Rect::new(self.x + self.collision_x.left() + delta, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `i32`, found struct `drawing::Game` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the trait bound `i32: AsGame` is not satisfied [INFO] [stdout] --> src/player/mod.rs:327:52 [INFO] [stdout] | [INFO] [stdout] 327 | Rect::new(self.x + self.collision_x.left() + delta, [INFO] [stdout] | ^ the trait `AsGame` is not implemented for `i32` [INFO] [stdout] | [INFO] [stdout] = note: required because of the requirements on the impl of `std::ops::Add` for `drawing::Game` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/player/mod.rs:212:26 [INFO] [stdout] | [INFO] [stdout] 212 | self.x = info.col * TILE_SIZE as i32 - self.collision_x.right(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `drawing::Game`, found `i32` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0369]: binary operation `<` cannot be applied to type `Velocity` [INFO] [stdout] --> src/player/mod.rs:219:62 [INFO] [stdout] | [INFO] [stdout] 219 | let gravity = if self.jump_active && self.velocity_y < 0.0 { [INFO] [stdout] | --------------- ^ --- {float} [INFO] [stdout] | | [INFO] [stdout] | Velocity [INFO] [stdout] | [INFO] [stdout] = note: an implementation of `std::cmp::PartialOrd` might be missing for `Velocity` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/player/mod.rs:328:19 [INFO] [stdout] | [INFO] [stdout] 328 | self.y + self.collision_x.top(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `i32`, found struct `drawing::Game` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the trait bound `i32: AsGame` is not satisfied [INFO] [stdout] --> src/player/mod.rs:328:26 [INFO] [stdout] | [INFO] [stdout] 328 | self.y + self.collision_x.top(), [INFO] [stdout] | ^ the trait `AsGame` is not implemented for `i32` [INFO] [stdout] | [INFO] [stdout] = note: required because of the requirements on the impl of `std::ops::Add` for `drawing::Game` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the trait bound `i32: AsGame` is not satisfied [INFO] [stdout] --> src/player/mod.rs:335:26 [INFO] [stdout] | [INFO] [stdout] 335 | Rect::new(self.x + self.collision_x.left() + (self.collision_x.width() / 2) as i32, [INFO] [stdout] | ^ the trait `AsGame` is not implemented for `i32` [INFO] [stdout] | [INFO] [stdout] = note: required because of the requirements on the impl of `std::ops::Add` for `drawing::Game` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/player/mod.rs:335:19 [INFO] [stdout] | [INFO] [stdout] 335 | Rect::new(self.x + self.collision_x.left() + (self.collision_x.width() / 2) as i32, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `i32`, found struct `drawing::Game` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: `if` and `else` have incompatible types [INFO] [stdout] --> src/player/mod.rs:222:13 [INFO] [stdout] | [INFO] [stdout] 219 | let gravity = if self.jump_active && self.velocity_y < 0.0 { [INFO] [stdout] | _______________________- [INFO] [stdout] 220 | | JUMP_GRAVITY [INFO] [stdout] | | ------------ expected because of this [INFO] [stdout] 221 | | } else { [INFO] [stdout] 222 | | GRAVITY [INFO] [stdout] | | ^^^^^^^ expected struct `Acceleration`, found `f32` [INFO] [stdout] 223 | | }; [INFO] [stdout] | |_________- `if` and `else` have incompatible types [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `min` found for struct `Velocity` in the current scope [INFO] [stdout] --> src/player/mod.rs:225:73 [INFO] [stdout] | [INFO] [stdout] 225 | self.velocity_y = (self.velocity_y + gravity * elapsed_time_ms).min(MAX_SPEED_Y); [INFO] [stdout] | ^^^ method not found in `Velocity` [INFO] [stdout] | [INFO] [stdout] ::: src/units/physics.rs:28:1 [INFO] [stdout] | [INFO] [stdout] 28 | pub struct Velocity(pub f64); [INFO] [stdout] | ----------------------------- [INFO] [stdout] | | [INFO] [stdout] | method `min` not found for this [INFO] [stdout] | doesn't satisfy `Velocity: Iterator` [INFO] [stdout] | doesn't satisfy `Velocity: Ord` [INFO] [stdout] | [INFO] [stdout] = note: the method `min` exists but the following trait bounds were not satisfied: [INFO] [stdout] `Velocity: Ord` [INFO] [stdout] which is required by `&Velocity: Ord` [INFO] [stdout] `Velocity: Iterator` [INFO] [stdout] which is required by `&mut Velocity: Iterator` [INFO] [stdout] `Velocity: Ord` [INFO] [stdout] which is required by `&mut Velocity: Ord` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the trait bound `i32: AsGame` is not satisfied [INFO] [stdout] --> src/player/mod.rs:335:52 [INFO] [stdout] | [INFO] [stdout] 335 | Rect::new(self.x + self.collision_x.left() + (self.collision_x.width() / 2) as i32, [INFO] [stdout] | ^ the trait `AsGame` is not implemented for `i32` [INFO] [stdout] | [INFO] [stdout] = note: required because of the requirements on the impl of `std::ops::Add` for `drawing::Game` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/player/mod.rs:336:19 [INFO] [stdout] | [INFO] [stdout] 336 | self.y + self.collision_x.top(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `i32`, found struct `drawing::Game` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/player/mod.rs:228:40 [INFO] [stdout] | [INFO] [stdout] 228 | let delta = (self.velocity_y * elapsed_time_ms).round() as i32; [INFO] [stdout] | ^^^^^^^^^^^^^^^ expected struct `Millis`, found `f32` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the trait bound `i32: AsGame` is not satisfied [INFO] [stdout] --> src/player/mod.rs:336:26 [INFO] [stdout] | [INFO] [stdout] 336 | self.y + self.collision_x.top(), [INFO] [stdout] | ^ the trait `AsGame` is not implemented for `i32` [INFO] [stdout] | [INFO] [stdout] = note: required because of the requirements on the impl of `std::ops::Add` for `drawing::Game` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `round` found for struct `drawing::Game` in the current scope [INFO] [stdout] --> src/player/mod.rs:228:57 [INFO] [stdout] | [INFO] [stdout] 228 | let delta = (self.velocity_y * elapsed_time_ms).round() as i32; [INFO] [stdout] | ^^^^^ method not found in `drawing::Game` [INFO] [stdout] | [INFO] [stdout] ::: src/units/drawing.rs:17:1 [INFO] [stdout] | [INFO] [stdout] 17 | pub struct Game(pub f64); [INFO] [stdout] | ------------------------- method `round` not found for this [INFO] [stdout] | [INFO] [stdout] = help: items from traits can only be used if the trait is implemented and in scope [INFO] [stdout] = note: the following trait defines an item `round`, perhaps you need to implement it: [INFO] [stdout] candidate #1: `num_traits::float::Float` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/player/mod.rs:343:19 [INFO] [stdout] | [INFO] [stdout] 343 | Rect::new(self.x + self.collision_y.left(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `i32`, found struct `drawing::Game` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the trait bound `i32: AsGame` is not satisfied [INFO] [stdout] --> src/player/mod.rs:343:26 [INFO] [stdout] | [INFO] [stdout] 343 | Rect::new(self.x + self.collision_y.left(), [INFO] [stdout] | ^ the trait `AsGame` is not implemented for `i32` [INFO] [stdout] | [INFO] [stdout] = note: required because of the requirements on the impl of `std::ops::Add` for `drawing::Game` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/player/mod.rs:236:26 [INFO] [stdout] | [INFO] [stdout] 236 | self.y = info.row * (TILE_SIZE as i32) - self.collision_y.bottom(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `drawing::Game`, found `i32` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the trait bound `i32: AsGame` is not satisfied [INFO] [stdout] --> src/player/mod.rs:344:26 [INFO] [stdout] | [INFO] [stdout] 344 | self.y + self.collision_y.top() + delta, [INFO] [stdout] | ^ the trait `AsGame` is not implemented for `i32` [INFO] [stdout] | [INFO] [stdout] = note: required because of the requirements on the impl of `std::ops::Add` for `drawing::Game` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/player/mod.rs:237:35 [INFO] [stdout] | [INFO] [stdout] 237 | self.velocity_y = 0.0; [INFO] [stdout] | ^^^ expected struct `Velocity`, found floating-point number [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0368]: binary assignment operation `+=` cannot be applied to type `drawing::Game` [INFO] [stdout] --> src/player/mod.rs:239:17 [INFO] [stdout] | [INFO] [stdout] 239 | self.y += delta; [INFO] [stdout] | ------^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | cannot use `+=` on type `drawing::Game` [INFO] [stdout] | [INFO] [stdout] = note: an implementation of `std::ops::AddAssign` might be missing for `drawing::Game` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/player/mod.rs:344:19 [INFO] [stdout] | [INFO] [stdout] 344 | self.y + self.collision_y.top() + delta, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `i32`, found struct `drawing::Game` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the trait bound `i32: AsGame` is not satisfied [INFO] [stdout] --> src/player/mod.rs:344:51 [INFO] [stdout] | [INFO] [stdout] 344 | self.y + self.collision_y.top() + delta, [INFO] [stdout] | ^ the trait `AsGame` is not implemented for `i32` [INFO] [stdout] | [INFO] [stdout] = note: required because of the requirements on the impl of `std::ops::Add` for `drawing::Game` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/player/mod.rs:245:26 [INFO] [stdout] | [INFO] [stdout] 245 | self.y = info.row * TILE_SIZE as i32 + self.collision_y.height() as i32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `drawing::Game`, found `i32` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/player/mod.rs:351:19 [INFO] [stdout] | [INFO] [stdout] 351 | Rect::new(self.x + self.collision_y.left(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `i32`, found struct `drawing::Game` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the trait bound `i32: AsGame` is not satisfied [INFO] [stdout] --> src/player/mod.rs:351:26 [INFO] [stdout] | [INFO] [stdout] 351 | Rect::new(self.x + self.collision_y.left(), [INFO] [stdout] | ^ the trait `AsGame` is not implemented for `i32` [INFO] [stdout] | [INFO] [stdout] = note: required because of the requirements on the impl of `std::ops::Add` for `drawing::Game` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the trait bound `i32: AsGame` is not satisfied [INFO] [stdout] --> src/player/mod.rs:352:26 [INFO] [stdout] | [INFO] [stdout] 352 | self.y + self.collision_y.top() + (self.collision_y.height() / 2) as i32, [INFO] [stdout] | ^ the trait `AsGame` is not implemented for `i32` [INFO] [stdout] | [INFO] [stdout] = note: required because of the requirements on the impl of `std::ops::Add` for `drawing::Game` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/player/mod.rs:251:26 [INFO] [stdout] | [INFO] [stdout] 251 | self.y = info.row * TILE_SIZE as i32 + self.collision_y.height() as i32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `drawing::Game`, found `i32` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/player/mod.rs:352:19 [INFO] [stdout] | [INFO] [stdout] 352 | self.y + self.collision_y.top() + (self.collision_y.height() / 2) as i32, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `i32`, found struct `drawing::Game` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the trait bound `i32: AsGame` is not satisfied [INFO] [stdout] --> src/player/mod.rs:352:51 [INFO] [stdout] | [INFO] [stdout] 352 | self.y + self.collision_y.top() + (self.collision_y.height() / 2) as i32, [INFO] [stdout] | ^ the trait `AsGame` is not implemented for `i32` [INFO] [stdout] | [INFO] [stdout] = note: required because of the requirements on the impl of `std::ops::Add` for `drawing::Game` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/player/mod.rs:252:35 [INFO] [stdout] | [INFO] [stdout] 252 | self.velocity_y = 0.0; [INFO] [stdout] | ^^^ expected struct `Velocity`, found floating-point number [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0368]: binary assignment operation `+=` cannot be applied to type `drawing::Game` [INFO] [stdout] --> src/player/mod.rs:254:17 [INFO] [stdout] | [INFO] [stdout] 254 | self.y += delta; [INFO] [stdout] | ------^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | cannot use `+=` on type `drawing::Game` [INFO] [stdout] | [INFO] [stdout] = note: an implementation of `std::ops::AddAssign` might be missing for `drawing::Game` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: aborting due to 73 previous errors; 7 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0277, E0308, E0368, E0369, E0599, E0605. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0277`. [INFO] [stdout] [INFO] [stderr] error: could not compile `cave-story` [INFO] [stderr] [INFO] [stderr] To learn more, run the command again with --verbose. [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/player/mod.rs:262:26 [INFO] [stdout] | [INFO] [stdout] 262 | self.y = info.row * TILE_SIZE as i32 - self.collision_y.bottom(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `drawing::Game`, found `i32` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/player/mod.rs:310:39 [INFO] [stdout] | [INFO] [stdout] 310 | if self.acceleration_x == 0 { [INFO] [stdout] | ^ expected struct `Acceleration`, found integer [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0369]: binary operation `<` cannot be applied to type `Velocity` [INFO] [stdout] --> src/player/mod.rs:316:32 [INFO] [stdout] | [INFO] [stdout] 316 | if self.velocity_y < 0.0 { [INFO] [stdout] | --------------- ^ --- {float} [INFO] [stdout] | | [INFO] [stdout] | Velocity [INFO] [stdout] | [INFO] [stdout] = note: an implementation of `std::cmp::PartialOrd` might be missing for `Velocity` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the trait bound `i32: AsGame` is not satisfied [INFO] [stdout] --> src/player/mod.rs:327:26 [INFO] [stdout] | [INFO] [stdout] 327 | Rect::new(self.x + self.collision_x.left() + delta, [INFO] [stdout] | ^ the trait `AsGame` is not implemented for `i32` [INFO] [stdout] | [INFO] [stdout] = note: required because of the requirements on the impl of `std::ops::Add` for `drawing::Game` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/player/mod.rs:327:19 [INFO] [stdout] | [INFO] [stdout] 327 | Rect::new(self.x + self.collision_x.left() + delta, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `i32`, found struct `drawing::Game` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the trait bound `i32: AsGame` is not satisfied [INFO] [stdout] --> src/player/mod.rs:327:52 [INFO] [stdout] | [INFO] [stdout] 327 | Rect::new(self.x + self.collision_x.left() + delta, [INFO] [stdout] | ^ the trait `AsGame` is not implemented for `i32` [INFO] [stdout] | [INFO] [stdout] = note: required because of the requirements on the impl of `std::ops::Add` for `drawing::Game` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/player/mod.rs:328:19 [INFO] [stdout] | [INFO] [stdout] 328 | self.y + self.collision_x.top(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `i32`, found struct `drawing::Game` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the trait bound `i32: AsGame` is not satisfied [INFO] [stdout] --> src/player/mod.rs:328:26 [INFO] [stdout] | [INFO] [stdout] 328 | self.y + self.collision_x.top(), [INFO] [stdout] | ^ the trait `AsGame` is not implemented for `i32` [INFO] [stdout] | [INFO] [stdout] = note: required because of the requirements on the impl of `std::ops::Add` for `drawing::Game` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the trait bound `i32: AsGame` is not satisfied [INFO] [stdout] --> src/player/mod.rs:335:26 [INFO] [stdout] | [INFO] [stdout] 335 | Rect::new(self.x + self.collision_x.left() + (self.collision_x.width() / 2) as i32, [INFO] [stdout] | ^ the trait `AsGame` is not implemented for `i32` [INFO] [stdout] | [INFO] [stdout] = note: required because of the requirements on the impl of `std::ops::Add` for `drawing::Game` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/player/mod.rs:335:19 [INFO] [stdout] | [INFO] [stdout] 335 | Rect::new(self.x + self.collision_x.left() + (self.collision_x.width() / 2) as i32, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `i32`, found struct `drawing::Game` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the trait bound `i32: AsGame` is not satisfied [INFO] [stdout] --> src/player/mod.rs:335:52 [INFO] [stdout] | [INFO] [stdout] 335 | Rect::new(self.x + self.collision_x.left() + (self.collision_x.width() / 2) as i32, [INFO] [stdout] | ^ the trait `AsGame` is not implemented for `i32` [INFO] [stdout] | [INFO] [stdout] = note: required because of the requirements on the impl of `std::ops::Add` for `drawing::Game` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/player/mod.rs:336:19 [INFO] [stdout] | [INFO] [stdout] 336 | self.y + self.collision_x.top(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `i32`, found struct `drawing::Game` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the trait bound `i32: AsGame` is not satisfied [INFO] [stdout] --> src/player/mod.rs:336:26 [INFO] [stdout] | [INFO] [stdout] 336 | self.y + self.collision_x.top(), [INFO] [stdout] | ^ the trait `AsGame` is not implemented for `i32` [INFO] [stdout] | [INFO] [stdout] = note: required because of the requirements on the impl of `std::ops::Add` for `drawing::Game` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/player/mod.rs:343:19 [INFO] [stdout] | [INFO] [stdout] 343 | Rect::new(self.x + self.collision_y.left(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `i32`, found struct `drawing::Game` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the trait bound `i32: AsGame` is not satisfied [INFO] [stdout] --> src/player/mod.rs:343:26 [INFO] [stdout] | [INFO] [stdout] 343 | Rect::new(self.x + self.collision_y.left(), [INFO] [stdout] | ^ the trait `AsGame` is not implemented for `i32` [INFO] [stdout] | [INFO] [stdout] = note: required because of the requirements on the impl of `std::ops::Add` for `drawing::Game` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the trait bound `i32: AsGame` is not satisfied [INFO] [stdout] --> src/player/mod.rs:344:26 [INFO] [stdout] | [INFO] [stdout] 344 | self.y + self.collision_y.top() + delta, [INFO] [stdout] | ^ the trait `AsGame` is not implemented for `i32` [INFO] [stdout] | [INFO] [stdout] = note: required because of the requirements on the impl of `std::ops::Add` for `drawing::Game` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/player/mod.rs:344:19 [INFO] [stdout] | [INFO] [stdout] 344 | self.y + self.collision_y.top() + delta, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `i32`, found struct `drawing::Game` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the trait bound `i32: AsGame` is not satisfied [INFO] [stdout] --> src/player/mod.rs:344:51 [INFO] [stdout] | [INFO] [stdout] 344 | self.y + self.collision_y.top() + delta, [INFO] [stdout] | ^ the trait `AsGame` is not implemented for `i32` [INFO] [stdout] | [INFO] [stdout] = note: required because of the requirements on the impl of `std::ops::Add` for `drawing::Game` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/player/mod.rs:351:19 [INFO] [stdout] | [INFO] [stdout] 351 | Rect::new(self.x + self.collision_y.left(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `i32`, found struct `drawing::Game` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the trait bound `i32: AsGame` is not satisfied [INFO] [stdout] --> src/player/mod.rs:351:26 [INFO] [stdout] | [INFO] [stdout] 351 | Rect::new(self.x + self.collision_y.left(), [INFO] [stdout] | ^ the trait `AsGame` is not implemented for `i32` [INFO] [stdout] | [INFO] [stdout] = note: required because of the requirements on the impl of `std::ops::Add` for `drawing::Game` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the trait bound `i32: AsGame` is not satisfied [INFO] [stdout] --> src/player/mod.rs:352:26 [INFO] [stdout] | [INFO] [stdout] 352 | self.y + self.collision_y.top() + (self.collision_y.height() / 2) as i32, [INFO] [stdout] | ^ the trait `AsGame` is not implemented for `i32` [INFO] [stdout] | [INFO] [stdout] = note: required because of the requirements on the impl of `std::ops::Add` for `drawing::Game` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/player/mod.rs:352:19 [INFO] [stdout] | [INFO] [stdout] 352 | self.y + self.collision_y.top() + (self.collision_y.height() / 2) as i32, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `i32`, found struct `drawing::Game` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the trait bound `i32: AsGame` is not satisfied [INFO] [stdout] --> src/player/mod.rs:352:51 [INFO] [stdout] | [INFO] [stdout] 352 | self.y + self.collision_y.top() + (self.collision_y.height() / 2) as i32, [INFO] [stdout] | ^ the trait `AsGame` is not implemented for `i32` [INFO] [stdout] | [INFO] [stdout] = note: required because of the requirements on the impl of `std::ops::Add` for `drawing::Game` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: aborting due to 73 previous errors; 7 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0277, E0308, E0368, E0369, E0599, E0605. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0277`. [INFO] [stdout] [INFO] [stderr] error: build failed [INFO] running `Command { std: "docker" "inspect" "bcebb8c29574eb1460abc2a9c48117dac13d30a2160632fcebd9acaec93f4d7c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "bcebb8c29574eb1460abc2a9c48117dac13d30a2160632fcebd9acaec93f4d7c", kill_on_drop: false }` [INFO] [stdout] bcebb8c29574eb1460abc2a9c48117dac13d30a2160632fcebd9acaec93f4d7c