[INFO] cloning repository https://github.com/JotaRandom/Nes83x
[INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/JotaRandom/Nes83x" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FJotaRandom%2FNes83x", kill_on_drop: false }`
[INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FJotaRandom%2FNes83x'...
[INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }`
[INFO] [stdout] d1fa2ed2806eb5da20558a83f9b3c97c4a7f5a5a
[INFO] checking JotaRandom/Nes83x/d1fa2ed2806eb5da20558a83f9b3c97c4a7f5a5a against master#eeb94be79adc9df7a09ad0b2421f16e60e6d932c for pr-152971
[INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FJotaRandom%2FNes83x" "/workspace/builds/worker-2-tc1/source", kill_on_drop: false }`
[INFO] [stderr] Cloning into '/workspace/builds/worker-2-tc1/source'...
[INFO] [stderr] done.
[INFO] started tweaking git repo https://github.com/JotaRandom/Nes83x
[INFO] finished tweaking git repo https://github.com/JotaRandom/Nes83x
[INFO] tweaked toml for git repo https://github.com/JotaRandom/Nes83x written to /workspace/builds/worker-2-tc1/source/Cargo.toml
[INFO] validating manifest of git repo https://github.com/JotaRandom/Nes83x on toolchain eeb94be79adc9df7a09ad0b2421f16e60e6d932c
[INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+eeb94be79adc9df7a09ad0b2421f16e60e6d932c" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }`
[INFO] crate git repo https://github.com/JotaRandom/Nes83x 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" "+eeb94be79adc9df7a09ad0b2421f16e60e6d932c" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }`
[INFO] [stderr]     Blocking waiting for file lock on package cache
[INFO] [stderr]     Updating crates.io index
[INFO] [stderr]  Downloading crates ...
[INFO] [stderr]   Downloaded simplelog v0.12.2
[INFO] [stderr]   Downloaded system-deps v7.0.7
[INFO] [stderr]   Downloaded version-compare v0.2.1
[INFO] [stderr]   Downloaded pango v0.21.3
[INFO] [stderr]   Downloaded gdk-pixbuf-sys v0.21.2
[INFO] [stderr]   Downloaded gdk-pixbuf v0.21.2
[INFO] [stderr]   Downloaded dialoguer v0.11.0
[INFO] [stderr]   Downloaded gsk4 v0.10.1
[INFO] [stderr]   Downloaded cairo-rs v0.21.2
[INFO] [stderr]   Downloaded gdk4-sys v0.10.1
[INFO] [stderr]   Downloaded glib-macros v0.21.4
[INFO] [stderr]   Downloaded gio-sys v0.21.2
[INFO] [stderr]   Downloaded gdk4 v0.10.1
[INFO] [stderr]   Downloaded gtk4-sys v0.10.1
[INFO] [stderr]   Downloaded glib-sys v0.21.2
[INFO] [stderr]   Downloaded cfg-expr v0.20.4
[INFO] [stderr]   Downloaded graphene-rs v0.21.2
[INFO] [stderr]   Downloaded gio v0.21.4
[INFO] [stderr]   Downloaded gtk4-macros v0.10.1
[INFO] [stderr]   Downloaded cairo-sys-rs v0.21.2
[INFO] [stderr]   Downloaded gsk4-sys v0.10.1
[INFO] [stderr]   Downloaded glib v0.21.4
[INFO] [stderr]   Downloaded gobject-sys v0.21.2
[INFO] [stderr]   Downloaded pango-sys v0.21.2
[INFO] [stderr]   Downloaded graphene-sys v0.21.2
[INFO] [stderr]   Downloaded gtk4 v0.10.2
[INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:61361fe0aef631f17e9d025a70c5a647956f8c671dd02950a60ad3f5cc5526d7" "/opt/rustwide/cargo-home/bin/cargo" "+eeb94be79adc9df7a09ad0b2421f16e60e6d932c" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }`
[INFO] [stdout] e2254ef2d54965faa773eb3cb0bc6e86d2fcfd3101cfa97718393a58f38bee7e
[INFO] running `Command { std: "docker" "start" "-a" "e2254ef2d54965faa773eb3cb0bc6e86d2fcfd3101cfa97718393a58f38bee7e", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "inspect" "e2254ef2d54965faa773eb3cb0bc6e86d2fcfd3101cfa97718393a58f38bee7e", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "rm" "-f" "e2254ef2d54965faa773eb3cb0bc6e86d2fcfd3101cfa97718393a58f38bee7e", kill_on_drop: false }`
[INFO] [stdout] e2254ef2d54965faa773eb3cb0bc6e86d2fcfd3101cfa97718393a58f38bee7e
[INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:61361fe0aef631f17e9d025a70c5a647956f8c671dd02950a60ad3f5cc5526d7" "/opt/rustwide/cargo-home/bin/cargo" "+eeb94be79adc9df7a09ad0b2421f16e60e6d932c" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }`
[INFO] [stdout] e5b860a1e2200fa1749b567dc04cd77d559e80769934a7e6ae231f730f0b66d2
[INFO] running `Command { std: "docker" "start" "-a" "e5b860a1e2200fa1749b567dc04cd77d559e80769934a7e6ae231f730f0b66d2", kill_on_drop: false }`
[INFO] [stderr]    Compiling libc v0.2.177
[INFO] [stderr]    Compiling unicode-ident v1.0.20
[INFO] [stderr]    Compiling find-msvc-tools v0.1.4
[INFO] [stderr]     Checking cfg-if v1.0.4
[INFO] [stderr]    Compiling wayland-sys v0.29.5
[INFO] [stderr]    Compiling typenum v1.19.0
[INFO] [stderr]    Compiling generic-array v0.14.9
[INFO] [stderr]    Compiling memoffset v0.6.5
[INFO] [stderr]    Compiling rustix v1.1.2
[INFO] [stderr]    Compiling getrandom v0.3.4
[INFO] [stderr]    Compiling time-core v0.1.6
[INFO] [stderr]     Checking once_cell v1.21.3
[INFO] [stderr]    Compiling crc32fast v1.5.0
[INFO] [stderr]    Compiling proc-macro2 v1.0.103
[INFO] [stderr]    Compiling thiserror v1.0.69
[INFO] [stderr]    Compiling x11-dl v2.21.0
[INFO] [stderr]     Checking subtle v2.6.1
[INFO] [stderr]     Checking libloading v0.8.9
[INFO] [stderr]     Checking dlib v0.5.2
[INFO] [stderr]     Checking lazy_static v1.5.0
[INFO] [stderr]     Checking bitflags v1.3.2
[INFO] [stderr]    Compiling time-macros v0.2.24
[INFO] [stderr]    Compiling anyhow v1.0.100
[INFO] [stderr]     Checking smallvec v1.15.1
[INFO] [stderr]     Checking cpufeatures v0.2.17
[INFO] [stderr]     Checking bitflags v2.10.0
[INFO] [stderr]     Checking powerfmt v0.2.0
[INFO] [stderr]     Checking scoped-tls v1.0.1
[INFO] [stderr]     Checking utf8parse v0.2.2
[INFO] [stderr]     Checking linux-raw-sys v0.11.0
[INFO] [stderr]     Checking downcast-rs v1.2.1
[INFO] [stderr]     Checking itoa v1.0.15
[INFO] [stderr]     Checking deranged v0.5.5
[INFO] [stderr]     Checking anstyle-parse v0.2.7
[INFO] [stderr]    Compiling quote v1.0.41
[INFO] [stderr]     Checking fastrand v2.3.0
[INFO] [stderr]     Checking rand_core v0.6.4
[INFO] [stderr]     Checking colorchoice v1.0.4
[INFO] [stderr]     Checking anstyle v1.0.13
[INFO] [stderr]     Checking base64ct v1.8.0
[INFO] [stderr]     Checking simd-adler32 v0.3.7
[INFO] [stderr]    Compiling wayland-scanner v0.29.5
[INFO] [stderr]    Compiling syn v2.0.108
[INFO] [stderr]    Compiling jobserver v0.1.34
[INFO] [stderr]     Checking adler2 v2.0.1
[INFO] [stderr]     Checking num-conv v0.1.0
[INFO] [stderr]     Checking num_threads v0.1.7
[INFO] [stderr]     Checking is_terminal_polyfill v1.70.2
[INFO] [stderr]     Checking anstyle-query v1.1.4
[INFO] [stderr]     Checking miniz_oxide v0.8.9
[INFO] [stderr]     Checking anstream v0.6.21
[INFO] [stderr]     Checking password-hash v0.4.2
[INFO] [stderr]    Compiling cc v1.2.43
[INFO] [stderr]     Checking clap_lex v0.7.6
[INFO] [stderr]     Checking xcursor v0.3.10
[INFO] [stderr]     Checking unicode-width v0.2.2
[INFO] [stderr]     Checking crypto-common v0.1.6
[INFO] [stderr]     Checking block-buffer v0.10.4
[INFO] [stderr]     Checking inout v0.1.4
[INFO] [stderr]     Checking digest v0.10.7
[INFO] [stderr]     Checking cipher v0.4.4
[INFO] [stderr]    Compiling wayland-client v0.29.5
[INFO] [stderr]    Compiling wayland-protocols v0.29.5
[INFO] [stderr]     Checking strsim v0.11.1
[INFO] [stderr]     Checking sha2 v0.10.9
[INFO] [stderr]     Checking hmac v0.12.1
[INFO] [stderr]     Checking sha1 v0.10.6
[INFO] [stderr]     Checking aes v0.8.4
[INFO] [stderr]     Checking clap_builder v4.5.50
[INFO] [stderr]     Checking nix v0.24.3
[INFO] [stderr]     Checking time v0.3.44
[INFO] [stderr]     Checking console v0.15.11
[INFO] [stderr]     Checking pbkdf2 v0.11.0
[INFO] [stderr]     Checking flate2 v1.1.5
[INFO] [stderr]     Checking shell-words v1.1.0
[INFO] [stderr]     Checking zeroize v1.8.2
[INFO] [stderr]     Checking tempfile v3.23.0
[INFO] [stderr]     Checking byteorder v1.5.0
[INFO] [stderr]     Checking termcolor v1.4.1
[INFO] [stderr]     Checking constant_time_eq v0.1.5
[INFO] [stderr]     Checking raw-window-handle v0.6.2
[INFO] [stderr]     Checking log v0.4.28
[INFO] [stderr]    Compiling zstd-sys v2.0.16+zstd.1.5.7
[INFO] [stderr]    Compiling bzip2-sys v0.1.13+1.0.8
[INFO] [stderr]    Compiling minifb v0.27.0
[INFO] [stderr]     Checking simplelog v0.12.2
[INFO] [stderr]     Checking wayland-commons v0.29.5
[INFO] [stderr]     Checking assert_matches v1.5.0
[INFO] [stderr]     Checking wayland-cursor v0.29.5
[INFO] [stderr]    Compiling thiserror-impl v1.0.69
[INFO] [stderr]    Compiling clap_derive v4.5.49
[INFO] [stderr]    Compiling bytemuck_derive v1.10.2
[INFO] [stderr]     Checking bytemuck v1.24.0
[INFO] [stderr]     Checking bzip2 v0.4.4
[INFO] [stderr]     Checking dialoguer v0.11.0
[INFO] [stderr]     Checking clap v4.5.50
[INFO] [stderr]    Compiling zstd-safe v5.0.2+zstd.1.5.2
[INFO] [stderr]     Checking zstd v0.11.2+zstd.1.5.2
[INFO] [stderr]     Checking zip v0.6.6
[INFO] [stderr]     Checking nes83x-rs v0.1.0 (/opt/rustwide/workdir)
[INFO] [stdout] error: cannot find macro `bitflags` in this scope
[INFO] [stdout]  --> src/nes/ppu/registers.rs:3:1
[INFO] [stdout]   |
[INFO] [stdout] 3 | bitflags! {
[INFO] [stdout]   | ^^^^^^^^
[INFO] [stdout]   |
[INFO] [stdout]   = note: `bitflags` is in scope, but it is a crate, not a macro
[INFO] [stdout] help: consider importing one of these macros
[INFO] [stdout]   |
[INFO] [stdout] 1 + use crate::utils::bitflags;
[INFO] [stdout]   |
[INFO] [stdout] 1 + use bitflags::bitflags;
[INFO] [stdout]   |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error: cannot find macro `bitflags` in this scope
[INFO] [stdout]   --> src/nes/ppu/registers.rs:26:1
[INFO] [stdout]    |
[INFO] [stdout] 26 | bitflags! {
[INFO] [stdout]    | ^^^^^^^^
[INFO] [stdout]    |
[INFO] [stdout]    = note: `bitflags` is in scope, but it is a crate, not a macro
[INFO] [stdout] help: consider importing one of these macros
[INFO] [stdout]    |
[INFO] [stdout]  1 + use crate::utils::bitflags;
[INFO] [stdout]    |
[INFO] [stdout]  1 + use bitflags::bitflags;
[INFO] [stdout]    |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error: cannot find macro `bitflags` in this scope
[INFO] [stdout]   --> src/nes/ppu/registers.rs:42:1
[INFO] [stdout]    |
[INFO] [stdout] 42 | bitflags! {
[INFO] [stdout]    | ^^^^^^^^
[INFO] [stdout]    |
[INFO] [stdout]    = note: `bitflags` is in scope, but it is a crate, not a macro
[INFO] [stdout] help: consider importing one of these macros
[INFO] [stdout]    |
[INFO] [stdout]  1 + use crate::utils::bitflags;
[INFO] [stdout]    |
[INFO] [stdout]  1 + use bitflags::bitflags;
[INFO] [stdout]    |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0423]: expected value, found module `memory`
[INFO] [stdout]    --> src/nes/cpu/mod.rs:373:30
[INFO] [stdout]     |
[INFO] [stdout] 373 |             0x48 => self.pha(memory), // PHA
[INFO] [stdout]     |                              ^^^^^^ not a value
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0423]: expected value, found module `memory`
[INFO] [stdout]    --> src/nes/cpu/mod.rs:374:30
[INFO] [stdout]     |
[INFO] [stdout] 374 |             0x08 => self.php(memory), // PHP
[INFO] [stdout]     |                              ^^^^^^ not a value
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0423]: expected value, found module `memory`
[INFO] [stdout]    --> src/nes/cpu/mod.rs:375:30
[INFO] [stdout]     |
[INFO] [stdout] 375 |             0x68 => self.pla(memory), // PLA
[INFO] [stdout]     |                              ^^^^^^ not a value
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0423]: expected value, found module `memory`
[INFO] [stdout]    --> src/nes/cpu/mod.rs:376:30
[INFO] [stdout]     |
[INFO] [stdout] 376 |             0x28 => self.plp(memory), // PLP
[INFO] [stdout]     |                              ^^^^^^ not a value
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0423]: expected value, found module `memory`
[INFO] [stdout]    --> src/nes/cpu/mod.rs:489:30
[INFO] [stdout]     |
[INFO] [stdout] 489 |             0x20 => self.jsr(memory),                           // JSR
[INFO] [stdout]     |                              ^^^^^^ not a value
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0423]: expected value, found module `memory`
[INFO] [stdout]    --> src/nes/cpu/mod.rs:490:30
[INFO] [stdout]     |
[INFO] [stdout] 490 |             0x60 => self.rts(memory),                           // RTS
[INFO] [stdout]     |                              ^^^^^^ not a value
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0423]: expected value, found module `memory`
[INFO] [stdout]    --> src/nes/cpu/mod.rs:491:30
[INFO] [stdout]     |
[INFO] [stdout] 491 |             0x40 => self.rti(memory),                           // RTI
[INFO] [stdout]     |                              ^^^^^^ not a value
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0423]: expected value, found module `memory`
[INFO] [stdout]    --> src/nes/cpu/mod.rs:513:30
[INFO] [stdout]     |
[INFO] [stdout] 513 |             0x00 => self.brk(memory), // BRK
[INFO] [stdout]     |                              ^^^^^^ not a value
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0423]: expected value, found module `memory`
[INFO] [stdout]    --> src/nes/cpu/mod.rs:517:37
[INFO] [stdout]     |
[INFO] [stdout] 517 |             0x0B | 0x2B => self.aac(memory), // AAC (ANC)
[INFO] [stdout]     |                                     ^^^^^^ not a value
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0423]: expected value, found module `memory`
[INFO] [stdout]    --> src/nes/cpu/mod.rs:518:30
[INFO] [stdout]     |
[INFO] [stdout] 518 |             0x8B => self.ane(memory),        // ANE (XAA)
[INFO] [stdout]     |                              ^^^^^^ not a value
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0423]: expected value, found module `memory`
[INFO] [stdout]    --> src/nes/cpu/mod.rs:519:30
[INFO] [stdout]     |
[INFO] [stdout] 519 |             0x6B => self.arr(memory),        // ARR
[INFO] [stdout]     |                              ^^^^^^ not a value
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0423]: expected value, found module `memory`
[INFO] [stdout]    --> src/nes/cpu/mod.rs:522:44
[INFO] [stdout]     |
[INFO] [stdout] 522 |             0x04 | 0x44 | 0x64 => self.nop(memory), // NOP Zero Page
[INFO] [stdout]     |                                            ^^^^^^ not a value
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0423]: expected value, found module `memory`
[INFO] [stdout]    --> src/nes/cpu/mod.rs:523:65
[INFO] [stdout]     |
[INFO] [stdout] 523 |             0x14 | 0x34 | 0x54 | 0x74 | 0xD4 | 0xF4 => self.nop(memory), // NOP Zero Page,X
[INFO] [stdout]     |                                                                 ^^^^^^ not a value
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0423]: expected value, found module `memory`
[INFO] [stdout]    --> src/nes/cpu/mod.rs:524:51
[INFO] [stdout]     |
[INFO] [stdout] 524 |             0x80 | 0x82 | 0x89 | 0xC2 => self.nop(memory), // NOP Immediate
[INFO] [stdout]     |                                                   ^^^^^^ not a value
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0423]: expected value, found module `memory`
[INFO] [stdout]    --> src/nes/cpu/mod.rs:525:30
[INFO] [stdout]     |
[INFO] [stdout] 525 |             0x0C => self.nop(memory),        // NOP Absolute
[INFO] [stdout]     |                              ^^^^^^ not a value
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0423]: expected value, found module `memory`
[INFO] [stdout]    --> src/nes/cpu/mod.rs:526:65
[INFO] [stdout]     |
[INFO] [stdout] 526 |             0x1C | 0x3C | 0x5C | 0x7C | 0xDC | 0xFC => self.nop(memory), // NOP Absolute,X
[INFO] [stdout]     |                                                                 ^^^^^^ not a value
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0423]: expected value, found module `memory`
[INFO] [stdout]    --> src/nes/cpu/mod.rs:528:65
[INFO] [stdout]     |
[INFO] [stdout] 528 |             0x1A | 0x3A | 0x5A | 0x7A | 0xDA | 0xFA => self.nop(memory), // NOP Implied
[INFO] [stdout]     |                                                                 ^^^^^^ not a value
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0425]: cannot find type `ControlRegister` in this scope
[INFO] [stdout]   --> src/nes/ppu/registers.rs:57:15
[INFO] [stdout]    |
[INFO] [stdout] 57 |     pub ctrl: ControlRegister,
[INFO] [stdout]    |               ^^^^^^^^^^^^^^^ not found in this scope
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0425]: cannot find type `MaskRegister` in this scope
[INFO] [stdout]   --> src/nes/ppu/registers.rs:59:15
[INFO] [stdout]    |
[INFO] [stdout] 59 |     pub mask: MaskRegister,
[INFO] [stdout]    |               ^^^^^^^^^^^^ not found in this scope
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0425]: cannot find type `StatusRegister` in this scope
[INFO] [stdout]   --> src/nes/ppu/registers.rs:61:22
[INFO] [stdout]    |
[INFO] [stdout] 61 |     pub status: Cell<StatusRegister>,
[INFO] [stdout]    |                      ^^^^^^^^^^^^^^ not found in this scope
[INFO] [stdout]    |
[INFO] [stdout] help: you might be missing a type parameter
[INFO] [stdout]    |
[INFO] [stdout] 55 | pub struct Registers<StatusRegister> {
[INFO] [stdout]    |                     ++++++++++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0425]: cannot find type `StatusRegister` in this scope
[INFO] [stdout]    --> src/nes/ppu/registers.rs:164:29
[INFO] [stdout]     |
[INFO] [stdout] 164 |     pub fn status(&self) -> StatusRegister {
[INFO] [stdout]     |                             ^^^^^^^^^^^^^^ not found in this scope
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0425]: cannot find type `StatusRegister` in this scope
[INFO] [stdout]    --> src/nes/ppu/registers.rs:169:38
[INFO] [stdout]     |
[INFO] [stdout] 169 |     pub fn set_status(&self, status: StatusRegister) {
[INFO] [stdout]     |                                      ^^^^^^^^^^^^^^ not found in this scope
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: unused import: `error`
[INFO] [stdout]  --> src/emulator/minifb/mod.rs:7:17
[INFO] [stdout]   |
[INFO] [stdout] 7 | use log::{info, error};
[INFO] [stdout]   |                 ^^^^^
[INFO] [stdout]   |
[INFO] [stdout]   = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error: cannot find macro `bitflags` in this scope
[INFO] [stdout]  --> src/nes/ppu/registers.rs:3:1
[INFO] [stdout]   |
[INFO] [stdout] 3 | bitflags! {
[INFO] [stdout]   | ^^^^^^^^
[INFO] [stdout]   |
[INFO] [stdout]   = note: `bitflags` is in scope, but it is a crate, not a macro
[INFO] [stdout] help: consider importing one of these macros
[INFO] [stdout]   |
[INFO] [stdout] 1 + use crate::utils::bitflags;
[INFO] [stdout]   |
[INFO] [stdout] 1 + use bitflags::bitflags;
[INFO] [stdout]   |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error: cannot find macro `bitflags` in this scope
[INFO] [stdout]   --> src/nes/ppu/registers.rs:26:1
[INFO] [stdout]    |
[INFO] [stdout] 26 | bitflags! {
[INFO] [stdout]    | ^^^^^^^^
[INFO] [stdout]    |
[INFO] [stdout]    = note: `bitflags` is in scope, but it is a crate, not a macro
[INFO] [stdout] help: consider importing one of these macros
[INFO] [stdout]    |
[INFO] [stdout]  1 + use crate::utils::bitflags;
[INFO] [stdout]    |
[INFO] [stdout]  1 + use bitflags::bitflags;
[INFO] [stdout]    |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0432]: unresolved import `tempfile`
[INFO] [stdout]    --> src/nes/cartridge/mod.rs:134:9
[INFO] [stdout]     |
[INFO] [stdout] 134 |     use tempfile::NamedTempFile;
[INFO] [stdout]     |         ^^^^^^^^ use of unresolved module or unlinked crate `tempfile`
[INFO] [stdout]     |
[INFO] [stdout]     = help: if you wanted to use a crate named `tempfile`, use `cargo add tempfile` to add it to your `Cargo.toml`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error: cannot find macro `bitflags` in this scope
[INFO] [stdout]   --> src/nes/ppu/registers.rs:42:1
[INFO] [stdout]    |
[INFO] [stdout] 42 | bitflags! {
[INFO] [stdout]    | ^^^^^^^^
[INFO] [stdout]    |
[INFO] [stdout]    = note: `bitflags` is in scope, but it is a crate, not a macro
[INFO] [stdout] help: consider importing one of these macros
[INFO] [stdout]    |
[INFO] [stdout]  1 + use crate::utils::bitflags;
[INFO] [stdout]    |
[INFO] [stdout]  1 + use bitflags::bitflags;
[INFO] [stdout]    |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error: cannot find macro `bitflags` in this scope
[INFO] [stdout]  --> src/nes/ppu/registers.rs:3:1
[INFO] [stdout]   |
[INFO] [stdout] 3 | bitflags! {
[INFO] [stdout]   | ^^^^^^^^
[INFO] [stdout]   |
[INFO] [stdout]   = note: `bitflags` is in scope, but it is a crate, not a macro
[INFO] [stdout] help: consider importing one of these macros
[INFO] [stdout]   |
[INFO] [stdout] 1 + use crate::utils::bitflags;
[INFO] [stdout]   |
[INFO] [stdout] 1 + use bitflags::bitflags;
[INFO] [stdout]   |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error: cannot find macro `bitflags` in this scope
[INFO] [stdout]   --> src/nes/ppu/registers.rs:26:1
[INFO] [stdout]    |
[INFO] [stdout] 26 | bitflags! {
[INFO] [stdout]    | ^^^^^^^^
[INFO] [stdout]    |
[INFO] [stdout]    = note: `bitflags` is in scope, but it is a crate, not a macro
[INFO] [stdout] help: consider importing one of these macros
[INFO] [stdout]    |
[INFO] [stdout]  1 + use crate::utils::bitflags;
[INFO] [stdout]    |
[INFO] [stdout]  1 + use bitflags::bitflags;
[INFO] [stdout]    |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error: cannot find macro `bitflags` in this scope
[INFO] [stdout]   --> src/nes/ppu/registers.rs:42:1
[INFO] [stdout]    |
[INFO] [stdout] 42 | bitflags! {
[INFO] [stdout]    | ^^^^^^^^
[INFO] [stdout]    |
[INFO] [stdout]    = note: `bitflags` is in scope, but it is a crate, not a macro
[INFO] [stdout] help: consider importing one of these macros
[INFO] [stdout]    |
[INFO] [stdout]  1 + use crate::utils::bitflags;
[INFO] [stdout]    |
[INFO] [stdout]  1 + use bitflags::bitflags;
[INFO] [stdout]    |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: cannot find type `ControlRegister` in this scope
[INFO] [stdout]   --> src/nes/ppu/registers.rs:86:19
[INFO] [stdout]    |
[INFO] [stdout] 86 |             ctrl: ControlRegister::empty(),
[INFO] [stdout]    |                   ^^^^^^^^^^^^^^^ use of undeclared type `ControlRegister`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: cannot find type `MaskRegister` in this scope
[INFO] [stdout]   --> src/nes/ppu/registers.rs:87:19
[INFO] [stdout]    |
[INFO] [stdout] 87 |             mask: MaskRegister::empty(),
[INFO] [stdout]    |                   ^^^^^^^^^^^^ use of undeclared type `MaskRegister`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: cannot find type `StatusRegister` in this scope
[INFO] [stdout]   --> src/nes/ppu/registers.rs:88:31
[INFO] [stdout]    |
[INFO] [stdout] 88 |             status: Cell::new(StatusRegister::empty()),
[INFO] [stdout]    |                               ^^^^^^^^^^^^^^ use of undeclared type `StatusRegister`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: cannot find type `ControlRegister` in this scope
[INFO] [stdout]    --> src/nes/ppu/registers.rs:103:21
[INFO] [stdout]     |
[INFO] [stdout] 103 |         self.ctrl = ControlRegister::empty();
[INFO] [stdout]     |                     ^^^^^^^^^^^^^^^ use of undeclared type `ControlRegister`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: cannot find type `MaskRegister` in this scope
[INFO] [stdout]    --> src/nes/ppu/registers.rs:104:21
[INFO] [stdout]     |
[INFO] [stdout] 104 |         self.mask = MaskRegister::empty();
[INFO] [stdout]     |                     ^^^^^^^^^^^^ use of undeclared type `MaskRegister`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: cannot find type `StatusRegister` in this scope
[INFO] [stdout]    --> src/nes/ppu/registers.rs:105:25
[INFO] [stdout]     |
[INFO] [stdout] 105 |         self.status.set(StatusRegister::empty());
[INFO] [stdout]     |                         ^^^^^^^^^^^^^^ use of undeclared type `StatusRegister`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: cannot find type `ControlRegister` in this scope
[INFO] [stdout]    --> src/nes/ppu/registers.rs:124:31
[INFO] [stdout]     |
[INFO] [stdout] 124 |         if self.ctrl.contains(ControlRegister::VRAM_ADD_INCREMENT) {
[INFO] [stdout]     |                               ^^^^^^^^^^^^^^^ use of undeclared type `ControlRegister`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: cannot find type `ControlRegister` in this scope
[INFO] [stdout]    --> src/nes/ppu/registers.rs:133:31
[INFO] [stdout]     |
[INFO] [stdout] 133 |         if self.ctrl.contains(ControlRegister::SPRITE_PATTERN_ADDR) {
[INFO] [stdout]     |                               ^^^^^^^^^^^^^^^ use of undeclared type `ControlRegister`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: cannot find type `ControlRegister` in this scope
[INFO] [stdout]    --> src/nes/ppu/registers.rs:142:31
[INFO] [stdout]     |
[INFO] [stdout] 142 |         if self.ctrl.contains(ControlRegister::BACKGROUND_PATTERN_ADDR) {
[INFO] [stdout]     |                               ^^^^^^^^^^^^^^^ use of undeclared type `ControlRegister`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: cannot find type `ControlRegister` in this scope
[INFO] [stdout]    --> src/nes/ppu/registers.rs:151:31
[INFO] [stdout]     |
[INFO] [stdout] 151 |         if self.ctrl.contains(ControlRegister::SPRITE_SIZE) {
[INFO] [stdout]     |                               ^^^^^^^^^^^^^^^ use of undeclared type `ControlRegister`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: cannot find type `ControlRegister` in this scope
[INFO] [stdout]    --> src/nes/ppu/registers.rs:160:28
[INFO] [stdout]     |
[INFO] [stdout] 160 |         self.ctrl.contains(ControlRegister::GENERATE_NMI)
[INFO] [stdout]     |                            ^^^^^^^^^^^^^^^ use of undeclared type `ControlRegister`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]    --> src/nes/ppu/mod.rs:115:26
[INFO] [stdout]     |
[INFO] [stdout] 115 |         self.vram_addr = 0;
[INFO] [stdout]     |         --------------   ^ expected `Cell<u16>`, found integer
[INFO] [stdout]     |         |
[INFO] [stdout]     |         expected due to the type of this binding
[INFO] [stdout]     |
[INFO] [stdout]     = note: expected struct `Cell<u16>`
[INFO] [stdout]                  found type `{integer}`
[INFO] [stdout] help: call `Into::into` on this expression to convert `{integer}` into `Cell<u16>`
[INFO] [stdout]     |
[INFO] [stdout] 115 |         self.vram_addr = 0.into();
[INFO] [stdout]     |                           +++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]    --> src/nes/ppu/mod.rs:116:31
[INFO] [stdout]     |
[INFO] [stdout] 116 |         self.temp_vram_addr = 0;
[INFO] [stdout]     |         -------------------   ^ expected `Cell<u16>`, found integer
[INFO] [stdout]     |         |
[INFO] [stdout]     |         expected due to the type of this binding
[INFO] [stdout]     |
[INFO] [stdout]     = note: expected struct `Cell<u16>`
[INFO] [stdout]                  found type `{integer}`
[INFO] [stdout] help: call `Into::into` on this expression to convert `{integer}` into `Cell<u16>`
[INFO] [stdout]     |
[INFO] [stdout] 116 |         self.temp_vram_addr = 0.into();
[INFO] [stdout]     |                                +++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]    --> src/nes/ppu/mod.rs:117:23
[INFO] [stdout]     |
[INFO] [stdout] 117 |         self.fine_x = 0;
[INFO] [stdout]     |         -----------   ^ expected `Cell<u8>`, found integer
[INFO] [stdout]     |         |
[INFO] [stdout]     |         expected due to the type of this binding
[INFO] [stdout]     |
[INFO] [stdout]     = note: expected struct `Cell<u8>`
[INFO] [stdout]                  found type `{integer}`
[INFO] [stdout] help: call `Into::into` on this expression to convert `{integer}` into `Cell<u8>`
[INFO] [stdout]     |
[INFO] [stdout] 117 |         self.fine_x = 0.into();
[INFO] [stdout]     |                        +++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]    --> src/nes/ppu/mod.rs:118:29
[INFO] [stdout]     |
[INFO] [stdout] 118 |         self.write_toggle = false;
[INFO] [stdout]     |         -----------------   ^^^^^ expected `Cell<bool>`, found `bool`
[INFO] [stdout]     |         |
[INFO] [stdout]     |         expected due to the type of this binding
[INFO] [stdout]     |
[INFO] [stdout]     = note: expected struct `Cell<bool>`
[INFO] [stdout]                  found type `bool`
[INFO] [stdout] help: call `Into::into` on this expression to convert `bool` into `Cell<bool>`
[INFO] [stdout]     |
[INFO] [stdout] 118 |         self.write_toggle = false.into();
[INFO] [stdout]     |                                  +++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]    --> src/nes/ppu/mod.rs:119:25
[INFO] [stdout]     |
[INFO] [stdout] 119 |         self.oam_addr = 0;
[INFO] [stdout]     |         -------------   ^ expected `Cell<u8>`, found integer
[INFO] [stdout]     |         |
[INFO] [stdout]     |         expected due to the type of this binding
[INFO] [stdout]     |
[INFO] [stdout]     = note: expected struct `Cell<u8>`
[INFO] [stdout]                  found type `{integer}`
[INFO] [stdout] help: call `Into::into` on this expression to convert `{integer}` into `Cell<u8>`
[INFO] [stdout]     |
[INFO] [stdout] 119 |         self.oam_addr = 0.into();
[INFO] [stdout]     |                          +++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: cannot find type `StatusRegister` in this scope
[INFO] [stdout]    --> src/nes/ppu/mod.rs:154:37
[INFO] [stdout]     |
[INFO] [stdout] 154 |             self.regs.status.insert(StatusRegister::VBLANK_STARTED);
[INFO] [stdout]     |                                     ^^^^^^^^^^^^^^ use of undeclared type `StatusRegister`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: cannot find type `ControlRegister` in this scope
[INFO] [stdout]    --> src/nes/ppu/mod.rs:157:40
[INFO] [stdout]     |
[INFO] [stdout] 157 |             if self.regs.ctrl.contains(ControlRegister::GENERATE_NMI) {
[INFO] [stdout]     |                                        ^^^^^^^^^^^^^^^ use of undeclared type `ControlRegister`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: cannot find type `StatusRegister` in this scope
[INFO] [stdout]    --> src/nes/ppu/mod.rs:174:41
[INFO] [stdout]     |
[INFO] [stdout] 174 |                 self.regs.status.remove(StatusRegister::VBLANK_STARTED);
[INFO] [stdout]     |                                         ^^^^^^^^^^^^^^ use of undeclared type `StatusRegister`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: cannot find type `StatusRegister` in this scope
[INFO] [stdout]    --> src/nes/ppu/mod.rs:177:41
[INFO] [stdout]     |
[INFO] [stdout] 177 |                 self.regs.status.remove(StatusRegister::SPRITE_ZERO_HIT);
[INFO] [stdout]     |                                         ^^^^^^^^^^^^^^ use of undeclared type `StatusRegister`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: cannot find type `StatusRegister` in this scope
[INFO] [stdout]    --> src/nes/ppu/mod.rs:178:41
[INFO] [stdout]     |
[INFO] [stdout] 178 |                 self.regs.status.remove(StatusRegister::SPRITE_OVERFLOW);
[INFO] [stdout]     |                                         ^^^^^^^^^^^^^^ use of undeclared type `StatusRegister`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: cannot find type `StatusRegister` in this scope
[INFO] [stdout]    --> src/nes/ppu/mod.rs:241:41
[INFO] [stdout]     |
[INFO] [stdout] 241 |                 self.regs.status.remove(StatusRegister::VBLANK_STARTED);
[INFO] [stdout]     |                                         ^^^^^^^^^^^^^^ use of undeclared type `StatusRegister`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]    --> src/nes/ppu/mod.rs:242:37
[INFO] [stdout]     |
[INFO] [stdout] 242 |                 self.write_toggle = false;
[INFO] [stdout]     |                 -----------------   ^^^^^ expected `Cell<bool>`, found `bool`
[INFO] [stdout]     |                 |
[INFO] [stdout]     |                 expected due to the type of this binding
[INFO] [stdout]     |
[INFO] [stdout]     = note: expected struct `Cell<bool>`
[INFO] [stdout]                  found type `bool`
[INFO] [stdout] help: call `Into::into` on this expression to convert `bool` into `Cell<bool>`
[INFO] [stdout]     |
[INFO] [stdout] 242 |                 self.write_toggle = false.into();
[INFO] [stdout]     |                                          +++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]    --> src/nes/ppu/mod.rs:252:46
[INFO] [stdout]     |
[INFO] [stdout] 252 |                 let value = self.memory.read(addr);
[INFO] [stdout]     |                                         ---- ^^^^ expected `u16`, found `Cell<u16>`
[INFO] [stdout]     |                                         |
[INFO] [stdout]     |                                         arguments to this method are incorrect
[INFO] [stdout]     |
[INFO] [stdout]     = note: expected type `u16`
[INFO] [stdout]              found struct `Cell<u16>`
[INFO] [stdout] note: method defined here
[INFO] [stdout]    --> src/nes/ppu/memory.rs:53:12
[INFO] [stdout]     |
[INFO] [stdout]  53 |     pub fn read(&self, addr: u16) -> u8 {
[INFO] [stdout]     |            ^^^^        ---------
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]    --> src/nes/ppu/mod.rs:255:40
[INFO] [stdout]     |
[INFO] [stdout] 255 |                 let result = if addr < 0x3F00 {
[INFO] [stdout]     |                                 ----   ^^^^^^ expected `Cell<u16>`, found integer
[INFO] [stdout]     |                                 |
[INFO] [stdout]     |                                 expected because this is `Cell<u16>`
[INFO] [stdout]     |
[INFO] [stdout]     = note: expected struct `Cell<u16>`
[INFO] [stdout]                  found type `{integer}`
[INFO] [stdout] help: call `Into::into` on this expression to convert `{integer}` into `Cell<u16>`
[INFO] [stdout]     |
[INFO] [stdout] 255 |                 let result = if addr < 0x3F00.into() {
[INFO] [stdout]     |                                              +++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0599]: no method named `wrapping_sub` found for struct `Cell<T>` in the current scope
[INFO] [stdout]    --> src/nes/ppu/mod.rs:257:58
[INFO] [stdout]     |
[INFO] [stdout] 257 |                     let buffered = self.memory.read(addr.wrapping_sub(0x1000));
[INFO] [stdout]     |                                                          ^^^^^^^^^^^^ method not found in `Cell<u16>`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0605]: non-primitive cast: `Cell<u8>` as `usize`
[INFO] [stdout]    --> src/nes/ppu/mod.rs:247:34
[INFO] [stdout]     |
[INFO] [stdout] 247 |             0x4 => self.oam_data[self.oam_addr 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[E0433]: cannot find type `ControlRegister` in this scope
[INFO] [stdout]    --> src/nes/ppu/mod.rs:280:34
[INFO] [stdout]     |
[INFO] [stdout] 280 |                 self.regs.ctrl = ControlRegister::from_bits_truncate(value);
[INFO] [stdout]     |                                  ^^^^^^^^^^^^^^^ use of undeclared type `ControlRegister`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: cannot find type `ControlRegister` in this scope
[INFO] [stdout]    --> src/nes/ppu/mod.rs:283:59
[INFO] [stdout]     |
[INFO] [stdout] 283 |                 let nmi_enabled = self.regs.ctrl.contains(ControlRegister::GENERATE_NMI);
[INFO] [stdout]     |                                                           ^^^^^^^^^^^^^^^ use of undeclared type `ControlRegister`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: cannot find type `StatusRegister` in this scope
[INFO] [stdout]    --> src/nes/ppu/mod.rs:284:61
[INFO] [stdout]     |
[INFO] [stdout] 284 |                 if nmi_enabled && self.regs.status.contains(StatusRegister::VBLANK_STARTED) {
[INFO] [stdout]     |                                                             ^^^^^^^^^^^^^^ use of undeclared type `StatusRegister`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0369]: no implementation for `Cell<u16> & {integer}`
[INFO] [stdout]    --> src/nes/ppu/mod.rs:291:42
[INFO] [stdout]     |
[INFO] [stdout] 291 |                     (self.temp_vram_addr & 0xF3FF) | ((value as u16 & 0x03) << 10);
[INFO] [stdout]     |                      ------------------- ^ ------ {integer}
[INFO] [stdout]     |                      |
[INFO] [stdout]     |                      Cell<u16>
[INFO] [stdout]     |
[INFO] [stdout] note: `Cell<u16>` does not implement `BitAnd<{integer}>`
[INFO] [stdout]    --> /rustc/eeb94be79adc9df7a09ad0b2421f16e60e6d932c/library/core/src/cell.rs:312:0
[INFO] [stdout]     |
[INFO] [stdout]     = note: `Cell<u16>` is defined in another crate
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: cannot find type `MaskRegister` in this scope
[INFO] [stdout]    --> src/nes/ppu/mod.rs:297:34
[INFO] [stdout]     |
[INFO] [stdout] 297 |                 self.regs.mask = MaskRegister::from_bits_truncate(value);
[INFO] [stdout]     |                                  ^^^^^^^^^^^^ use of undeclared type `MaskRegister`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]    --> src/nes/ppu/mod.rs:303:33
[INFO] [stdout]     |
[INFO] [stdout] 303 |                 self.oam_addr = value;
[INFO] [stdout]     |                 -------------   ^^^^^ expected `Cell<u8>`, found `u8`
[INFO] [stdout]     |                 |
[INFO] [stdout]     |                 expected due to the type of this binding
[INFO] [stdout]     |
[INFO] [stdout]     = note: expected struct `Cell<u8>`
[INFO] [stdout]                  found type `u8`
[INFO] [stdout] help: call `Into::into` on this expression to convert `u8` into `Cell<u8>`
[INFO] [stdout]     |
[INFO] [stdout] 303 |                 self.oam_addr = value.into();
[INFO] [stdout]     |                                      +++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0599]: no method named `wrapping_add` found for struct `Cell<T>` in the current scope
[INFO] [stdout]    --> src/nes/ppu/mod.rs:314:47
[INFO] [stdout]     |
[INFO] [stdout] 314 |                 self.oam_addr = self.oam_addr.wrapping_add(1);
[INFO] [stdout]     |                                               ^^^^^^^^^^^^ method not found in `Cell<u8>`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0600]: cannot apply unary operator `!` to type `Cell<bool>`
[INFO] [stdout]    --> src/nes/ppu/mod.rs:320:20
[INFO] [stdout]     |
[INFO] [stdout] 320 |                 if !self.write_toggle {
[INFO] [stdout]     |                    ^^^^^^^^^^^^^^^^^^ cannot apply unary operator `!`
[INFO] [stdout]     |
[INFO] [stdout] note: `Cell<bool>` does not implement `Not`
[INFO] [stdout]    --> /rustc/eeb94be79adc9df7a09ad0b2421f16e60e6d932c/library/core/src/cell.rs:312:0
[INFO] [stdout]     |
[INFO] [stdout]     = note: `Cell<bool>` is defined in another crate
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]    --> src/nes/ppu/mod.rs:322:35
[INFO] [stdout]     |
[INFO] [stdout] 322 |                     self.fine_x = value & 0x07;
[INFO] [stdout]     |                     -----------   ^^^^^^^^^^^^ expected `Cell<u8>`, found `u8`
[INFO] [stdout]     |                     |
[INFO] [stdout]     |                     expected due to the type of this binding
[INFO] [stdout]     |
[INFO] [stdout]     = note: expected struct `Cell<u8>`
[INFO] [stdout]                  found type `u8`
[INFO] [stdout] help: call `Into::into` on this expression to convert `u8` into `Cell<u8>`
[INFO] [stdout]     |
[INFO] [stdout] 322 |                     self.fine_x = (value & 0x07).into();
[INFO] [stdout]     |                                   +            ++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0369]: no implementation for `Cell<u16> & {integer}`
[INFO] [stdout]    --> src/nes/ppu/mod.rs:324:64
[INFO] [stdout]     |
[INFO] [stdout] 324 |                     self.temp_vram_addr = (self.temp_vram_addr & 0x7FE0) | x_scroll;
[INFO] [stdout]     |                                            ------------------- ^ ------ {integer}
[INFO] [stdout]     |                                            |
[INFO] [stdout]     |                                            Cell<u16>
[INFO] [stdout]     |
[INFO] [stdout] note: `Cell<u16>` does not implement `BitAnd<{integer}>`
[INFO] [stdout]    --> /rustc/eeb94be79adc9df7a09ad0b2421f16e60e6d932c/library/core/src/cell.rs:312:0
[INFO] [stdout]     |
[INFO] [stdout]     = note: `Cell<u16>` is defined in another crate
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0369]: no implementation for `Cell<u16> & {integer}`
[INFO] [stdout]    --> src/nes/ppu/mod.rs:329:64
[INFO] [stdout]     |
[INFO] [stdout] 329 |                     self.temp_vram_addr = (self.temp_vram_addr & 0x0C1F)
[INFO] [stdout]     |                                            ------------------- ^ ------ {integer}
[INFO] [stdout]     |                                            |
[INFO] [stdout]     |                                            Cell<u16>
[INFO] [stdout]     |
[INFO] [stdout] note: `Cell<u16>` does not implement `BitAnd<{integer}>`
[INFO] [stdout]    --> /rustc/eeb94be79adc9df7a09ad0b2421f16e60e6d932c/library/core/src/cell.rs:312:0
[INFO] [stdout]     |
[INFO] [stdout]     = note: `Cell<u16>` is defined in another crate
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0600]: cannot apply unary operator `!` to type `Cell<bool>`
[INFO] [stdout]    --> src/nes/ppu/mod.rs:335:37
[INFO] [stdout]     |
[INFO] [stdout] 335 |                 self.write_toggle = !self.write_toggle;
[INFO] [stdout]     |                                     ^^^^^^^^^^^^^^^^^^ cannot apply unary operator `!`
[INFO] [stdout]     |
[INFO] [stdout] note: `Cell<bool>` does not implement `Not`
[INFO] [stdout]    --> /rustc/eeb94be79adc9df7a09ad0b2421f16e60e6d932c/library/core/src/cell.rs:312:0
[INFO] [stdout]     |
[INFO] [stdout]     = note: `Cell<bool>` is defined in another crate
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0600]: cannot apply unary operator `!` to type `Cell<bool>`
[INFO] [stdout]    --> src/nes/ppu/mod.rs:341:20
[INFO] [stdout]     |
[INFO] [stdout] 341 |                 if !self.write_toggle {
[INFO] [stdout]     |                    ^^^^^^^^^^^^^^^^^^ cannot apply unary operator `!`
[INFO] [stdout]     |
[INFO] [stdout] note: `Cell<bool>` does not implement `Not`
[INFO] [stdout]    --> /rustc/eeb94be79adc9df7a09ad0b2421f16e60e6d932c/library/core/src/cell.rs:312:0
[INFO] [stdout]     |
[INFO] [stdout]     = note: `Cell<bool>` is defined in another crate
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0369]: no implementation for `Cell<u16> & {integer}`
[INFO] [stdout]    --> src/nes/ppu/mod.rs:344:46
[INFO] [stdout]     |
[INFO] [stdout] 344 |                         (self.temp_vram_addr & 0x00FF) | (((value & 0x3F) as u16) << 8);
[INFO] [stdout]     |                          ------------------- ^ ------ {integer}
[INFO] [stdout]     |                          |
[INFO] [stdout]     |                          Cell<u16>
[INFO] [stdout]     |
[INFO] [stdout] note: `Cell<u16>` does not implement `BitAnd<{integer}>`
[INFO] [stdout]    --> /rustc/eeb94be79adc9df7a09ad0b2421f16e60e6d932c/library/core/src/cell.rs:312:0
[INFO] [stdout]     |
[INFO] [stdout]     = note: `Cell<u16>` is defined in another crate
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0369]: no implementation for `Cell<u16> & {integer}`
[INFO] [stdout]    --> src/nes/ppu/mod.rs:347:64
[INFO] [stdout]     |
[INFO] [stdout] 347 |                     self.temp_vram_addr = (self.temp_vram_addr & 0xFF00) | (value as u16);
[INFO] [stdout]     |                                            ------------------- ^ ------ {integer}
[INFO] [stdout]     |                                            |
[INFO] [stdout]     |                                            Cell<u16>
[INFO] [stdout]     |
[INFO] [stdout] note: `Cell<u16>` does not implement `BitAnd<{integer}>`
[INFO] [stdout]    --> /rustc/eeb94be79adc9df7a09ad0b2421f16e60e6d932c/library/core/src/cell.rs:312:0
[INFO] [stdout]     |
[INFO] [stdout]     = note: `Cell<u16>` is defined in another crate
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0600]: cannot apply unary operator `!` to type `Cell<bool>`
[INFO] [stdout]    --> src/nes/ppu/mod.rs:350:37
[INFO] [stdout]     |
[INFO] [stdout] 350 |                 self.write_toggle = !self.write_toggle;
[INFO] [stdout]     |                                     ^^^^^^^^^^^^^^^^^^ cannot apply unary operator `!`
[INFO] [stdout]     |
[INFO] [stdout] note: `Cell<bool>` does not implement `Not`
[INFO] [stdout]    --> /rustc/eeb94be79adc9df7a09ad0b2421f16e60e6d932c/library/core/src/cell.rs:312:0
[INFO] [stdout]     |
[INFO] [stdout]     = note: `Cell<bool>` is defined in another crate
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0423]: expected value, found module `memory`
[INFO] [stdout]    --> src/nes/cpu/mod.rs:373:30
[INFO] [stdout]     |
[INFO] [stdout] 373 |             0x48 => self.pha(memory), // PHA
[INFO] [stdout]     |                              ^^^^^^ not a value
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0423]: expected value, found module `memory`
[INFO] [stdout]    --> src/nes/cpu/mod.rs:374:30
[INFO] [stdout]     |
[INFO] [stdout] 374 |             0x08 => self.php(memory), // PHP
[INFO] [stdout]     |                              ^^^^^^ not a value
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0423]: expected value, found module `memory`
[INFO] [stdout]    --> src/nes/cpu/mod.rs:375:30
[INFO] [stdout]     |
[INFO] [stdout] 375 |             0x68 => self.pla(memory), // PLA
[INFO] [stdout]     |                              ^^^^^^ not a value
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0423]: expected value, found module `memory`
[INFO] [stdout]    --> src/nes/cpu/mod.rs:376:30
[INFO] [stdout]     |
[INFO] [stdout] 376 |             0x28 => self.plp(memory), // PLP
[INFO] [stdout]     |                              ^^^^^^ not a value
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0423]: expected value, found module `memory`
[INFO] [stdout]    --> src/nes/cpu/mod.rs:489:30
[INFO] [stdout]     |
[INFO] [stdout] 489 |             0x20 => self.jsr(memory),                           // JSR
[INFO] [stdout]     |                              ^^^^^^ not a value
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0423]: expected value, found module `memory`
[INFO] [stdout]    --> src/nes/cpu/mod.rs:490:30
[INFO] [stdout]     |
[INFO] [stdout] 490 |             0x60 => self.rts(memory),                           // RTS
[INFO] [stdout]     |                              ^^^^^^ not a value
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0423]: expected value, found module `memory`
[INFO] [stdout]    --> src/nes/cpu/mod.rs:491:30
[INFO] [stdout]     |
[INFO] [stdout] 491 |             0x40 => self.rti(memory),                           // RTI
[INFO] [stdout]     |                              ^^^^^^ not a value
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0423]: expected value, found module `memory`
[INFO] [stdout]    --> src/nes/cpu/mod.rs:513:30
[INFO] [stdout]     |
[INFO] [stdout] 513 |             0x00 => self.brk(memory), // BRK
[INFO] [stdout]     |                              ^^^^^^ not a value
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0423]: expected value, found module `memory`
[INFO] [stdout]    --> src/nes/cpu/mod.rs:517:37
[INFO] [stdout]     |
[INFO] [stdout] 517 |             0x0B | 0x2B => self.aac(memory), // AAC (ANC)
[INFO] [stdout]     |                                     ^^^^^^ not a value
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0423]: expected value, found module `memory`
[INFO] [stdout]    --> src/nes/cpu/mod.rs:518:30
[INFO] [stdout]     |
[INFO] [stdout] 518 |             0x8B => self.ane(memory),        // ANE (XAA)
[INFO] [stdout]     |                              ^^^^^^ not a value
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]    --> src/nes/ppu/mod.rs:356:35
[INFO] [stdout]     |
[INFO] [stdout] 356 |                 self.memory.write(self.vram_addr, value);
[INFO] [stdout]     |                             ----- ^^^^^^^^^^^^^^ expected `u16`, found `Cell<u16>`
[INFO] [stdout]     |                             |
[INFO] [stdout]     |                             arguments to this method are incorrect
[INFO] [stdout]     |
[INFO] [stdout]     = note: expected type `u16`
[INFO] [stdout]              found struct `Cell<u16>`
[INFO] [stdout] note: method defined here
[INFO] [stdout]    --> src/nes/ppu/memory.rs:88:12
[INFO] [stdout]     |
[INFO] [stdout]  88 |     pub fn write(&mut self, addr: u16, value: u8) {
[INFO] [stdout]     |            ^^^^^            ---------
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0423]: expected value, found module `memory`
[INFO] [stdout]    --> src/nes/cpu/mod.rs:519:30
[INFO] [stdout]     |
[INFO] [stdout] 519 |             0x6B => self.arr(memory),        // ARR
[INFO] [stdout]     |                              ^^^^^^ not a value
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0605]: non-primitive cast: `Cell<u8>` as `usize`
[INFO] [stdout]    --> src/nes/ppu/mod.rs:312:35
[INFO] [stdout]     |
[INFO] [stdout] 312 |                     self.oam_data[self.oam_addr as usize] = value;
[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[E0423]: expected value, found module `memory`
[INFO] [stdout]    --> src/nes/cpu/mod.rs:522:44
[INFO] [stdout]     |
[INFO] [stdout] 522 |             0x04 | 0x44 | 0x64 => self.nop(memory), // NOP Zero Page
[INFO] [stdout]     |                                            ^^^^^^ not a value
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: cannot find type `ControlRegister` in this scope
[INFO] [stdout]    --> src/nes/ppu/mod.rs:375:36
[INFO] [stdout]     |
[INFO] [stdout] 375 |         if self.regs.ctrl.contains(ControlRegister::VRAM_ADD_INCREMENT) {
[INFO] [stdout]     |                                    ^^^^^^^^^^^^^^^ use of undeclared type `ControlRegister`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0423]: expected value, found module `memory`
[INFO] [stdout]    --> src/nes/cpu/mod.rs:523:65
[INFO] [stdout]     |
[INFO] [stdout] 523 |             0x14 | 0x34 | 0x54 | 0x74 | 0xD4 | 0xF4 => self.nop(memory), // NOP Zero Page,X
[INFO] [stdout]     |                                                                 ^^^^^^ not a value
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0423]: expected value, found module `memory`
[INFO] [stdout]    --> src/nes/cpu/mod.rs:524:51
[INFO] [stdout]     |
[INFO] [stdout] 524 |             0x80 | 0x82 | 0x89 | 0xC2 => self.nop(memory), // NOP Immediate
[INFO] [stdout]     |                                                   ^^^^^^ not a value
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0423]: expected value, found module `memory`
[INFO] [stdout]    --> src/nes/cpu/mod.rs:525:30
[INFO] [stdout]     |
[INFO] [stdout] 525 |             0x0C => self.nop(memory),        // NOP Absolute
[INFO] [stdout]     |                              ^^^^^^ not a value
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0423]: expected value, found module `memory`
[INFO] [stdout]    --> src/nes/cpu/mod.rs:526:65
[INFO] [stdout]     |
[INFO] [stdout] 526 |             0x1C | 0x3C | 0x5C | 0x7C | 0xDC | 0xFC => self.nop(memory), // NOP Absolute,X
[INFO] [stdout]     |                                                                 ^^^^^^ not a value
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0423]: expected value, found module `memory`
[INFO] [stdout]    --> src/nes/cpu/mod.rs:528:65
[INFO] [stdout]     |
[INFO] [stdout] 528 |             0x1A | 0x3A | 0x5A | 0x7A | 0xDA | 0xFA => self.nop(memory), // NOP Implied
[INFO] [stdout]     |                                                                 ^^^^^^ not a value
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0425]: cannot find type `ControlRegister` in this scope
[INFO] [stdout]   --> src/nes/ppu/registers.rs:57:15
[INFO] [stdout]    |
[INFO] [stdout] 57 |     pub ctrl: ControlRegister,
[INFO] [stdout]    |               ^^^^^^^^^^^^^^^ not found in this scope
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0425]: cannot find type `MaskRegister` in this scope
[INFO] [stdout]   --> src/nes/ppu/registers.rs:59:15
[INFO] [stdout]    |
[INFO] [stdout] 59 |     pub mask: MaskRegister,
[INFO] [stdout]    |               ^^^^^^^^^^^^ not found in this scope
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0425]: cannot find type `StatusRegister` in this scope
[INFO] [stdout]   --> src/nes/ppu/registers.rs:61:22
[INFO] [stdout]    |
[INFO] [stdout] 61 |     pub status: Cell<StatusRegister>,
[INFO] [stdout]    |                      ^^^^^^^^^^^^^^ not found in this scope
[INFO] [stdout]    |
[INFO] [stdout] help: you might be missing a type parameter
[INFO] [stdout]    |
[INFO] [stdout] 55 | pub struct Registers<StatusRegister> {
[INFO] [stdout]    |                     ++++++++++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0425]: cannot find type `StatusRegister` in this scope
[INFO] [stdout]    --> src/nes/ppu/registers.rs:164:29
[INFO] [stdout]     |
[INFO] [stdout] 164 |     pub fn status(&self) -> StatusRegister {
[INFO] [stdout]     |                             ^^^^^^^^^^^^^^ not found in this scope
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0425]: cannot find type `StatusRegister` in this scope
[INFO] [stdout]    --> src/nes/ppu/registers.rs:169:38
[INFO] [stdout]     |
[INFO] [stdout] 169 |     pub fn set_status(&self, status: StatusRegister) {
[INFO] [stdout]     |                                      ^^^^^^^^^^^^^^ not found in this scope
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: unused import: `error`
[INFO] [stdout]  --> src/emulator/minifb/mod.rs:7:17
[INFO] [stdout]   |
[INFO] [stdout] 7 | use log::{info, error};
[INFO] [stdout]   |                 ^^^^^
[INFO] [stdout]   |
[INFO] [stdout]   = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0599]: no method named `wrapping_add` found for struct `Cell<T>` in the current scope
[INFO] [stdout]    --> src/nes/ppu/mod.rs:376:45
[INFO] [stdout]     |
[INFO] [stdout] 376 |             self.vram_addr = self.vram_addr.wrapping_add(32);
[INFO] [stdout]     |                                             ^^^^^^^^^^^^ method not found in `Cell<u16>`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0599]: no method named `wrapping_add` found for struct `Cell<T>` in the current scope
[INFO] [stdout]    --> src/nes/ppu/mod.rs:378:45
[INFO] [stdout]     |
[INFO] [stdout] 378 |             self.vram_addr = self.vram_addr.wrapping_add(1);
[INFO] [stdout]     |                                             ^^^^^^^^^^^^ method not found in `Cell<u16>`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: use of deprecated method `minifb::Window::limit_update_rate`: use set_fps_target instead, this function will be removed in the future.
[INFO] [stdout]   --> src/emulator/minifb/mod.rs:65:16
[INFO] [stdout]    |
[INFO] [stdout] 65 |         window.limit_update_rate(Some(std::time::Duration::from_micros(16600)));
[INFO] [stdout]    |                ^^^^^^^^^^^^^^^^^
[INFO] [stdout]    |
[INFO] [stdout]    = note: `#[warn(deprecated)]` on by default
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0599]: no method named `borrow` found for struct `Ppu` in the current scope
[INFO] [stdout]    --> /rustc/eeb94be79adc9df7a09ad0b2421f16e60e6d932c/library/core/src/borrow.rs:179:7
[INFO] [stdout]     |
[INFO] [stdout]     = note: the method is available for `Ppu` here
[INFO] [stdout]     |
[INFO] [stdout]    ::: src/nes/ppu/mod.rs:15:1
[INFO] [stdout]     |
[INFO] [stdout]  15 | pub struct Ppu {
[INFO] [stdout]     | -------------- method `borrow` not found for this struct
[INFO] [stdout]     |
[INFO] [stdout]    ::: src/emulator/minifb/mod.rs:151:43
[INFO] [stdout]     |
[INFO] [stdout] 151 |                         let ppu = nes.ppu.borrow();
[INFO] [stdout]     |                                           ^^^^^^
[INFO] [stdout]     |
[INFO] [stdout]     = help: items from traits can only be used if the trait is in scope
[INFO] [stdout] help: trait `Borrow` which provides `borrow` is implemented but not in scope; perhaps you want to import it
[INFO] [stdout]    --> src/emulator/minifb/mod.rs:3:1
[INFO] [stdout]     |
[INFO] [stdout]   3 + use std::borrow::Borrow;
[INFO] [stdout]     |
[INFO] [stdout] help: there is a method `borrow_mut` with a similar name
[INFO] [stdout]    --> src/emulator/minifb/mod.rs:151:49
[INFO] [stdout]     |
[INFO] [stdout] 151 |                         let ppu = nes.ppu.borrow_mut();
[INFO] [stdout]     |                                                 ++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0423]: expected value, found module `memory`
[INFO] [stdout]    --> src/nes/cpu/mod.rs:373:30
[INFO] [stdout]     |
[INFO] [stdout] 373 |             0x48 => self.pha(memory), // PHA
[INFO] [stdout]     |                              ^^^^^^ not a value
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0423]: expected value, found module `memory`
[INFO] [stdout]    --> src/nes/cpu/mod.rs:374:30
[INFO] [stdout]     |
[INFO] [stdout] 374 |             0x08 => self.php(memory), // PHP
[INFO] [stdout]     |                              ^^^^^^ not a value
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0423]: expected value, found module `memory`
[INFO] [stdout]    --> src/nes/cpu/mod.rs:375:30
[INFO] [stdout]     |
[INFO] [stdout] 375 |             0x68 => self.pla(memory), // PLA
[INFO] [stdout]     |                              ^^^^^^ not a value
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0423]: expected value, found module `memory`
[INFO] [stdout]    --> src/nes/cpu/mod.rs:376:30
[INFO] [stdout]     |
[INFO] [stdout] 376 |             0x28 => self.plp(memory), // PLP
[INFO] [stdout]     |                              ^^^^^^ not a value
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0423]: expected value, found module `memory`
[INFO] [stdout]    --> src/nes/cpu/mod.rs:489:30
[INFO] [stdout]     |
[INFO] [stdout] 489 |             0x20 => self.jsr(memory),                           // JSR
[INFO] [stdout]     |                              ^^^^^^ not a value
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0423]: expected value, found module `memory`
[INFO] [stdout]    --> src/nes/cpu/mod.rs:490:30
[INFO] [stdout]     |
[INFO] [stdout] 490 |             0x60 => self.rts(memory),                           // RTS
[INFO] [stdout]     |                              ^^^^^^ not a value
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0423]: expected value, found module `memory`
[INFO] [stdout]    --> src/nes/cpu/mod.rs:491:30
[INFO] [stdout]     |
[INFO] [stdout] 491 |             0x40 => self.rti(memory),                           // RTI
[INFO] [stdout]     |                              ^^^^^^ not a value
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0423]: expected value, found module `memory`
[INFO] [stdout]    --> src/nes/cpu/mod.rs:513:30
[INFO] [stdout]     |
[INFO] [stdout] 513 |             0x00 => self.brk(memory), // BRK
[INFO] [stdout]     |                              ^^^^^^ not a value
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0423]: expected value, found module `memory`
[INFO] [stdout]    --> src/nes/cpu/mod.rs:517:37
[INFO] [stdout]     |
[INFO] [stdout] 517 |             0x0B | 0x2B => self.aac(memory), // AAC (ANC)
[INFO] [stdout]     |                                     ^^^^^^ not a value
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0423]: expected value, found module `memory`
[INFO] [stdout]    --> src/nes/cpu/mod.rs:518:30
[INFO] [stdout]     |
[INFO] [stdout] 518 |             0x8B => self.ane(memory),        // ANE (XAA)
[INFO] [stdout]     |                              ^^^^^^ not a value
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0423]: expected value, found module `memory`
[INFO] [stdout]    --> src/nes/cpu/mod.rs:519:30
[INFO] [stdout]     |
[INFO] [stdout] 519 |             0x6B => self.arr(memory),        // ARR
[INFO] [stdout]     |                              ^^^^^^ not a value
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0423]: expected value, found module `memory`
[INFO] [stdout]    --> src/nes/cpu/mod.rs:522:44
[INFO] [stdout]     |
[INFO] [stdout] 522 |             0x04 | 0x44 | 0x64 => self.nop(memory), // NOP Zero Page
[INFO] [stdout]     |                                            ^^^^^^ not a value
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0423]: expected value, found module `memory`
[INFO] [stdout]    --> src/nes/cpu/mod.rs:523:65
[INFO] [stdout]     |
[INFO] [stdout] 523 |             0x14 | 0x34 | 0x54 | 0x74 | 0xD4 | 0xF4 => self.nop(memory), // NOP Zero Page,X
[INFO] [stdout]     |                                                                 ^^^^^^ not a value
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0423]: expected value, found module `memory`
[INFO] [stdout]    --> src/nes/cpu/mod.rs:524:51
[INFO] [stdout]     |
[INFO] [stdout] 524 |             0x80 | 0x82 | 0x89 | 0xC2 => self.nop(memory), // NOP Immediate
[INFO] [stdout]     |                                                   ^^^^^^ not a value
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0423]: expected value, found module `memory`
[INFO] [stdout]    --> src/nes/cpu/mod.rs:525:30
[INFO] [stdout]     |
[INFO] [stdout] 525 |             0x0C => self.nop(memory),        // NOP Absolute
[INFO] [stdout]     |                              ^^^^^^ not a value
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0423]: expected value, found module `memory`
[INFO] [stdout]    --> src/nes/cpu/mod.rs:526:65
[INFO] [stdout]     |
[INFO] [stdout] 526 |             0x1C | 0x3C | 0x5C | 0x7C | 0xDC | 0xFC => self.nop(memory), // NOP Absolute,X
[INFO] [stdout]     |                                                                 ^^^^^^ not a value
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0423]: expected value, found module `memory`
[INFO] [stdout]    --> src/nes/cpu/mod.rs:528:65
[INFO] [stdout]     |
[INFO] [stdout] 528 |             0x1A | 0x3A | 0x5A | 0x7A | 0xDA | 0xFA => self.nop(memory), // NOP Implied
[INFO] [stdout]     |                                                                 ^^^^^^ not a value
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0425]: cannot find type `ControlRegister` in this scope
[INFO] [stdout]   --> src/nes/ppu/registers.rs:57:15
[INFO] [stdout]    |
[INFO] [stdout] 57 |     pub ctrl: ControlRegister,
[INFO] [stdout]    |               ^^^^^^^^^^^^^^^ not found in this scope
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0425]: cannot find type `MaskRegister` in this scope
[INFO] [stdout]   --> src/nes/ppu/registers.rs:59:15
[INFO] [stdout]    |
[INFO] [stdout] 59 |     pub mask: MaskRegister,
[INFO] [stdout]    |               ^^^^^^^^^^^^ not found in this scope
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0425]: cannot find type `StatusRegister` in this scope
[INFO] [stdout]   --> src/nes/ppu/registers.rs:61:22
[INFO] [stdout]    |
[INFO] [stdout] 61 |     pub status: Cell<StatusRegister>,
[INFO] [stdout]    |                      ^^^^^^^^^^^^^^ not found in this scope
[INFO] [stdout]    |
[INFO] [stdout] help: you might be missing a type parameter
[INFO] [stdout]    |
[INFO] [stdout] 55 | pub struct Registers<StatusRegister> {
[INFO] [stdout]    |                     ++++++++++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0425]: cannot find type `StatusRegister` in this scope
[INFO] [stdout]    --> src/nes/ppu/registers.rs:164:29
[INFO] [stdout]     |
[INFO] [stdout] 164 |     pub fn status(&self) -> StatusRegister {
[INFO] [stdout]     |                             ^^^^^^^^^^^^^^ not found in this scope
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0425]: cannot find type `StatusRegister` in this scope
[INFO] [stdout]    --> src/nes/ppu/registers.rs:169:38
[INFO] [stdout]     |
[INFO] [stdout] 169 |     pub fn set_status(&self, status: StatusRegister) {
[INFO] [stdout]     |                                      ^^^^^^^^^^^^^^ not found in this scope
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: unused import: `error`
[INFO] [stdout]  --> src/emulator/minifb/mod.rs:7:17
[INFO] [stdout]   |
[INFO] [stdout] 7 | use log::{info, error};
[INFO] [stdout]   |                 ^^^^^
[INFO] [stdout]   |
[INFO] [stdout]   = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0053]: method `read_byte` has an incompatible type for trait
[INFO] [stdout]    --> src/nes/apu/dmc.rs:279:43
[INFO] [stdout]     |
[INFO] [stdout] 279 |         fn read_byte(&self, addr: u16) -> std::io::Result<u8> {
[INFO] [stdout]     |                                           ^^^^^^^^^^^^^^^^^^^ expected `MemoryError`, found `std::io::Error`
[INFO] [stdout]     |
[INFO] [stdout] note: type in trait
[INFO] [stdout]    --> src/nes/utils/mod.rs:18:39
[INFO] [stdout]     |
[INFO] [stdout]  18 |     fn read_byte(&self, addr: u16) -> Result<u8, MemoryError>;
[INFO] [stdout]     |                                       ^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: expected signature `fn(&dmc::tests::TestMemory, _) -> Result<_, MemoryError>`
[INFO] [stdout]                found signature `fn(&dmc::tests::TestMemory, _) -> Result<_, std::io::Error>`
[INFO] [stdout] help: change the output type to match the trait
[INFO] [stdout]     |
[INFO] [stdout] 279 -         fn read_byte(&self, addr: u16) -> std::io::Result<u8> {
[INFO] [stdout] 279 +         fn read_byte(&self, addr: u16) -> Result<u8, MemoryError> {
[INFO] [stdout]     |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0053]: method `write_byte` has an incompatible type for trait
[INFO] [stdout]    --> src/nes/apu/dmc.rs:283:61
[INFO] [stdout]     |
[INFO] [stdout] 283 |         fn write_byte(&mut self, _addr: u16, _value: u8) -> std::io::Result<()> {
[INFO] [stdout]     |                                                             ^^^^^^^^^^^^^^^^^^^ expected `MemoryError`, found `std::io::Error`
[INFO] [stdout]     |
[INFO] [stdout] note: type in trait
[INFO] [stdout]    --> src/nes/utils/mod.rs:21:55
[INFO] [stdout]     |
[INFO] [stdout]  21 |     fn write_byte(&mut self, addr: u16, value: u8) -> Result<(), MemoryError>;
[INFO] [stdout]     |                                                       ^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: expected signature `fn(&mut dmc::tests::TestMemory, _, _) -> Result<_, MemoryError>`
[INFO] [stdout]                found signature `fn(&mut dmc::tests::TestMemory, _, _) -> Result<_, std::io::Error>`
[INFO] [stdout] help: change the output type to match the trait
[INFO] [stdout]     |
[INFO] [stdout] 283 -         fn write_byte(&mut self, _addr: u16, _value: u8) -> std::io::Result<()> {
[INFO] [stdout] 283 +         fn write_byte(&mut self, _addr: u16, _value: u8) -> Result<(), MemoryError> {
[INFO] [stdout]     |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0277]: `dmc::tests::TestMemory` doesn't implement `std::fmt::Debug`
[INFO] [stdout]    --> src/nes/apu/dmc.rs:278:21
[INFO] [stdout]     |
[INFO] [stdout] 278 |     impl Memory for TestMemory {
[INFO] [stdout]     |                     ^^^^^^^^^^ the trait `std::fmt::Debug` is not implemented for `dmc::tests::TestMemory`
[INFO] [stdout]     |
[INFO] [stdout]     = note: add `#[derive(Debug)]` to `dmc::tests::TestMemory` or manually `impl std::fmt::Debug for dmc::tests::TestMemory`
[INFO] [stdout] note: required by a bound in `nes::utils::Memory`
[INFO] [stdout]    --> src/nes/utils/mod.rs:16:19
[INFO] [stdout]     |
[INFO] [stdout]  16 | pub trait Memory: fmt::Debug {
[INFO] [stdout]     |                   ^^^^^^^^^^ required by this bound in `Memory`
[INFO] [stdout] help: consider annotating `dmc::tests::TestMemory` with `#[derive(Debug)]`
[INFO] [stdout]     |
[INFO] [stdout] 262 +     #[derive(Debug)]
[INFO] [stdout] 263 |     struct TestMemory {
[INFO] [stdout]     |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0277]: `apu::tests::TestMemory` doesn't implement `std::fmt::Debug`
[INFO] [stdout]    --> src/nes/apu/mod.rs:305:21
[INFO] [stdout]     |
[INFO] [stdout] 305 |     impl Memory for TestMemory {
[INFO] [stdout]     |                     ^^^^^^^^^^ the trait `std::fmt::Debug` is not implemented for `apu::tests::TestMemory`
[INFO] [stdout]     |
[INFO] [stdout]     = note: add `#[derive(Debug)]` to `apu::tests::TestMemory` or manually `impl std::fmt::Debug for apu::tests::TestMemory`
[INFO] [stdout] note: required by a bound in `nes::utils::Memory`
[INFO] [stdout]    --> src/nes/utils/mod.rs:16:19
[INFO] [stdout]     |
[INFO] [stdout]  16 | pub trait Memory: fmt::Debug {
[INFO] [stdout]     |                   ^^^^^^^^^^ required by this bound in `Memory`
[INFO] [stdout] help: consider annotating `apu::tests::TestMemory` with `#[derive(Debug)]`
[INFO] [stdout]     |
[INFO] [stdout] 291 +     #[derive(Debug)]
[INFO] [stdout] 292 |     struct TestMemory {
[INFO] [stdout]     |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: unused variable: `palette_addr`
[INFO] [stdout]    --> src/nes/ppu/mod.rs:217:17
[INFO] [stdout]     |
[INFO] [stdout] 217 |             let palette_addr = 0x3F00 + color_index as u16;
[INFO] [stdout]     |                 ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_palette_addr`
[INFO] [stdout]     |
[INFO] [stdout]     = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0499]: cannot borrow `self.cpu` as mutable more than once at a time
[INFO] [stdout]    --> src/nes/mod.rs:246:30
[INFO] [stdout]     |
[INFO] [stdout] 246 |             let cpu_cycles = self.cpu.step(self)?;
[INFO] [stdout]     |                              ^^^^^^^^^----^----^
[INFO] [stdout]     |                              |        |    |
[INFO] [stdout]     |                              |        |    first mutable borrow occurs here
[INFO] [stdout]     |                              |        first borrow later used by call
[INFO] [stdout]     |                              second mutable borrow occurs here
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time
[INFO] [stdout]    --> src/nes/mod.rs:246:44
[INFO] [stdout]     |
[INFO] [stdout] 246 |             let cpu_cycles = self.cpu.step(self)?;
[INFO] [stdout]     |                              -------- ---- ^^^^ second mutable borrow occurs here
[INFO] [stdout]     |                              |        |
[INFO] [stdout]     |                              |        first borrow later used by call
[INFO] [stdout]     |                              first mutable borrow occurs here
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0499]: cannot borrow `self.apu` as mutable more than once at a time
[INFO] [stdout]    --> src/nes/mod.rs:259:17
[INFO] [stdout]     |
[INFO] [stdout] 259 |                 self.apu.tick(self);
[INFO] [stdout]     |                 ^^^^^^^^^^^^^^----^
[INFO] [stdout]     |                 |             |
[INFO] [stdout]     |                 |             first mutable borrow occurs here
[INFO] [stdout]     |                 second mutable borrow occurs here
[INFO] [stdout]     |                 first borrow later captured here by trait object
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time
[INFO] [stdout]    --> src/nes/mod.rs:259:31
[INFO] [stdout]     |
[INFO] [stdout] 259 |                 self.apu.tick(self);
[INFO] [stdout]     |                 -------- ---- ^^^^ second mutable borrow occurs here
[INFO] [stdout]     |                 |        |
[INFO] [stdout]     |                 |        first borrow later used by call
[INFO] [stdout]     |                 first mutable borrow occurs here
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0596]: cannot borrow `self.ppu` as mutable, as it is behind a `&` reference
[INFO] [stdout]    --> src/nes/mod.rs:278:20
[INFO] [stdout]     |
[INFO] [stdout] 278 |                 Ok(self.ppu.read_register(reg))
[INFO] [stdout]     |                    ^^^^^^^^ `self` is a `&` reference, so it cannot be borrowed as mutable
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0596]: cannot borrow `self.input` as mutable, as it is behind a `&` reference
[INFO] [stdout]    --> src/nes/mod.rs:285:26
[INFO] [stdout]     |
[INFO] [stdout] 285 |             0x4016 => Ok(self.input.read(0)),
[INFO] [stdout]     |                          ^^^^^^^^^^ `self` is a `&` reference, so it cannot be borrowed as mutable
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0596]: cannot borrow `self.input` as mutable, as it is behind a `&` reference
[INFO] [stdout]    --> src/nes/mod.rs:286:26
[INFO] [stdout]     |
[INFO] [stdout] 286 |             0x4017 => Ok(self.input.read(1)),
[INFO] [stdout]     |                          ^^^^^^^^^^ `self` is a `&` reference, so it cannot be borrowed as mutable
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: cannot find type `ControlRegister` in this scope
[INFO] [stdout]   --> src/nes/ppu/registers.rs:86:19
[INFO] [stdout]    |
[INFO] [stdout] 86 |             ctrl: ControlRegister::empty(),
[INFO] [stdout]    |                   ^^^^^^^^^^^^^^^ use of undeclared type `ControlRegister`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: cannot find type `MaskRegister` in this scope
[INFO] [stdout]   --> src/nes/ppu/registers.rs:87:19
[INFO] [stdout]    |
[INFO] [stdout] 87 |             mask: MaskRegister::empty(),
[INFO] [stdout]    |                   ^^^^^^^^^^^^ use of undeclared type `MaskRegister`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: cannot find type `StatusRegister` in this scope
[INFO] [stdout]   --> src/nes/ppu/registers.rs:88:31
[INFO] [stdout]    |
[INFO] [stdout] 88 |             status: Cell::new(StatusRegister::empty()),
[INFO] [stdout]    |                               ^^^^^^^^^^^^^^ use of undeclared type `StatusRegister`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: cannot find type `ControlRegister` in this scope
[INFO] [stdout]    --> src/nes/ppu/registers.rs:103:21
[INFO] [stdout]     |
[INFO] [stdout] 103 |         self.ctrl = ControlRegister::empty();
[INFO] [stdout]     |                     ^^^^^^^^^^^^^^^ use of undeclared type `ControlRegister`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: cannot find type `MaskRegister` in this scope
[INFO] [stdout]    --> src/nes/ppu/registers.rs:104:21
[INFO] [stdout]     |
[INFO] [stdout] 104 |         self.mask = MaskRegister::empty();
[INFO] [stdout]     |                     ^^^^^^^^^^^^ use of undeclared type `MaskRegister`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0053]: method `read_byte` has an incompatible type for trait
[INFO] [stdout]    --> src/nes/cpu/mod.rs:908:43
[INFO] [stdout]     |
[INFO] [stdout] 908 |         fn read_byte(&self, addr: u16) -> std::io::Result<u8> {
[INFO] [stdout]     |                                           ^^^^^^^^^^^^^^^^^^^ expected `MemoryError`, found `std::io::Error`
[INFO] [stdout]     |
[INFO] [stdout] note: type in trait
[INFO] [stdout]    --> src/nes/utils/mod.rs:18:39
[INFO] [stdout]     |
[INFO] [stdout]  18 |     fn read_byte(&self, addr: u16) -> Result<u8, MemoryError>;
[INFO] [stdout]     |                                       ^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: expected signature `fn(&cpu::tests::TestMemory, _) -> Result<_, MemoryError>`
[INFO] [stdout]                found signature `fn(&cpu::tests::TestMemory, _) -> Result<_, std::io::Error>`
[INFO] [stdout] help: change the output type to match the trait
[INFO] [stdout]     |
[INFO] [stdout] 908 -         fn read_byte(&self, addr: u16) -> std::io::Result<u8> {
[INFO] [stdout] 908 +         fn read_byte(&self, addr: u16) -> Result<u8, MemoryError> {
[INFO] [stdout]     |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0053]: method `write_byte` has an incompatible type for trait
[INFO] [stdout]    --> src/nes/cpu/mod.rs:912:59
[INFO] [stdout]     |
[INFO] [stdout] 912 |         fn write_byte(&mut self, addr: u16, value: u8) -> std::io::Result<()> {
[INFO] [stdout]     |                                                           ^^^^^^^^^^^^^^^^^^^ expected `MemoryError`, found `std::io::Error`
[INFO] [stdout]     |
[INFO] [stdout] note: type in trait
[INFO] [stdout]    --> src/nes/utils/mod.rs:21:55
[INFO] [stdout]     |
[INFO] [stdout]  21 |     fn write_byte(&mut self, addr: u16, value: u8) -> Result<(), MemoryError>;
[INFO] [stdout]     |                                                       ^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: expected signature `fn(&mut cpu::tests::TestMemory, _, _) -> Result<_, MemoryError>`
[INFO] [stdout]                found signature `fn(&mut cpu::tests::TestMemory, _, _) -> Result<_, std::io::Error>`
[INFO] [stdout] help: change the output type to match the trait
[INFO] [stdout]     |
[INFO] [stdout] 912 -         fn write_byte(&mut self, addr: u16, value: u8) -> std::io::Result<()> {
[INFO] [stdout] 912 +         fn write_byte(&mut self, addr: u16, value: u8) -> Result<(), MemoryError> {
[INFO] [stdout]     |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0277]: `cpu::tests::TestMemory` doesn't implement `std::fmt::Debug`
[INFO] [stdout]    --> src/nes/cpu/mod.rs:907:21
[INFO] [stdout]     |
[INFO] [stdout] 907 |     impl Memory for TestMemory {
[INFO] [stdout]     |                     ^^^^^^^^^^ the trait `std::fmt::Debug` is not implemented for `cpu::tests::TestMemory`
[INFO] [stdout]     |
[INFO] [stdout]     = note: add `#[derive(Debug)]` to `cpu::tests::TestMemory` or manually `impl std::fmt::Debug for cpu::tests::TestMemory`
[INFO] [stdout] note: required by a bound in `nes::utils::Memory`
[INFO] [stdout]    --> src/nes/utils/mod.rs:16:19
[INFO] [stdout]     |
[INFO] [stdout]  16 | pub trait Memory: fmt::Debug {
[INFO] [stdout]     |                   ^^^^^^^^^^ required by this bound in `Memory`
[INFO] [stdout] help: consider annotating `cpu::tests::TestMemory` with `#[derive(Debug)]`
[INFO] [stdout]     |
[INFO] [stdout] 888 +     #[derive(Debug)]
[INFO] [stdout] 889 |     struct TestMemory {
[INFO] [stdout]     |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: cannot find type `StatusRegister` in this scope
[INFO] [stdout]    --> src/nes/ppu/registers.rs:105:25
[INFO] [stdout]     |
[INFO] [stdout] 105 |         self.status.set(StatusRegister::empty());
[INFO] [stdout]     |                         ^^^^^^^^^^^^^^ use of undeclared type `StatusRegister`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: cannot find type `ControlRegister` in this scope
[INFO] [stdout]    --> src/nes/ppu/registers.rs:124:31
[INFO] [stdout]     |
[INFO] [stdout] 124 |         if self.ctrl.contains(ControlRegister::VRAM_ADD_INCREMENT) {
[INFO] [stdout]     |                               ^^^^^^^^^^^^^^^ use of undeclared type `ControlRegister`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: cannot find type `ControlRegister` in this scope
[INFO] [stdout]    --> src/nes/ppu/registers.rs:133:31
[INFO] [stdout]     |
[INFO] [stdout] 133 |         if self.ctrl.contains(ControlRegister::SPRITE_PATTERN_ADDR) {
[INFO] [stdout]     |                               ^^^^^^^^^^^^^^^ use of undeclared type `ControlRegister`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: cannot find type `ControlRegister` in this scope
[INFO] [stdout]    --> src/nes/ppu/registers.rs:142:31
[INFO] [stdout]     |
[INFO] [stdout] 142 |         if self.ctrl.contains(ControlRegister::BACKGROUND_PATTERN_ADDR) {
[INFO] [stdout]     |                               ^^^^^^^^^^^^^^^ use of undeclared type `ControlRegister`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: cannot find type `ControlRegister` in this scope
[INFO] [stdout]    --> src/nes/ppu/registers.rs:151:31
[INFO] [stdout]     |
[INFO] [stdout] 151 |         if self.ctrl.contains(ControlRegister::SPRITE_SIZE) {
[INFO] [stdout]     |                               ^^^^^^^^^^^^^^^ use of undeclared type `ControlRegister`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: cannot find type `ControlRegister` in this scope
[INFO] [stdout]    --> src/nes/ppu/registers.rs:160:28
[INFO] [stdout]     |
[INFO] [stdout] 160 |         self.ctrl.contains(ControlRegister::GENERATE_NMI)
[INFO] [stdout]     |                            ^^^^^^^^^^^^^^^ use of undeclared type `ControlRegister`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] Some errors have detailed explanations: E0308, E0369, E0423, E0425, E0433, E0499, E0596, E0599, E0600...
[INFO] [stdout] 
[INFO] [stdout] For more information about an error, try `rustc --explain E0308`.
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]    --> src/nes/ppu/mod.rs:115:26
[INFO] [stdout]     |
[INFO] [stdout] 115 |         self.vram_addr = 0;
[INFO] [stdout]     |         --------------   ^ expected `Cell<u16>`, found integer
[INFO] [stdout]     |         |
[INFO] [stdout]     |         expected due to the type of this binding
[INFO] [stdout]     |
[INFO] [stdout]     = note: expected struct `Cell<u16>`
[INFO] [stdout]                  found type `{integer}`
[INFO] [stdout] help: call `Into::into` on this expression to convert `{integer}` into `Cell<u16>`
[INFO] [stdout]     |
[INFO] [stdout] 115 |         self.vram_addr = 0.into();
[INFO] [stdout]     |                           +++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]    --> src/nes/ppu/mod.rs:116:31
[INFO] [stdout]     |
[INFO] [stdout] 116 |         self.temp_vram_addr = 0;
[INFO] [stdout]     |         -------------------   ^ expected `Cell<u16>`, found integer
[INFO] [stdout]     |         |
[INFO] [stdout]     |         expected due to the type of this binding
[INFO] [stdout]     |
[INFO] [stdout]     = note: expected struct `Cell<u16>`
[INFO] [stdout]                  found type `{integer}`
[INFO] [stdout] help: call `Into::into` on this expression to convert `{integer}` into `Cell<u16>`
[INFO] [stdout]     |
[INFO] [stdout] 116 |         self.temp_vram_addr = 0.into();
[INFO] [stdout]     |                                +++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]    --> src/nes/ppu/mod.rs:117:23
[INFO] [stdout]     |
[INFO] [stdout] 117 |         self.fine_x = 0;
[INFO] [stdout]     |         -----------   ^ expected `Cell<u8>`, found integer
[INFO] [stdout]     |         |
[INFO] [stdout]     |         expected due to the type of this binding
[INFO] [stdout]     |
[INFO] [stdout]     = note: expected struct `Cell<u8>`
[INFO] [stdout]                  found type `{integer}`
[INFO] [stdout] help: call `Into::into` on this expression to convert `{integer}` into `Cell<u8>`
[INFO] [stdout]     |
[INFO] [stdout] 117 |         self.fine_x = 0.into();
[INFO] [stdout]     |                        +++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]    --> src/nes/ppu/mod.rs:118:29
[INFO] [stdout]     |
[INFO] [stdout] 118 |         self.write_toggle = false;
[INFO] [stdout]     |         -----------------   ^^^^^ expected `Cell<bool>`, found `bool`
[INFO] [stdout]     |         |
[INFO] [stdout]     |         expected due to the type of this binding
[INFO] [stdout]     |
[INFO] [stdout]     = note: expected struct `Cell<bool>`
[INFO] [stdout]                  found type `bool`
[INFO] [stdout] help: call `Into::into` on this expression to convert `bool` into `Cell<bool>`
[INFO] [stdout]     |
[INFO] [stdout] 118 |         self.write_toggle = false.into();
[INFO] [stdout]     |                                  +++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]    --> src/nes/ppu/mod.rs:119:25
[INFO] [stdout]     |
[INFO] [stdout] 119 |         self.oam_addr = 0;
[INFO] [stdout]     |         -------------   ^ expected `Cell<u8>`, found integer
[INFO] [stdout]     |         |
[INFO] [stdout]     |         expected due to the type of this binding
[INFO] [stdout]     |
[INFO] [stdout]     = note: expected struct `Cell<u8>`
[INFO] [stdout]                  found type `{integer}`
[INFO] [stdout] help: call `Into::into` on this expression to convert `{integer}` into `Cell<u8>`
[INFO] [stdout]     |
[INFO] [stdout] 119 |         self.oam_addr = 0.into();
[INFO] [stdout]     |                          +++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: cannot find type `StatusRegister` in this scope
[INFO] [stdout]    --> src/nes/ppu/mod.rs:154:37
[INFO] [stdout]     |
[INFO] [stdout] 154 |             self.regs.status.insert(StatusRegister::VBLANK_STARTED);
[INFO] [stdout]     |                                     ^^^^^^^^^^^^^^ use of undeclared type `StatusRegister`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: cannot find type `ControlRegister` in this scope
[INFO] [stdout]    --> src/nes/ppu/mod.rs:157:40
[INFO] [stdout]     |
[INFO] [stdout] 157 |             if self.regs.ctrl.contains(ControlRegister::GENERATE_NMI) {
[INFO] [stdout]     |                                        ^^^^^^^^^^^^^^^ use of undeclared type `ControlRegister`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: cannot find type `StatusRegister` in this scope
[INFO] [stdout]    --> src/nes/ppu/mod.rs:174:41
[INFO] [stdout]     |
[INFO] [stdout] 174 |                 self.regs.status.remove(StatusRegister::VBLANK_STARTED);
[INFO] [stdout]     |                                         ^^^^^^^^^^^^^^ use of undeclared type `StatusRegister`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: cannot find type `StatusRegister` in this scope
[INFO] [stdout]    --> src/nes/ppu/mod.rs:177:41
[INFO] [stdout]     |
[INFO] [stdout] 177 |                 self.regs.status.remove(StatusRegister::SPRITE_ZERO_HIT);
[INFO] [stdout]     |                                         ^^^^^^^^^^^^^^ use of undeclared type `StatusRegister`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stderr] error: could not compile `nes83x-rs` (lib) due to 81 previous errors; 3 warnings emitted
[INFO] [stderr] warning: build failed, waiting for other jobs to finish...
[INFO] [stdout] error[E0433]: cannot find type `StatusRegister` in this scope
[INFO] [stdout]    --> src/nes/ppu/mod.rs:178:41
[INFO] [stdout]     |
[INFO] [stdout] 178 |                 self.regs.status.remove(StatusRegister::SPRITE_OVERFLOW);
[INFO] [stdout]     |                                         ^^^^^^^^^^^^^^ use of undeclared type `StatusRegister`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: cannot find type `StatusRegister` in this scope
[INFO] [stdout]    --> src/nes/ppu/mod.rs:241:41
[INFO] [stdout]     |
[INFO] [stdout] 241 |                 self.regs.status.remove(StatusRegister::VBLANK_STARTED);
[INFO] [stdout]     |                                         ^^^^^^^^^^^^^^ use of undeclared type `StatusRegister`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]    --> src/nes/ppu/mod.rs:242:37
[INFO] [stdout]     |
[INFO] [stdout] 242 |                 self.write_toggle = false;
[INFO] [stdout]     |                 -----------------   ^^^^^ expected `Cell<bool>`, found `bool`
[INFO] [stdout]     |                 |
[INFO] [stdout]     |                 expected due to the type of this binding
[INFO] [stdout]     |
[INFO] [stdout]     = note: expected struct `Cell<bool>`
[INFO] [stdout]                  found type `bool`
[INFO] [stdout] help: call `Into::into` on this expression to convert `bool` into `Cell<bool>`
[INFO] [stdout]     |
[INFO] [stdout] 242 |                 self.write_toggle = false.into();
[INFO] [stdout]     |                                          +++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]    --> src/nes/apu/dmc.rs:346:23
[INFO] [stdout]     |
[INFO] [stdout] 346 |             dmc.clock(&memory);
[INFO] [stdout]     |                 ----- ^^^^^^^ types differ in mutability
[INFO] [stdout]     |                 |
[INFO] [stdout]     |                 arguments to this method are incorrect
[INFO] [stdout]     |
[INFO] [stdout]     = note: expected mutable reference `&mut dyn nes::utils::Memory`
[INFO] [stdout]                        found reference `&dmc::tests::TestMemory`
[INFO] [stdout] note: method defined here
[INFO] [stdout]    --> src/nes/apu/dmc.rs:144:12
[INFO] [stdout]     |
[INFO] [stdout] 144 |     pub fn clock(&mut self, memory: &mut dyn Memory) -> Result<u8, crate::nes::utils::MemoryError> {
[INFO] [stdout]     |            ^^^^^            -----------------------
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]    --> src/nes/ppu/mod.rs:252:46
[INFO] [stdout]     |
[INFO] [stdout] 252 |                 let value = self.memory.read(addr);
[INFO] [stdout]     |                                         ---- ^^^^ expected `u16`, found `Cell<u16>`
[INFO] [stdout]     |                                         |
[INFO] [stdout]     |                                         arguments to this method are incorrect
[INFO] [stdout]     |
[INFO] [stdout]     = note: expected type `u16`
[INFO] [stdout]              found struct `Cell<u16>`
[INFO] [stdout] note: method defined here
[INFO] [stdout]    --> src/nes/ppu/memory.rs:53:12
[INFO] [stdout]     |
[INFO] [stdout]  53 |     pub fn read(&self, addr: u16) -> u8 {
[INFO] [stdout]     |            ^^^^        ---------
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]    --> src/nes/ppu/mod.rs:255:40
[INFO] [stdout]     |
[INFO] [stdout] 255 |                 let result = if addr < 0x3F00 {
[INFO] [stdout]     |                                 ----   ^^^^^^ expected `Cell<u16>`, found integer
[INFO] [stdout]     |                                 |
[INFO] [stdout]     |                                 expected because this is `Cell<u16>`
[INFO] [stdout]     |
[INFO] [stdout]     = note: expected struct `Cell<u16>`
[INFO] [stdout]                  found type `{integer}`
[INFO] [stdout] help: call `Into::into` on this expression to convert `{integer}` into `Cell<u16>`
[INFO] [stdout]     |
[INFO] [stdout] 255 |                 let result = if addr < 0x3F00.into() {
[INFO] [stdout]     |                                              +++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0599]: no method named `wrapping_sub` found for struct `Cell<T>` in the current scope
[INFO] [stdout]    --> src/nes/ppu/mod.rs:257:58
[INFO] [stdout]     |
[INFO] [stdout] 257 |                     let buffered = self.memory.read(addr.wrapping_sub(0x1000));
[INFO] [stdout]     |                                                          ^^^^^^^^^^^^ method not found in `Cell<u16>`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0605]: non-primitive cast: `Cell<u8>` as `usize`
[INFO] [stdout]    --> src/nes/ppu/mod.rs:247:34
[INFO] [stdout]     |
[INFO] [stdout] 247 |             0x4 => self.oam_data[self.oam_addr 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[E0433]: cannot find type `ControlRegister` in this scope
[INFO] [stdout]    --> src/nes/ppu/mod.rs:280:34
[INFO] [stdout]     |
[INFO] [stdout] 280 |                 self.regs.ctrl = ControlRegister::from_bits_truncate(value);
[INFO] [stdout]     |                                  ^^^^^^^^^^^^^^^ use of undeclared type `ControlRegister`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: cannot find type `ControlRegister` in this scope
[INFO] [stdout]    --> src/nes/ppu/mod.rs:283:59
[INFO] [stdout]     |
[INFO] [stdout] 283 |                 let nmi_enabled = self.regs.ctrl.contains(ControlRegister::GENERATE_NMI);
[INFO] [stdout]     |                                                           ^^^^^^^^^^^^^^^ use of undeclared type `ControlRegister`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: cannot find type `StatusRegister` in this scope
[INFO] [stdout]    --> src/nes/ppu/mod.rs:284:61
[INFO] [stdout]     |
[INFO] [stdout] 284 |                 if nmi_enabled && self.regs.status.contains(StatusRegister::VBLANK_STARTED) {
[INFO] [stdout]     |                                                             ^^^^^^^^^^^^^^ use of undeclared type `StatusRegister`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0369]: no implementation for `Cell<u16> & {integer}`
[INFO] [stdout]    --> src/nes/ppu/mod.rs:291:42
[INFO] [stdout]     |
[INFO] [stdout] 291 |                     (self.temp_vram_addr & 0xF3FF) | ((value as u16 & 0x03) << 10);
[INFO] [stdout]     |                      ------------------- ^ ------ {integer}
[INFO] [stdout]     |                      |
[INFO] [stdout]     |                      Cell<u16>
[INFO] [stdout]     |
[INFO] [stdout] note: `Cell<u16>` does not implement `BitAnd<{integer}>`
[INFO] [stdout]    --> /rustc/eeb94be79adc9df7a09ad0b2421f16e60e6d932c/library/core/src/cell.rs:312:0
[INFO] [stdout]     |
[INFO] [stdout]     = note: `Cell<u16>` is defined in another crate
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: cannot find type `MaskRegister` in this scope
[INFO] [stdout]    --> src/nes/ppu/mod.rs:297:34
[INFO] [stdout]     |
[INFO] [stdout] 297 |                 self.regs.mask = MaskRegister::from_bits_truncate(value);
[INFO] [stdout]     |                                  ^^^^^^^^^^^^ use of undeclared type `MaskRegister`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]    --> src/nes/ppu/mod.rs:303:33
[INFO] [stdout]     |
[INFO] [stdout] 303 |                 self.oam_addr = value;
[INFO] [stdout]     |                 -------------   ^^^^^ expected `Cell<u8>`, found `u8`
[INFO] [stdout]     |                 |
[INFO] [stdout]     |                 expected due to the type of this binding
[INFO] [stdout]     |
[INFO] [stdout]     = note: expected struct `Cell<u8>`
[INFO] [stdout]                  found type `u8`
[INFO] [stdout] help: call `Into::into` on this expression to convert `u8` into `Cell<u8>`
[INFO] [stdout]     |
[INFO] [stdout] 303 |                 self.oam_addr = value.into();
[INFO] [stdout]     |                                      +++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]    --> src/nes/apu/mod.rs:337:44
[INFO] [stdout]     |
[INFO] [stdout] 337 |         assert_eq!(apu.frame_counter.mode, 0);
[INFO] [stdout]     |                                            ^ expected `bool`, found integer
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0599]: no method named `wrapping_add` found for struct `Cell<T>` in the current scope
[INFO] [stdout]    --> src/nes/ppu/mod.rs:314:47
[INFO] [stdout]     |
[INFO] [stdout] 314 |                 self.oam_addr = self.oam_addr.wrapping_add(1);
[INFO] [stdout]     |                                               ^^^^^^^^^^^^ method not found in `Cell<u8>`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0600]: cannot apply unary operator `!` to type `Cell<bool>`
[INFO] [stdout]    --> src/nes/ppu/mod.rs:320:20
[INFO] [stdout]     |
[INFO] [stdout] 320 |                 if !self.write_toggle {
[INFO] [stdout]     |                    ^^^^^^^^^^^^^^^^^^ cannot apply unary operator `!`
[INFO] [stdout]     |
[INFO] [stdout] note: `Cell<bool>` does not implement `Not`
[INFO] [stdout]    --> /rustc/eeb94be79adc9df7a09ad0b2421f16e60e6d932c/library/core/src/cell.rs:312:0
[INFO] [stdout]     |
[INFO] [stdout]     = note: `Cell<bool>` is defined in another crate
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]    --> src/nes/ppu/mod.rs:322:35
[INFO] [stdout]     |
[INFO] [stdout] 322 |                     self.fine_x = value & 0x07;
[INFO] [stdout]     |                     -----------   ^^^^^^^^^^^^ expected `Cell<u8>`, found `u8`
[INFO] [stdout]     |                     |
[INFO] [stdout]     |                     expected due to the type of this binding
[INFO] [stdout]     |
[INFO] [stdout]     = note: expected struct `Cell<u8>`
[INFO] [stdout]                  found type `u8`
[INFO] [stdout] help: call `Into::into` on this expression to convert `u8` into `Cell<u8>`
[INFO] [stdout]     |
[INFO] [stdout] 322 |                     self.fine_x = (value & 0x07).into();
[INFO] [stdout]     |                                   +            ++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0369]: no implementation for `Cell<u16> & {integer}`
[INFO] [stdout]    --> src/nes/ppu/mod.rs:324:64
[INFO] [stdout]     |
[INFO] [stdout] 324 |                     self.temp_vram_addr = (self.temp_vram_addr & 0x7FE0) | x_scroll;
[INFO] [stdout]     |                                            ------------------- ^ ------ {integer}
[INFO] [stdout]     |                                            |
[INFO] [stdout]     |                                            Cell<u16>
[INFO] [stdout]     |
[INFO] [stdout] note: `Cell<u16>` does not implement `BitAnd<{integer}>`
[INFO] [stdout]    --> /rustc/eeb94be79adc9df7a09ad0b2421f16e60e6d932c/library/core/src/cell.rs:312:0
[INFO] [stdout]     |
[INFO] [stdout]     = note: `Cell<u16>` is defined in another crate
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0369]: no implementation for `Cell<u16> & {integer}`
[INFO] [stdout]    --> src/nes/ppu/mod.rs:329:64
[INFO] [stdout]     |
[INFO] [stdout] 329 |                     self.temp_vram_addr = (self.temp_vram_addr & 0x0C1F)
[INFO] [stdout]     |                                            ------------------- ^ ------ {integer}
[INFO] [stdout]     |                                            |
[INFO] [stdout]     |                                            Cell<u16>
[INFO] [stdout]     |
[INFO] [stdout] note: `Cell<u16>` does not implement `BitAnd<{integer}>`
[INFO] [stdout]    --> /rustc/eeb94be79adc9df7a09ad0b2421f16e60e6d932c/library/core/src/cell.rs:312:0
[INFO] [stdout]     |
[INFO] [stdout]     = note: `Cell<u16>` is defined in another crate
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0600]: cannot apply unary operator `!` to type `Cell<bool>`
[INFO] [stdout]    --> src/nes/ppu/mod.rs:335:37
[INFO] [stdout]     |
[INFO] [stdout] 335 |                 self.write_toggle = !self.write_toggle;
[INFO] [stdout]     |                                     ^^^^^^^^^^^^^^^^^^ cannot apply unary operator `!`
[INFO] [stdout]     |
[INFO] [stdout] note: `Cell<bool>` does not implement `Not`
[INFO] [stdout]    --> /rustc/eeb94be79adc9df7a09ad0b2421f16e60e6d932c/library/core/src/cell.rs:312:0
[INFO] [stdout]     |
[INFO] [stdout]     = note: `Cell<bool>` is defined in another crate
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0600]: cannot apply unary operator `!` to type `Cell<bool>`
[INFO] [stdout]    --> src/nes/ppu/mod.rs:341:20
[INFO] [stdout]     |
[INFO] [stdout] 341 |                 if !self.write_toggle {
[INFO] [stdout]     |                    ^^^^^^^^^^^^^^^^^^ cannot apply unary operator `!`
[INFO] [stdout]     |
[INFO] [stdout] note: `Cell<bool>` does not implement `Not`
[INFO] [stdout]    --> /rustc/eeb94be79adc9df7a09ad0b2421f16e60e6d932c/library/core/src/cell.rs:312:0
[INFO] [stdout]     |
[INFO] [stdout]     = note: `Cell<bool>` is defined in another crate
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0369]: no implementation for `Cell<u16> & {integer}`
[INFO] [stdout]    --> src/nes/ppu/mod.rs:344:46
[INFO] [stdout]     |
[INFO] [stdout] 344 |                         (self.temp_vram_addr & 0x00FF) | (((value & 0x3F) as u16) << 8);
[INFO] [stdout]     |                          ------------------- ^ ------ {integer}
[INFO] [stdout]     |                          |
[INFO] [stdout]     |                          Cell<u16>
[INFO] [stdout]     |
[INFO] [stdout] note: `Cell<u16>` does not implement `BitAnd<{integer}>`
[INFO] [stdout]    --> /rustc/eeb94be79adc9df7a09ad0b2421f16e60e6d932c/library/core/src/cell.rs:312:0
[INFO] [stdout]     |
[INFO] [stdout]     = note: `Cell<u16>` is defined in another crate
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0369]: no implementation for `Cell<u16> & {integer}`
[INFO] [stdout]    --> src/nes/ppu/mod.rs:347:64
[INFO] [stdout]     |
[INFO] [stdout] 347 |                     self.temp_vram_addr = (self.temp_vram_addr & 0xFF00) | (value as u16);
[INFO] [stdout]     |                                            ------------------- ^ ------ {integer}
[INFO] [stdout]     |                                            |
[INFO] [stdout]     |                                            Cell<u16>
[INFO] [stdout]     |
[INFO] [stdout] note: `Cell<u16>` does not implement `BitAnd<{integer}>`
[INFO] [stdout]    --> /rustc/eeb94be79adc9df7a09ad0b2421f16e60e6d932c/library/core/src/cell.rs:312:0
[INFO] [stdout]     |
[INFO] [stdout]     = note: `Cell<u16>` is defined in another crate
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0600]: cannot apply unary operator `!` to type `Cell<bool>`
[INFO] [stdout]    --> src/nes/ppu/mod.rs:350:37
[INFO] [stdout]     |
[INFO] [stdout] 350 |                 self.write_toggle = !self.write_toggle;
[INFO] [stdout]     |                                     ^^^^^^^^^^^^^^^^^^ cannot apply unary operator `!`
[INFO] [stdout]     |
[INFO] [stdout] note: `Cell<bool>` does not implement `Not`
[INFO] [stdout]    --> /rustc/eeb94be79adc9df7a09ad0b2421f16e60e6d932c/library/core/src/cell.rs:312:0
[INFO] [stdout]     |
[INFO] [stdout]     = note: `Cell<bool>` is defined in another crate
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]    --> src/nes/ppu/mod.rs:356:35
[INFO] [stdout]     |
[INFO] [stdout] 356 |                 self.memory.write(self.vram_addr, value);
[INFO] [stdout]     |                             ----- ^^^^^^^^^^^^^^ expected `u16`, found `Cell<u16>`
[INFO] [stdout]     |                             |
[INFO] [stdout]     |                             arguments to this method are incorrect
[INFO] [stdout]     |
[INFO] [stdout]     = note: expected type `u16`
[INFO] [stdout]              found struct `Cell<u16>`
[INFO] [stdout] note: method defined here
[INFO] [stdout]    --> src/nes/ppu/memory.rs:88:12
[INFO] [stdout]     |
[INFO] [stdout]  88 |     pub fn write(&mut self, addr: u16, value: u8) {
[INFO] [stdout]     |            ^^^^^            ---------
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0605]: non-primitive cast: `Cell<u8>` as `usize`
[INFO] [stdout]    --> src/nes/ppu/mod.rs:312:35
[INFO] [stdout]     |
[INFO] [stdout] 312 |                     self.oam_data[self.oam_addr as usize] = value;
[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[E0433]: cannot find type `ControlRegister` in this scope
[INFO] [stdout]    --> src/nes/ppu/mod.rs:375:36
[INFO] [stdout]     |
[INFO] [stdout] 375 |         if self.regs.ctrl.contains(ControlRegister::VRAM_ADD_INCREMENT) {
[INFO] [stdout]     |                                    ^^^^^^^^^^^^^^^ use of undeclared type `ControlRegister`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]    --> src/nes/cpu/mod.rs:941:31
[INFO] [stdout]     |
[INFO] [stdout] 941 |         let cycles = cpu.step(&mut mem).unwrap();
[INFO] [stdout]     |                          ---- ^^^^^^^^ expected `&mut Nes`, found `&mut TestMemory`
[INFO] [stdout]     |                          |
[INFO] [stdout]     |                          arguments to this method are incorrect
[INFO] [stdout]     |
[INFO] [stdout]     = note: expected mutable reference `&mut nes::Nes`
[INFO] [stdout]                found mutable reference `&mut cpu::tests::TestMemory`
[INFO] [stdout] note: method defined here
[INFO] [stdout]    --> src/nes/cpu/mod.rs:195:12
[INFO] [stdout]     |
[INFO] [stdout] 195 |     pub fn step(&mut self, nes: &mut crate::nes::Nes) -> Result<u32, CpuError> {
[INFO] [stdout]     |            ^^^^            -------------------------
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]    --> src/nes/cpu/mod.rs:960:18
[INFO] [stdout]     |
[INFO] [stdout] 960 |         cpu.step(&mut mem).unwrap();
[INFO] [stdout]     |             ---- ^^^^^^^^ expected `&mut Nes`, found `&mut TestMemory`
[INFO] [stdout]     |             |
[INFO] [stdout]     |             arguments to this method are incorrect
[INFO] [stdout]     |
[INFO] [stdout]     = note: expected mutable reference `&mut nes::Nes`
[INFO] [stdout]                found mutable reference `&mut cpu::tests::TestMemory`
[INFO] [stdout] note: method defined here
[INFO] [stdout]    --> src/nes/cpu/mod.rs:195:12
[INFO] [stdout]     |
[INFO] [stdout] 195 |     pub fn step(&mut self, nes: &mut crate::nes::Nes) -> Result<u32, CpuError> {
[INFO] [stdout]     |            ^^^^            -------------------------
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0599]: no method named `wrapping_add` found for struct `Cell<T>` in the current scope
[INFO] [stdout]    --> src/nes/ppu/mod.rs:376:45
[INFO] [stdout]     |
[INFO] [stdout] 376 |             self.vram_addr = self.vram_addr.wrapping_add(32);
[INFO] [stdout]     |                                             ^^^^^^^^^^^^ method not found in `Cell<u16>`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]    --> src/nes/cpu/mod.rs:961:18
[INFO] [stdout]     |
[INFO] [stdout] 961 |         cpu.step(&mut mem).unwrap();
[INFO] [stdout]     |             ---- ^^^^^^^^ expected `&mut Nes`, found `&mut TestMemory`
[INFO] [stdout]     |             |
[INFO] [stdout]     |             arguments to this method are incorrect
[INFO] [stdout]     |
[INFO] [stdout]     = note: expected mutable reference `&mut nes::Nes`
[INFO] [stdout]                found mutable reference `&mut cpu::tests::TestMemory`
[INFO] [stdout] note: method defined here
[INFO] [stdout]    --> src/nes/cpu/mod.rs:195:12
[INFO] [stdout]     |
[INFO] [stdout] 195 |     pub fn step(&mut self, nes: &mut crate::nes::Nes) -> Result<u32, CpuError> {
[INFO] [stdout]     |            ^^^^            -------------------------
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0277]: `cpu::tests::TestMemory` doesn't implement `std::fmt::Debug`
[INFO] [stdout]    --> src/nes/cpu/mod.rs:963:24
[INFO] [stdout]     |
[INFO] [stdout] 963 |         assert_eq!(mem.read_byte(0x0010).unwrap(), 0x42);
[INFO] [stdout]     |                        ^^^^^^^^^ the trait `std::fmt::Debug` is not implemented for `cpu::tests::TestMemory`
[INFO] [stdout]     |
[INFO] [stdout]     = note: add `#[derive(Debug)]` to `cpu::tests::TestMemory` or manually `impl std::fmt::Debug for cpu::tests::TestMemory`
[INFO] [stdout] note: required by a bound in `nes::utils::Memory::read_byte`
[INFO] [stdout]    --> src/nes/utils/mod.rs:16:19
[INFO] [stdout]     |
[INFO] [stdout]  16 | pub trait Memory: fmt::Debug {
[INFO] [stdout]     |                   ^^^^^^^^^^ required by this bound in `Memory::read_byte`
[INFO] [stdout]  17 |     /// Read a byte from memory
[INFO] [stdout]  18 |     fn read_byte(&self, addr: u16) -> Result<u8, MemoryError>;
[INFO] [stdout]     |        --------- required by a bound in this associated function
[INFO] [stdout] help: consider annotating `cpu::tests::TestMemory` with `#[derive(Debug)]`
[INFO] [stdout]     |
[INFO] [stdout] 888 +     #[derive(Debug)]
[INFO] [stdout] 889 |     struct TestMemory {
[INFO] [stdout]     |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0599]: no method named `wrapping_add` found for struct `Cell<T>` in the current scope
[INFO] [stdout]    --> src/nes/ppu/mod.rs:378:45
[INFO] [stdout]     |
[INFO] [stdout] 378 |             self.vram_addr = self.vram_addr.wrapping_add(1);
[INFO] [stdout]     |                                             ^^^^^^^^^^^^ method not found in `Cell<u16>`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]    --> src/nes/mapper/mmc2.rs:246:30
[INFO] [stdout]     |
[INFO] [stdout] 246 |         assert_eq!(mmc2.read(0xC000 + (last_bank * 0x4000)), 0x00u8);
[INFO] [stdout]     |                         ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u16`, found `usize`
[INFO] [stdout]     |                         |
[INFO] [stdout]     |                         arguments to this method are incorrect
[INFO] [stdout]     |
[INFO] [stdout] note: method defined here
[INFO] [stdout]    --> src/nes/mapper/mod.rs:20:8
[INFO] [stdout]     |
[INFO] [stdout]  20 |     fn read(&self, addr: u16) -> u8;
[INFO] [stdout]     |        ^^^^        ----
[INFO] [stdout] help: you can convert a `usize` to a `u16` and panic if the converted value doesn't fit
[INFO] [stdout]     |
[INFO] [stdout] 246 |         assert_eq!(mmc2.read((0xC000 + (last_bank * 0x4000)).try_into().unwrap()), 0x00u8);
[INFO] [stdout]     |                              +                             +++++++++++++++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: use of deprecated method `minifb::Window::limit_update_rate`: use set_fps_target instead, this function will be removed in the future.
[INFO] [stdout]   --> src/emulator/minifb/mod.rs:65:16
[INFO] [stdout]    |
[INFO] [stdout] 65 |         window.limit_update_rate(Some(std::time::Duration::from_micros(16600)));
[INFO] [stdout]    |                ^^^^^^^^^^^^^^^^^
[INFO] [stdout]    |
[INFO] [stdout]    = note: `#[warn(deprecated)]` on by default
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0599]: no method named `borrow` found for struct `Ppu` in the current scope
[INFO] [stdout]    --> /rustc/eeb94be79adc9df7a09ad0b2421f16e60e6d932c/library/core/src/borrow.rs:179:7
[INFO] [stdout]     |
[INFO] [stdout]     = note: the method is available for `Ppu` here
[INFO] [stdout]     |
[INFO] [stdout]    ::: src/nes/ppu/mod.rs:15:1
[INFO] [stdout]     |
[INFO] [stdout]  15 | pub struct Ppu {
[INFO] [stdout]     | -------------- method `borrow` not found for this struct
[INFO] [stdout]     |
[INFO] [stdout]    ::: src/emulator/minifb/mod.rs:151:43
[INFO] [stdout]     |
[INFO] [stdout] 151 |                         let ppu = nes.ppu.borrow();
[INFO] [stdout]     |                                           ^^^^^^
[INFO] [stdout]     |
[INFO] [stdout]     = help: items from traits can only be used if the trait is in scope
[INFO] [stdout] help: trait `Borrow` which provides `borrow` is implemented but not in scope; perhaps you want to import it
[INFO] [stdout]    --> src/emulator/minifb/mod.rs:3:1
[INFO] [stdout]     |
[INFO] [stdout]   3 + use std::borrow::Borrow;
[INFO] [stdout]     |
[INFO] [stdout] help: there is a method `borrow_mut` with a similar name
[INFO] [stdout]    --> src/emulator/minifb/mod.rs:151:49
[INFO] [stdout]     |
[INFO] [stdout] 151 |                         let ppu = nes.ppu.borrow_mut();
[INFO] [stdout]     |                                                 ++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: cannot find type `ControlRegister` in this scope
[INFO] [stdout]   --> src/nes/ppu/registers.rs:86:19
[INFO] [stdout]    |
[INFO] [stdout] 86 |             ctrl: ControlRegister::empty(),
[INFO] [stdout]    |                   ^^^^^^^^^^^^^^^ use of undeclared type `ControlRegister`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: cannot find type `MaskRegister` in this scope
[INFO] [stdout]   --> src/nes/ppu/registers.rs:87:19
[INFO] [stdout]    |
[INFO] [stdout] 87 |             mask: MaskRegister::empty(),
[INFO] [stdout]    |                   ^^^^^^^^^^^^ use of undeclared type `MaskRegister`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: cannot find type `StatusRegister` in this scope
[INFO] [stdout]   --> src/nes/ppu/registers.rs:88:31
[INFO] [stdout]    |
[INFO] [stdout] 88 |             status: Cell::new(StatusRegister::empty()),
[INFO] [stdout]    |                               ^^^^^^^^^^^^^^ use of undeclared type `StatusRegister`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: cannot find type `ControlRegister` in this scope
[INFO] [stdout]    --> src/nes/ppu/registers.rs:103:21
[INFO] [stdout]     |
[INFO] [stdout] 103 |         self.ctrl = ControlRegister::empty();
[INFO] [stdout]     |                     ^^^^^^^^^^^^^^^ use of undeclared type `ControlRegister`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: cannot find type `MaskRegister` in this scope
[INFO] [stdout]    --> src/nes/ppu/registers.rs:104:21
[INFO] [stdout]     |
[INFO] [stdout] 104 |         self.mask = MaskRegister::empty();
[INFO] [stdout]     |                     ^^^^^^^^^^^^ use of undeclared type `MaskRegister`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: cannot find type `StatusRegister` in this scope
[INFO] [stdout]    --> src/nes/ppu/registers.rs:105:25
[INFO] [stdout]     |
[INFO] [stdout] 105 |         self.status.set(StatusRegister::empty());
[INFO] [stdout]     |                         ^^^^^^^^^^^^^^ use of undeclared type `StatusRegister`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: cannot find type `ControlRegister` in this scope
[INFO] [stdout]    --> src/nes/ppu/registers.rs:124:31
[INFO] [stdout]     |
[INFO] [stdout] 124 |         if self.ctrl.contains(ControlRegister::VRAM_ADD_INCREMENT) {
[INFO] [stdout]     |                               ^^^^^^^^^^^^^^^ use of undeclared type `ControlRegister`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: cannot find type `ControlRegister` in this scope
[INFO] [stdout]    --> src/nes/ppu/registers.rs:133:31
[INFO] [stdout]     |
[INFO] [stdout] 133 |         if self.ctrl.contains(ControlRegister::SPRITE_PATTERN_ADDR) {
[INFO] [stdout]     |                               ^^^^^^^^^^^^^^^ use of undeclared type `ControlRegister`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: cannot find type `ControlRegister` in this scope
[INFO] [stdout]    --> src/nes/ppu/registers.rs:142:31
[INFO] [stdout]     |
[INFO] [stdout] 142 |         if self.ctrl.contains(ControlRegister::BACKGROUND_PATTERN_ADDR) {
[INFO] [stdout]     |                               ^^^^^^^^^^^^^^^ use of undeclared type `ControlRegister`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: cannot find type `ControlRegister` in this scope
[INFO] [stdout]    --> src/nes/ppu/registers.rs:151:31
[INFO] [stdout]     |
[INFO] [stdout] 151 |         if self.ctrl.contains(ControlRegister::SPRITE_SIZE) {
[INFO] [stdout]     |                               ^^^^^^^^^^^^^^^ use of undeclared type `ControlRegister`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: cannot find type `ControlRegister` in this scope
[INFO] [stdout]    --> src/nes/ppu/registers.rs:160:28
[INFO] [stdout]     |
[INFO] [stdout] 160 |         self.ctrl.contains(ControlRegister::GENERATE_NMI)
[INFO] [stdout]     |                            ^^^^^^^^^^^^^^^ use of undeclared type `ControlRegister`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]    --> src/nes/ppu/mod.rs:115:26
[INFO] [stdout]     |
[INFO] [stdout] 115 |         self.vram_addr = 0;
[INFO] [stdout]     |         --------------   ^ expected `Cell<u16>`, found integer
[INFO] [stdout]     |         |
[INFO] [stdout]     |         expected due to the type of this binding
[INFO] [stdout]     |
[INFO] [stdout]     = note: expected struct `Cell<u16>`
[INFO] [stdout]                  found type `{integer}`
[INFO] [stdout] help: call `Into::into` on this expression to convert `{integer}` into `Cell<u16>`
[INFO] [stdout]     |
[INFO] [stdout] 115 |         self.vram_addr = 0.into();
[INFO] [stdout]     |                           +++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]    --> src/nes/ppu/mod.rs:116:31
[INFO] [stdout]     |
[INFO] [stdout] 116 |         self.temp_vram_addr = 0;
[INFO] [stdout]     |         -------------------   ^ expected `Cell<u16>`, found integer
[INFO] [stdout]     |         |
[INFO] [stdout]     |         expected due to the type of this binding
[INFO] [stdout]     |
[INFO] [stdout]     = note: expected struct `Cell<u16>`
[INFO] [stdout]                  found type `{integer}`
[INFO] [stdout] help: call `Into::into` on this expression to convert `{integer}` into `Cell<u16>`
[INFO] [stdout]     |
[INFO] [stdout] 116 |         self.temp_vram_addr = 0.into();
[INFO] [stdout]     |                                +++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]    --> src/nes/ppu/mod.rs:117:23
[INFO] [stdout]     |
[INFO] [stdout] 117 |         self.fine_x = 0;
[INFO] [stdout]     |         -----------   ^ expected `Cell<u8>`, found integer
[INFO] [stdout]     |         |
[INFO] [stdout]     |         expected due to the type of this binding
[INFO] [stdout]     |
[INFO] [stdout]     = note: expected struct `Cell<u8>`
[INFO] [stdout]                  found type `{integer}`
[INFO] [stdout] help: call `Into::into` on this expression to convert `{integer}` into `Cell<u8>`
[INFO] [stdout]     |
[INFO] [stdout] 117 |         self.fine_x = 0.into();
[INFO] [stdout]     |                        +++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]    --> src/nes/ppu/mod.rs:118:29
[INFO] [stdout]     |
[INFO] [stdout] 118 |         self.write_toggle = false;
[INFO] [stdout]     |         -----------------   ^^^^^ expected `Cell<bool>`, found `bool`
[INFO] [stdout]     |         |
[INFO] [stdout]     |         expected due to the type of this binding
[INFO] [stdout]     |
[INFO] [stdout]     = note: expected struct `Cell<bool>`
[INFO] [stdout]                  found type `bool`
[INFO] [stdout] help: call `Into::into` on this expression to convert `bool` into `Cell<bool>`
[INFO] [stdout]     |
[INFO] [stdout] 118 |         self.write_toggle = false.into();
[INFO] [stdout]     |                                  +++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]    --> src/nes/ppu/mod.rs:119:25
[INFO] [stdout]     |
[INFO] [stdout] 119 |         self.oam_addr = 0;
[INFO] [stdout]     |         -------------   ^ expected `Cell<u8>`, found integer
[INFO] [stdout]     |         |
[INFO] [stdout]     |         expected due to the type of this binding
[INFO] [stdout]     |
[INFO] [stdout]     = note: expected struct `Cell<u8>`
[INFO] [stdout]                  found type `{integer}`
[INFO] [stdout] help: call `Into::into` on this expression to convert `{integer}` into `Cell<u8>`
[INFO] [stdout]     |
[INFO] [stdout] 119 |         self.oam_addr = 0.into();
[INFO] [stdout]     |                          +++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: cannot find type `StatusRegister` in this scope
[INFO] [stdout]    --> src/nes/ppu/mod.rs:154:37
[INFO] [stdout]     |
[INFO] [stdout] 154 |             self.regs.status.insert(StatusRegister::VBLANK_STARTED);
[INFO] [stdout]     |                                     ^^^^^^^^^^^^^^ use of undeclared type `StatusRegister`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: cannot find type `ControlRegister` in this scope
[INFO] [stdout]    --> src/nes/ppu/mod.rs:157:40
[INFO] [stdout]     |
[INFO] [stdout] 157 |             if self.regs.ctrl.contains(ControlRegister::GENERATE_NMI) {
[INFO] [stdout]     |                                        ^^^^^^^^^^^^^^^ use of undeclared type `ControlRegister`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: cannot find type `StatusRegister` in this scope
[INFO] [stdout]    --> src/nes/ppu/mod.rs:174:41
[INFO] [stdout]     |
[INFO] [stdout] 174 |                 self.regs.status.remove(StatusRegister::VBLANK_STARTED);
[INFO] [stdout]     |                                         ^^^^^^^^^^^^^^ use of undeclared type `StatusRegister`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: cannot find type `StatusRegister` in this scope
[INFO] [stdout]    --> src/nes/ppu/mod.rs:177:41
[INFO] [stdout]     |
[INFO] [stdout] 177 |                 self.regs.status.remove(StatusRegister::SPRITE_ZERO_HIT);
[INFO] [stdout]     |                                         ^^^^^^^^^^^^^^ use of undeclared type `StatusRegister`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: cannot find type `StatusRegister` in this scope
[INFO] [stdout]    --> src/nes/ppu/mod.rs:178:41
[INFO] [stdout]     |
[INFO] [stdout] 178 |                 self.regs.status.remove(StatusRegister::SPRITE_OVERFLOW);
[INFO] [stdout]     |                                         ^^^^^^^^^^^^^^ use of undeclared type `StatusRegister`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: cannot find type `StatusRegister` in this scope
[INFO] [stdout]    --> src/nes/ppu/mod.rs:241:41
[INFO] [stdout]     |
[INFO] [stdout] 241 |                 self.regs.status.remove(StatusRegister::VBLANK_STARTED);
[INFO] [stdout]     |                                         ^^^^^^^^^^^^^^ use of undeclared type `StatusRegister`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]    --> src/nes/ppu/mod.rs:242:37
[INFO] [stdout]     |
[INFO] [stdout] 242 |                 self.write_toggle = false;
[INFO] [stdout]     |                 -----------------   ^^^^^ expected `Cell<bool>`, found `bool`
[INFO] [stdout]     |                 |
[INFO] [stdout]     |                 expected due to the type of this binding
[INFO] [stdout]     |
[INFO] [stdout]     = note: expected struct `Cell<bool>`
[INFO] [stdout]                  found type `bool`
[INFO] [stdout] help: call `Into::into` on this expression to convert `bool` into `Cell<bool>`
[INFO] [stdout]     |
[INFO] [stdout] 242 |                 self.write_toggle = false.into();
[INFO] [stdout]     |                                          +++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]    --> src/nes/ppu/mod.rs:252:46
[INFO] [stdout]     |
[INFO] [stdout] 252 |                 let value = self.memory.read(addr);
[INFO] [stdout]     |                                         ---- ^^^^ expected `u16`, found `Cell<u16>`
[INFO] [stdout]     |                                         |
[INFO] [stdout]     |                                         arguments to this method are incorrect
[INFO] [stdout]     |
[INFO] [stdout]     = note: expected type `u16`
[INFO] [stdout]              found struct `Cell<u16>`
[INFO] [stdout] note: method defined here
[INFO] [stdout]    --> src/nes/ppu/memory.rs:53:12
[INFO] [stdout]     |
[INFO] [stdout]  53 |     pub fn read(&self, addr: u16) -> u8 {
[INFO] [stdout]     |            ^^^^        ---------
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]    --> src/nes/ppu/mod.rs:255:40
[INFO] [stdout]     |
[INFO] [stdout] 255 |                 let result = if addr < 0x3F00 {
[INFO] [stdout]     |                                 ----   ^^^^^^ expected `Cell<u16>`, found integer
[INFO] [stdout]     |                                 |
[INFO] [stdout]     |                                 expected because this is `Cell<u16>`
[INFO] [stdout]     |
[INFO] [stdout]     = note: expected struct `Cell<u16>`
[INFO] [stdout]                  found type `{integer}`
[INFO] [stdout] help: call `Into::into` on this expression to convert `{integer}` into `Cell<u16>`
[INFO] [stdout]     |
[INFO] [stdout] 255 |                 let result = if addr < 0x3F00.into() {
[INFO] [stdout]     |                                              +++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0599]: no method named `wrapping_sub` found for struct `Cell<T>` in the current scope
[INFO] [stdout]    --> src/nes/ppu/mod.rs:257:58
[INFO] [stdout]     |
[INFO] [stdout] 257 |                     let buffered = self.memory.read(addr.wrapping_sub(0x1000));
[INFO] [stdout]     |                                                          ^^^^^^^^^^^^ method not found in `Cell<u16>`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0605]: non-primitive cast: `Cell<u8>` as `usize`
[INFO] [stdout]    --> src/nes/ppu/mod.rs:247:34
[INFO] [stdout]     |
[INFO] [stdout] 247 |             0x4 => self.oam_data[self.oam_addr 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[E0433]: cannot find type `ControlRegister` in this scope
[INFO] [stdout]    --> src/nes/ppu/mod.rs:280:34
[INFO] [stdout]     |
[INFO] [stdout] 280 |                 self.regs.ctrl = ControlRegister::from_bits_truncate(value);
[INFO] [stdout]     |                                  ^^^^^^^^^^^^^^^ use of undeclared type `ControlRegister`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: cannot find type `ControlRegister` in this scope
[INFO] [stdout]    --> src/nes/ppu/mod.rs:283:59
[INFO] [stdout]     |
[INFO] [stdout] 283 |                 let nmi_enabled = self.regs.ctrl.contains(ControlRegister::GENERATE_NMI);
[INFO] [stdout]     |                                                           ^^^^^^^^^^^^^^^ use of undeclared type `ControlRegister`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: cannot find type `StatusRegister` in this scope
[INFO] [stdout]    --> src/nes/ppu/mod.rs:284:61
[INFO] [stdout]     |
[INFO] [stdout] 284 |                 if nmi_enabled && self.regs.status.contains(StatusRegister::VBLANK_STARTED) {
[INFO] [stdout]     |                                                             ^^^^^^^^^^^^^^ use of undeclared type `StatusRegister`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0369]: no implementation for `Cell<u16> & {integer}`
[INFO] [stdout]    --> src/nes/ppu/mod.rs:291:42
[INFO] [stdout]     |
[INFO] [stdout] 291 |                     (self.temp_vram_addr & 0xF3FF) | ((value as u16 & 0x03) << 10);
[INFO] [stdout]     |                      ------------------- ^ ------ {integer}
[INFO] [stdout]     |                      |
[INFO] [stdout]     |                      Cell<u16>
[INFO] [stdout]     |
[INFO] [stdout] note: `Cell<u16>` does not implement `BitAnd<{integer}>`
[INFO] [stdout]    --> /rustc/eeb94be79adc9df7a09ad0b2421f16e60e6d932c/library/core/src/cell.rs:312:0
[INFO] [stdout]     |
[INFO] [stdout]     = note: `Cell<u16>` is defined in another crate
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: unused variable: `palette_addr`
[INFO] [stdout]    --> src/nes/ppu/mod.rs:217:17
[INFO] [stdout]     |
[INFO] [stdout] 217 |             let palette_addr = 0x3F00 + color_index as u16;
[INFO] [stdout]     |                 ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_palette_addr`
[INFO] [stdout]     |
[INFO] [stdout]     = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: cannot find type `MaskRegister` in this scope
[INFO] [stdout]    --> src/nes/ppu/mod.rs:297:34
[INFO] [stdout]     |
[INFO] [stdout] 297 |                 self.regs.mask = MaskRegister::from_bits_truncate(value);
[INFO] [stdout]     |                                  ^^^^^^^^^^^^ use of undeclared type `MaskRegister`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]    --> src/nes/ppu/mod.rs:303:33
[INFO] [stdout]     |
[INFO] [stdout] 303 |                 self.oam_addr = value;
[INFO] [stdout]     |                 -------------   ^^^^^ expected `Cell<u8>`, found `u8`
[INFO] [stdout]     |                 |
[INFO] [stdout]     |                 expected due to the type of this binding
[INFO] [stdout]     |
[INFO] [stdout]     = note: expected struct `Cell<u8>`
[INFO] [stdout]                  found type `u8`
[INFO] [stdout] help: call `Into::into` on this expression to convert `u8` into `Cell<u8>`
[INFO] [stdout]     |
[INFO] [stdout] 303 |                 self.oam_addr = value.into();
[INFO] [stdout]     |                                      +++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0599]: no method named `wrapping_add` found for struct `Cell<T>` in the current scope
[INFO] [stdout]    --> src/nes/ppu/mod.rs:314:47
[INFO] [stdout]     |
[INFO] [stdout] 314 |                 self.oam_addr = self.oam_addr.wrapping_add(1);
[INFO] [stdout]     |                                               ^^^^^^^^^^^^ method not found in `Cell<u8>`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0600]: cannot apply unary operator `!` to type `Cell<bool>`
[INFO] [stdout]    --> src/nes/ppu/mod.rs:320:20
[INFO] [stdout]     |
[INFO] [stdout] 320 |                 if !self.write_toggle {
[INFO] [stdout]     |                    ^^^^^^^^^^^^^^^^^^ cannot apply unary operator `!`
[INFO] [stdout]     |
[INFO] [stdout] note: `Cell<bool>` does not implement `Not`
[INFO] [stdout]    --> /rustc/eeb94be79adc9df7a09ad0b2421f16e60e6d932c/library/core/src/cell.rs:312:0
[INFO] [stdout]     |
[INFO] [stdout]     = note: `Cell<bool>` is defined in another crate
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]    --> src/nes/ppu/mod.rs:322:35
[INFO] [stdout]     |
[INFO] [stdout] 322 |                     self.fine_x = value & 0x07;
[INFO] [stdout]     |                     -----------   ^^^^^^^^^^^^ expected `Cell<u8>`, found `u8`
[INFO] [stdout]     |                     |
[INFO] [stdout]     |                     expected due to the type of this binding
[INFO] [stdout]     |
[INFO] [stdout]     = note: expected struct `Cell<u8>`
[INFO] [stdout]                  found type `u8`
[INFO] [stdout] help: call `Into::into` on this expression to convert `u8` into `Cell<u8>`
[INFO] [stdout]     |
[INFO] [stdout] 322 |                     self.fine_x = (value & 0x07).into();
[INFO] [stdout]     |                                   +            ++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0369]: no implementation for `Cell<u16> & {integer}`
[INFO] [stdout]    --> src/nes/ppu/mod.rs:324:64
[INFO] [stdout]     |
[INFO] [stdout] 324 |                     self.temp_vram_addr = (self.temp_vram_addr & 0x7FE0) | x_scroll;
[INFO] [stdout]     |                                            ------------------- ^ ------ {integer}
[INFO] [stdout]     |                                            |
[INFO] [stdout]     |                                            Cell<u16>
[INFO] [stdout]     |
[INFO] [stdout] note: `Cell<u16>` does not implement `BitAnd<{integer}>`
[INFO] [stdout]    --> /rustc/eeb94be79adc9df7a09ad0b2421f16e60e6d932c/library/core/src/cell.rs:312:0
[INFO] [stdout]     |
[INFO] [stdout]     = note: `Cell<u16>` is defined in another crate
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0369]: no implementation for `Cell<u16> & {integer}`
[INFO] [stdout]    --> src/nes/ppu/mod.rs:329:64
[INFO] [stdout]     |
[INFO] [stdout] 329 |                     self.temp_vram_addr = (self.temp_vram_addr & 0x0C1F)
[INFO] [stdout]     |                                            ------------------- ^ ------ {integer}
[INFO] [stdout]     |                                            |
[INFO] [stdout]     |                                            Cell<u16>
[INFO] [stdout]     |
[INFO] [stdout] note: `Cell<u16>` does not implement `BitAnd<{integer}>`
[INFO] [stdout]    --> /rustc/eeb94be79adc9df7a09ad0b2421f16e60e6d932c/library/core/src/cell.rs:312:0
[INFO] [stdout]     |
[INFO] [stdout]     = note: `Cell<u16>` is defined in another crate
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0499]: cannot borrow `self.cpu` as mutable more than once at a time
[INFO] [stdout]    --> src/nes/mod.rs:246:30
[INFO] [stdout]     |
[INFO] [stdout] 246 |             let cpu_cycles = self.cpu.step(self)?;
[INFO] [stdout]     |                              ^^^^^^^^^----^----^
[INFO] [stdout]     |                              |        |    |
[INFO] [stdout]     |                              |        |    first mutable borrow occurs here
[INFO] [stdout]     |                              |        first borrow later used by call
[INFO] [stdout]     |                              second mutable borrow occurs here
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time
[INFO] [stdout]    --> src/nes/mod.rs:246:44
[INFO] [stdout]     |
[INFO] [stdout] 246 |             let cpu_cycles = self.cpu.step(self)?;
[INFO] [stdout]     |                              -------- ---- ^^^^ second mutable borrow occurs here
[INFO] [stdout]     |                              |        |
[INFO] [stdout]     |                              |        first borrow later used by call
[INFO] [stdout]     |                              first mutable borrow occurs here
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0499]: cannot borrow `self.apu` as mutable more than once at a time
[INFO] [stdout]    --> src/nes/mod.rs:259:17
[INFO] [stdout]     |
[INFO] [stdout] 259 |                 self.apu.tick(self);
[INFO] [stdout]     |                 ^^^^^^^^^^^^^^----^
[INFO] [stdout]     |                 |             |
[INFO] [stdout]     |                 |             first mutable borrow occurs here
[INFO] [stdout]     |                 second mutable borrow occurs here
[INFO] [stdout]     |                 first borrow later captured here by trait object
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time
[INFO] [stdout]    --> src/nes/mod.rs:259:31
[INFO] [stdout]     |
[INFO] [stdout] 259 |                 self.apu.tick(self);
[INFO] [stdout]     |                 -------- ---- ^^^^ second mutable borrow occurs here
[INFO] [stdout]     |                 |        |
[INFO] [stdout]     |                 |        first borrow later used by call
[INFO] [stdout]     |                 first mutable borrow occurs here
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0596]: cannot borrow `self.ppu` as mutable, as it is behind a `&` reference
[INFO] [stdout]    --> src/nes/mod.rs:278:20
[INFO] [stdout]     |
[INFO] [stdout] 278 |                 Ok(self.ppu.read_register(reg))
[INFO] [stdout]     |                    ^^^^^^^^ `self` is a `&` reference, so it cannot be borrowed as mutable
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0600]: cannot apply unary operator `!` to type `Cell<bool>`
[INFO] [stdout]    --> src/nes/ppu/mod.rs:335:37
[INFO] [stdout]     |
[INFO] [stdout] 335 |                 self.write_toggle = !self.write_toggle;
[INFO] [stdout]     |                                     ^^^^^^^^^^^^^^^^^^ cannot apply unary operator `!`
[INFO] [stdout]     |
[INFO] [stdout] note: `Cell<bool>` does not implement `Not`
[INFO] [stdout]    --> /rustc/eeb94be79adc9df7a09ad0b2421f16e60e6d932c/library/core/src/cell.rs:312:0
[INFO] [stdout]     |
[INFO] [stdout]     = note: `Cell<bool>` is defined in another crate
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0600]: cannot apply unary operator `!` to type `Cell<bool>`
[INFO] [stdout]    --> src/nes/ppu/mod.rs:341:20
[INFO] [stdout]     |
[INFO] [stdout] 341 |                 if !self.write_toggle {
[INFO] [stdout]     |                    ^^^^^^^^^^^^^^^^^^ cannot apply unary operator `!`
[INFO] [stdout]     |
[INFO] [stdout] note: `Cell<bool>` does not implement `Not`
[INFO] [stdout]    --> /rustc/eeb94be79adc9df7a09ad0b2421f16e60e6d932c/library/core/src/cell.rs:312:0
[INFO] [stdout]     |
[INFO] [stdout]     = note: `Cell<bool>` is defined in another crate
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0369]: no implementation for `Cell<u16> & {integer}`
[INFO] [stdout]    --> src/nes/ppu/mod.rs:344:46
[INFO] [stdout]     |
[INFO] [stdout] 344 |                         (self.temp_vram_addr & 0x00FF) | (((value & 0x3F) as u16) << 8);
[INFO] [stdout]     |                          ------------------- ^ ------ {integer}
[INFO] [stdout]     |                          |
[INFO] [stdout]     |                          Cell<u16>
[INFO] [stdout]     |
[INFO] [stdout] note: `Cell<u16>` does not implement `BitAnd<{integer}>`
[INFO] [stdout]    --> /rustc/eeb94be79adc9df7a09ad0b2421f16e60e6d932c/library/core/src/cell.rs:312:0
[INFO] [stdout]     |
[INFO] [stdout]     = note: `Cell<u16>` is defined in another crate
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0596]: cannot borrow `self.input` as mutable, as it is behind a `&` reference
[INFO] [stdout]    --> src/nes/mod.rs:285:26
[INFO] [stdout]     |
[INFO] [stdout] 285 |             0x4016 => Ok(self.input.read(0)),
[INFO] [stdout]     |                          ^^^^^^^^^^ `self` is a `&` reference, so it cannot be borrowed as mutable
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0596]: cannot borrow `self.input` as mutable, as it is behind a `&` reference
[INFO] [stdout]    --> src/nes/mod.rs:286:26
[INFO] [stdout]     |
[INFO] [stdout] 286 |             0x4017 => Ok(self.input.read(1)),
[INFO] [stdout]     |                          ^^^^^^^^^^ `self` is a `&` reference, so it cannot be borrowed as mutable
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0369]: no implementation for `Cell<u16> & {integer}`
[INFO] [stdout]    --> src/nes/ppu/mod.rs:347:64
[INFO] [stdout]     |
[INFO] [stdout] 347 |                     self.temp_vram_addr = (self.temp_vram_addr & 0xFF00) | (value as u16);
[INFO] [stdout]     |                                            ------------------- ^ ------ {integer}
[INFO] [stdout]     |                                            |
[INFO] [stdout]     |                                            Cell<u16>
[INFO] [stdout]     |
[INFO] [stdout] note: `Cell<u16>` does not implement `BitAnd<{integer}>`
[INFO] [stdout]    --> /rustc/eeb94be79adc9df7a09ad0b2421f16e60e6d932c/library/core/src/cell.rs:312:0
[INFO] [stdout]     |
[INFO] [stdout]     = note: `Cell<u16>` is defined in another crate
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0600]: cannot apply unary operator `!` to type `Cell<bool>`
[INFO] [stdout]    --> src/nes/ppu/mod.rs:350:37
[INFO] [stdout]     |
[INFO] [stdout] 350 |                 self.write_toggle = !self.write_toggle;
[INFO] [stdout]     |                                     ^^^^^^^^^^^^^^^^^^ cannot apply unary operator `!`
[INFO] [stdout]     |
[INFO] [stdout] note: `Cell<bool>` does not implement `Not`
[INFO] [stdout]    --> /rustc/eeb94be79adc9df7a09ad0b2421f16e60e6d932c/library/core/src/cell.rs:312:0
[INFO] [stdout]     |
[INFO] [stdout]     = note: `Cell<bool>` is defined in another crate
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]    --> src/nes/ppu/mod.rs:356:35
[INFO] [stdout]     |
[INFO] [stdout] 356 |                 self.memory.write(self.vram_addr, value);
[INFO] [stdout]     |                             ----- ^^^^^^^^^^^^^^ expected `u16`, found `Cell<u16>`
[INFO] [stdout]     |                             |
[INFO] [stdout]     |                             arguments to this method are incorrect
[INFO] [stdout]     |
[INFO] [stdout]     = note: expected type `u16`
[INFO] [stdout]              found struct `Cell<u16>`
[INFO] [stdout] note: method defined here
[INFO] [stdout]    --> src/nes/ppu/memory.rs:88:12
[INFO] [stdout]     |
[INFO] [stdout]  88 |     pub fn write(&mut self, addr: u16, value: u8) {
[INFO] [stdout]     |            ^^^^^            ---------
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0605]: non-primitive cast: `Cell<u8>` as `usize`
[INFO] [stdout]    --> src/nes/ppu/mod.rs:312:35
[INFO] [stdout]     |
[INFO] [stdout] 312 |                     self.oam_data[self.oam_addr as usize] = value;
[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[E0433]: cannot find type `ControlRegister` in this scope
[INFO] [stdout]    --> src/nes/ppu/mod.rs:375:36
[INFO] [stdout]     |
[INFO] [stdout] 375 |         if self.regs.ctrl.contains(ControlRegister::VRAM_ADD_INCREMENT) {
[INFO] [stdout]     |                                    ^^^^^^^^^^^^^^^ use of undeclared type `ControlRegister`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] Some errors have detailed explanations: E0308, E0369, E0423, E0425, E0433, E0499, E0596, E0599, E0600...
[INFO] [stdout] 
[INFO] [stdout] For more information about an error, try `rustc --explain E0308`.
[INFO] [stdout] 
[INFO] [stdout] error[E0599]: no method named `wrapping_add` found for struct `Cell<T>` in the current scope
[INFO] [stdout]    --> src/nes/ppu/mod.rs:376:45
[INFO] [stdout]     |
[INFO] [stdout] 376 |             self.vram_addr = self.vram_addr.wrapping_add(32);
[INFO] [stdout]     |                                             ^^^^^^^^^^^^ method not found in `Cell<u16>`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0599]: no method named `wrapping_add` found for struct `Cell<T>` in the current scope
[INFO] [stdout]    --> src/nes/ppu/mod.rs:378:45
[INFO] [stdout]     |
[INFO] [stdout] 378 |             self.vram_addr = self.vram_addr.wrapping_add(1);
[INFO] [stdout]     |                                             ^^^^^^^^^^^^ method not found in `Cell<u16>`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stderr] error: could not compile `nes83x-rs` (lib) due to 81 previous errors; 3 warnings emitted
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]    --> src/nes/ppu/mod.rs:451:35
[INFO] [stdout]     |
[INFO] [stdout] 451 |         assert_eq!(ppu.vram_addr, 0);
[INFO] [stdout]     |                                   ^ expected `Cell<u16>`, found integer
[INFO] [stdout]     |
[INFO] [stdout]     = note: expected struct `Cell<u16>`
[INFO] [stdout]                  found type `{integer}`
[INFO] [stdout] help: call `Into::into` on this expression to convert `{integer}` into `Cell<u16>`
[INFO] [stdout]     |
[INFO] [stdout] 451 |         assert_eq!(ppu.vram_addr, 0.into());
[INFO] [stdout]     |                                    +++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]    --> src/nes/ppu/mod.rs:452:40
[INFO] [stdout]     |
[INFO] [stdout] 452 |         assert_eq!(ppu.temp_vram_addr, 0);
[INFO] [stdout]     |                                        ^ expected `Cell<u16>`, found integer
[INFO] [stdout]     |
[INFO] [stdout]     = note: expected struct `Cell<u16>`
[INFO] [stdout]                  found type `{integer}`
[INFO] [stdout] help: call `Into::into` on this expression to convert `{integer}` into `Cell<u16>`
[INFO] [stdout]     |
[INFO] [stdout] 452 |         assert_eq!(ppu.temp_vram_addr, 0.into());
[INFO] [stdout]     |                                         +++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]    --> src/nes/ppu/mod.rs:453:32
[INFO] [stdout]     |
[INFO] [stdout] 453 |         assert_eq!(ppu.fine_x, 0);
[INFO] [stdout]     |                                ^ expected `Cell<u8>`, found integer
[INFO] [stdout]     |
[INFO] [stdout]     = note: expected struct `Cell<u8>`
[INFO] [stdout]                  found type `{integer}`
[INFO] [stdout] help: call `Into::into` on this expression to convert `{integer}` into `Cell<u8>`
[INFO] [stdout]     |
[INFO] [stdout] 453 |         assert_eq!(ppu.fine_x, 0.into());
[INFO] [stdout]     |                                 +++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0600]: cannot apply unary operator `!` to type `Cell<bool>`
[INFO] [stdout]    --> src/nes/ppu/mod.rs:454:17
[INFO] [stdout]     |
[INFO] [stdout] 454 |         assert!(!ppu.write_toggle);
[INFO] [stdout]     |                 ^^^^^^^^^^^^^^^^^ cannot apply unary operator `!`
[INFO] [stdout]     |
[INFO] [stdout] note: `Cell<bool>` does not implement `Not`
[INFO] [stdout]    --> /rustc/eeb94be79adc9df7a09ad0b2421f16e60e6d932c/library/core/src/cell.rs:312:0
[INFO] [stdout]     |
[INFO] [stdout]     = note: `Cell<bool>` is defined in another crate
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]    --> src/nes/ppu/mod.rs:455:34
[INFO] [stdout]     |
[INFO] [stdout] 455 |         assert_eq!(ppu.oam_addr, 0);
[INFO] [stdout]     |                                  ^ expected `Cell<u8>`, found integer
[INFO] [stdout]     |
[INFO] [stdout]     = note: expected struct `Cell<u8>`
[INFO] [stdout]                  found type `{integer}`
[INFO] [stdout] help: call `Into::into` on this expression to convert `{integer}` into `Cell<u8>`
[INFO] [stdout]     |
[INFO] [stdout] 455 |         assert_eq!(ppu.oam_addr, 0.into());
[INFO] [stdout]     |                                   +++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: cannot find type `ControlRegister` in this scope
[INFO] [stdout]    --> src/nes/ppu/mod.rs:464:40
[INFO] [stdout]     |
[INFO] [stdout] 464 |         assert!(ppu.regs.ctrl.contains(ControlRegister::GENERATE_NMI));
[INFO] [stdout]     |                                        ^^^^^^^^^^^^^^^ use of undeclared type `ControlRegister`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: cannot find type `StatusRegister` in this scope
[INFO] [stdout]    --> src/nes/ppu/mod.rs:471:32
[INFO] [stdout]     |
[INFO] [stdout] 471 |         ppu.regs.status.insert(StatusRegister::VBLANK_STARTED);
[INFO] [stdout]     |                                ^^^^^^^^^^^^^^ use of undeclared type `StatusRegister`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: cannot find type `StatusRegister` in this scope
[INFO] [stdout]    --> src/nes/ppu/mod.rs:474:43
[INFO] [stdout]     |
[INFO] [stdout] 474 |         assert!(!ppu.regs.status.contains(StatusRegister::VBLANK_STARTED)); // Should be cleared after read
[INFO] [stdout]     |                                           ^^^^^^^^^^^^^^ use of undeclared type `StatusRegister`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]    --> src/nes/ppu/mod.rs:485:32
[INFO] [stdout]     |
[INFO] [stdout] 485 |         assert_eq!(ppu.fine_x, 0x02); // Fine X should be the lower 3 bits of X scroll
[INFO] [stdout]     |                                ^^^^ expected `Cell<u8>`, found integer
[INFO] [stdout]     |
[INFO] [stdout]     = note: expected struct `Cell<u8>`
[INFO] [stdout]                  found type `{integer}`
[INFO] [stdout] help: call `Into::into` on this expression to convert `{integer}` into `Cell<u8>`
[INFO] [stdout]     |
[INFO] [stdout] 485 |         assert_eq!(ppu.fine_x, 0x02.into()); // Fine X should be the lower 3 bits of X scroll
[INFO] [stdout]     |                                    +++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: use of deprecated method `minifb::Window::limit_update_rate`: use set_fps_target instead, this function will be removed in the future.
[INFO] [stdout]   --> src/emulator/minifb/mod.rs:65:16
[INFO] [stdout]    |
[INFO] [stdout] 65 |         window.limit_update_rate(Some(std::time::Duration::from_micros(16600)));
[INFO] [stdout]    |                ^^^^^^^^^^^^^^^^^
[INFO] [stdout]    |
[INFO] [stdout]    = note: `#[warn(deprecated)]` on by default
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0599]: no method named `borrow` found for struct `ppu::Ppu` in the current scope
[INFO] [stdout]    --> /rustc/eeb94be79adc9df7a09ad0b2421f16e60e6d932c/library/core/src/borrow.rs:179:7
[INFO] [stdout]     |
[INFO] [stdout]     = note: the method is available for `ppu::Ppu` here
[INFO] [stdout]     |
[INFO] [stdout]    ::: src/nes/ppu/mod.rs:15:1
[INFO] [stdout]     |
[INFO] [stdout]  15 | pub struct Ppu {
[INFO] [stdout]     | -------------- method `borrow` not found for this struct
[INFO] [stdout]     |
[INFO] [stdout]    ::: src/emulator/minifb/mod.rs:151:43
[INFO] [stdout]     |
[INFO] [stdout] 151 |                         let ppu = nes.ppu.borrow();
[INFO] [stdout]     |                                           ^^^^^^
[INFO] [stdout]     |
[INFO] [stdout]     = help: items from traits can only be used if the trait is in scope
[INFO] [stdout] help: trait `Borrow` which provides `borrow` is implemented but not in scope; perhaps you want to import it
[INFO] [stdout]    --> src/emulator/minifb/mod.rs:3:1
[INFO] [stdout]     |
[INFO] [stdout]   3 + use std::borrow::Borrow;
[INFO] [stdout]     |
[INFO] [stdout] help: there is a method `borrow_mut` with a similar name
[INFO] [stdout]    --> src/emulator/minifb/mod.rs:151:49
[INFO] [stdout]     |
[INFO] [stdout] 151 |                         let ppu = nes.ppu.borrow_mut();
[INFO] [stdout]     |                                                 ++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0594]: cannot assign to `self.data[_]`, which is behind a `&` reference
[INFO] [stdout]    --> src/nes/apu/mod.rs:301:13
[INFO] [stdout]     |
[INFO] [stdout] 301 |             self.data[addr as usize] = value;
[INFO] [stdout]     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `self` is a `&` reference, so it cannot be written to
[INFO] [stdout]     |
[INFO] [stdout] help: consider changing this to be a mutable reference
[INFO] [stdout]     |
[INFO] [stdout] 300 |         fn write(&mut self, addr: u16, value: u8) {
[INFO] [stdout]     |                   +++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0596]: cannot borrow `prg_rom` as mutable, as it is not declared as mutable
[INFO] [stdout]    --> src/nes/mapper/mmc3.rs:367:26
[INFO] [stdout]     |
[INFO] [stdout] 367 |         for (i, byte) in prg_rom.iter_mut().enumerate() {
[INFO] [stdout]     |                          ^^^^^^^ cannot borrow as mutable
[INFO] [stdout]     |
[INFO] [stdout] help: consider changing this to be mutable
[INFO] [stdout]     |
[INFO] [stdout] 363 |         let mut prg_rom = vec![0; 256 * 1024];
[INFO] [stdout]     |             +++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0596]: cannot borrow `chr_rom` as mutable, as it is not declared as mutable
[INFO] [stdout]    --> src/nes/mapper/mmc3.rs:371:28
[INFO] [stdout]     |
[INFO] [stdout] 371 |         if let Some(chr) = chr_rom.as_mut() {
[INFO] [stdout]     |                            ^^^^^^^ cannot borrow as mutable
[INFO] [stdout]     |
[INFO] [stdout] help: consider changing this to be mutable
[INFO] [stdout]     |
[INFO] [stdout] 364 |         let mut chr_rom = Some(vec![0; 128 * 1024]);
[INFO] [stdout]     |             +++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: unused variable: `palette_addr`
[INFO] [stdout]    --> src/nes/ppu/mod.rs:217:17
[INFO] [stdout]     |
[INFO] [stdout] 217 |             let palette_addr = 0x3F00 + color_index as u16;
[INFO] [stdout]     |                 ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_palette_addr`
[INFO] [stdout]     |
[INFO] [stdout]     = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0499]: cannot borrow `self.cpu` as mutable more than once at a time
[INFO] [stdout]    --> src/nes/mod.rs:246:30
[INFO] [stdout]     |
[INFO] [stdout] 246 |             let cpu_cycles = self.cpu.step(self)?;
[INFO] [stdout]     |                              ^^^^^^^^^----^----^
[INFO] [stdout]     |                              |        |    |
[INFO] [stdout]     |                              |        |    first mutable borrow occurs here
[INFO] [stdout]     |                              |        first borrow later used by call
[INFO] [stdout]     |                              second mutable borrow occurs here
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time
[INFO] [stdout]    --> src/nes/mod.rs:246:44
[INFO] [stdout]     |
[INFO] [stdout] 246 |             let cpu_cycles = self.cpu.step(self)?;
[INFO] [stdout]     |                              -------- ---- ^^^^ second mutable borrow occurs here
[INFO] [stdout]     |                              |        |
[INFO] [stdout]     |                              |        first borrow later used by call
[INFO] [stdout]     |                              first mutable borrow occurs here
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0499]: cannot borrow `self.apu` as mutable more than once at a time
[INFO] [stdout]    --> src/nes/mod.rs:259:17
[INFO] [stdout]     |
[INFO] [stdout] 259 |                 self.apu.tick(self);
[INFO] [stdout]     |                 ^^^^^^^^^^^^^^----^
[INFO] [stdout]     |                 |             |
[INFO] [stdout]     |                 |             first mutable borrow occurs here
[INFO] [stdout]     |                 second mutable borrow occurs here
[INFO] [stdout]     |                 first borrow later captured here by trait object
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time
[INFO] [stdout]    --> src/nes/mod.rs:259:31
[INFO] [stdout]     |
[INFO] [stdout] 259 |                 self.apu.tick(self);
[INFO] [stdout]     |                 -------- ---- ^^^^ second mutable borrow occurs here
[INFO] [stdout]     |                 |        |
[INFO] [stdout]     |                 |        first borrow later used by call
[INFO] [stdout]     |                 first mutable borrow occurs here
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0596]: cannot borrow `self.ppu` as mutable, as it is behind a `&` reference
[INFO] [stdout]    --> src/nes/mod.rs:278:20
[INFO] [stdout]     |
[INFO] [stdout] 278 |                 Ok(self.ppu.read_register(reg))
[INFO] [stdout]     |                    ^^^^^^^^ `self` is a `&` reference, so it cannot be borrowed as mutable
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0596]: cannot borrow `self.input` as mutable, as it is behind a `&` reference
[INFO] [stdout]    --> src/nes/mod.rs:285:26
[INFO] [stdout]     |
[INFO] [stdout] 285 |             0x4016 => Ok(self.input.read(0)),
[INFO] [stdout]     |                          ^^^^^^^^^^ `self` is a `&` reference, so it cannot be borrowed as mutable
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0596]: cannot borrow `self.input` as mutable, as it is behind a `&` reference
[INFO] [stdout]    --> src/nes/mod.rs:286:26
[INFO] [stdout]     |
[INFO] [stdout] 286 |             0x4017 => Ok(self.input.read(1)),
[INFO] [stdout]     |                          ^^^^^^^^^^ `self` is a `&` reference, so it cannot be borrowed as mutable
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] Some errors have detailed explanations: E0053, E0277, E0308, E0369, E0423, E0425, E0432, E0433, E0499...
[INFO] [stdout] 
[INFO] [stdout] For more information about an error, try `rustc --explain E0053`.
[INFO] [stdout] 
[INFO] [stderr] error: could not compile `nes83x-rs` (lib test) due to 108 previous errors; 3 warnings emitted
[INFO] running `Command { std: "docker" "inspect" "e5b860a1e2200fa1749b567dc04cd77d559e80769934a7e6ae231f730f0b66d2", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "rm" "-f" "e5b860a1e2200fa1749b567dc04cd77d559e80769934a7e6ae231f730f0b66d2", kill_on_drop: false }`
[INFO] [stdout] e5b860a1e2200fa1749b567dc04cd77d559e80769934a7e6ae231f730f0b66d2
