[INFO] cloning repository https://github.com/borja-eth/rust-engine [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/borja-eth/rust-engine" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fborja-eth%2Frust-engine", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fborja-eth%2Frust-engine'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 7276552383bde10fee1955f976f26f9bdfee049d [INFO] testing borja-eth/rust-engine against master#cdb45c87e2cd43495379f7e867e3cc15dcee9f93 for pr-145838-1 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fborja-eth%2Frust-engine" "/workspace/builds/worker-7-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-7-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/borja-eth/rust-engine [INFO] finished tweaking git repo https://github.com/borja-eth/rust-engine [INFO] tweaked toml for git repo https://github.com/borja-eth/rust-engine written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/borja-eth/rust-engine on toolchain cdb45c87e2cd43495379f7e867e3cc15dcee9f93 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+cdb45c87e2cd43495379f7e867e3cc15dcee9f93" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/borja-eth/rust-engine already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+cdb45c87e2cd43495379f7e867e3cc15dcee9f93" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:7ad1b28ee6f5f7f699f6cf7015098d6ccdd96d6f2d78dd06228f5b4c9faf309c" "/opt/rustwide/cargo-home/bin/cargo" "+cdb45c87e2cd43495379f7e867e3cc15dcee9f93" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 98f46ea208a385c3cbc450866173c189a66cc46d09d7f02274e9446ca582c831 [INFO] running `Command { std: "docker" "start" "-a" "98f46ea208a385c3cbc450866173c189a66cc46d09d7f02274e9446ca582c831", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "98f46ea208a385c3cbc450866173c189a66cc46d09d7f02274e9446ca582c831", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "98f46ea208a385c3cbc450866173c189a66cc46d09d7f02274e9446ca582c831", kill_on_drop: false }` [INFO] [stdout] 98f46ea208a385c3cbc450866173c189a66cc46d09d7f02274e9446ca582c831 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:7ad1b28ee6f5f7f699f6cf7015098d6ccdd96d6f2d78dd06228f5b4c9faf309c" "/opt/rustwide/cargo-home/bin/cargo" "+cdb45c87e2cd43495379f7e867e3cc15dcee9f93" "build" "--frozen" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 7527b429c70b49720bd0a6e1025e48adcd694c16ef02738a33ed52e10ce8c7f2 [INFO] running `Command { std: "docker" "start" "-a" "7527b429c70b49720bd0a6e1025e48adcd694c16ef02738a33ed52e10ce8c7f2", kill_on_drop: false }` [INFO] [stderr] Compiling rust-engine v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] error[E0583]: file not found for module `depth_constants` [INFO] [stdout] --> lib.rs:37:5 [INFO] [stdout] | [INFO] [stdout] 37 | pub mod depth_constants; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: to create the module `depth_constants`, create file "lib/depth_constants.rs" or "lib/depth_constants/mod.rs" [INFO] [stdout] = note: if there is a `mod depth_constants` elsewhere in the crate already, import it with `use crate::...` instead [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0583]: file not found for module `depth_constants` [INFO] [stdout] --> lib.rs:100:5 [INFO] [stdout] | [INFO] [stdout] 100 | pub mod depth_constants; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: to create the module `depth_constants`, create file "lib/depth_constants.rs" or "lib/depth_constants/mod.rs" [INFO] [stdout] = note: if there is a `mod depth_constants` elsewhere in the crate already, import it with `use crate::...` instead [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0428]: the name `lib` is defined multiple times [INFO] [stdout] --> lib.rs:90:1 [INFO] [stdout] | [INFO] [stdout] 25 | pub mod lib { [INFO] [stdout] | ----------- previous definition of the module `lib` here [INFO] [stdout] ... [INFO] [stdout] 90 | pub mod lib { [INFO] [stdout] | ^^^^^^^^^^^ `lib` redefined here [INFO] [stdout] | [INFO] [stdout] = note: `lib` must be defined only once in the type namespace of this module [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0252]: the name `OrderBook` is defined multiple times [INFO] [stdout] --> lib.rs:74:9 [INFO] [stdout] | [INFO] [stdout] 73 | pub use lib::depth_order_book::{DepthOrderBook, OrderBook}; [INFO] [stdout] | --------- previous import of the trait `OrderBook` here [INFO] [stdout] 74 | pub use lib::order_book::OrderBook; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ `OrderBook` reimported here [INFO] [stdout] | [INFO] [stdout] = note: `OrderBook` must be defined only once in the type namespace of this module [INFO] [stdout] help: you can use `as` to change the binding name of the import [INFO] [stdout] | [INFO] [stdout] 74 | pub use lib::order_book::OrderBook as OtherOrderBook; [INFO] [stdout] | +++++++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0252]: the name `Order` is defined multiple times [INFO] [stdout] --> lib.rs:111:9 [INFO] [stdout] | [INFO] [stdout] 65 | pub use lib::order::Order; [INFO] [stdout] | ----------------- previous import of the trait `Order` here [INFO] [stdout] ... [INFO] [stdout] 111 | pub use lib::order::Order; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ `Order` reimported here [INFO] [stdout] | [INFO] [stdout] = note: `Order` must be defined only once in the type namespace of this module [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0252]: the name `OrderBook` is defined multiple times [INFO] [stdout] --> lib.rs:112:9 [INFO] [stdout] | [INFO] [stdout] 73 | pub use lib::depth_order_book::{DepthOrderBook, OrderBook}; [INFO] [stdout] | --------- previous import of the trait `OrderBook` here [INFO] [stdout] ... [INFO] [stdout] 112 | pub use lib::order_book::OrderBook; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ `OrderBook` reimported here [INFO] [stdout] | [INFO] [stdout] = note: `OrderBook` must be defined only once in the type namespace of this module [INFO] [stdout] help: you can use `as` to change the binding name of the import [INFO] [stdout] | [INFO] [stdout] 112 | pub use lib::order_book::OrderBook as OtherOrderBook; [INFO] [stdout] | +++++++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0252]: the name `Price` is defined multiple times [INFO] [stdout] --> lib.rs:113:22 [INFO] [stdout] | [INFO] [stdout] 63 | pub use lib::types::{Price, Quantity, OrderConditions, FillFlags}; [INFO] [stdout] | ----- previous import of the type `Price` here [INFO] [stdout] ... [INFO] [stdout] 113 | pub use lib::types::{Price, Quantity, OrderConditions}; [INFO] [stdout] | ^^^^^-- [INFO] [stdout] | | [INFO] [stdout] | `Price` reimported here [INFO] [stdout] | help: remove unnecessary import [INFO] [stdout] | [INFO] [stdout] = note: `Price` must be defined only once in the type namespace of this module [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0252]: the name `Quantity` is defined multiple times [INFO] [stdout] --> lib.rs:113:29 [INFO] [stdout] | [INFO] [stdout] 63 | pub use lib::types::{Price, Quantity, OrderConditions, FillFlags}; [INFO] [stdout] | -------- previous import of the type `Quantity` here [INFO] [stdout] ... [INFO] [stdout] 113 | pub use lib::types::{Price, Quantity, OrderConditions}; [INFO] [stdout] | ^^^^^^^^-- [INFO] [stdout] | | [INFO] [stdout] | `Quantity` reimported here [INFO] [stdout] | help: remove unnecessary import [INFO] [stdout] | [INFO] [stdout] = note: `Quantity` must be defined only once in the type namespace of this module [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0252]: the name `OrderConditions` is defined multiple times [INFO] [stdout] --> lib.rs:113:39 [INFO] [stdout] | [INFO] [stdout] 63 | pub use lib::types::{Price, Quantity, OrderConditions, FillFlags}; [INFO] [stdout] | --------------- previous import of the type `OrderConditions` here [INFO] [stdout] ... [INFO] [stdout] 113 | pub use lib::types::{Price, Quantity, OrderConditions}; [INFO] [stdout] | ^^^^^^^^^^^^^^^ `OrderConditions` reimported here [INFO] [stdout] | [INFO] [stdout] = note: `OrderConditions` must be defined only once in the type namespace of this module [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0252]: the name `condition` is defined multiple times [INFO] [stdout] --> lib.rs:114:9 [INFO] [stdout] | [INFO] [stdout] 64 | pub use lib::types::condition; [INFO] [stdout] | --------------------- previous import of the module `condition` here [INFO] [stdout] ... [INFO] [stdout] 114 | pub use lib::types::condition; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ `condition` reimported here [INFO] [stdout] | [INFO] [stdout] = note: `condition` must be defined only once in the type namespace of this module [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: unused import: `crate::lib::errors::OrderError` [INFO] [stdout] --> lib/order_tracker.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | use crate::lib::errors::OrderError; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the lint level is defined here [INFO] [stdout] --> lib.rs:21:9 [INFO] [stdout] | [INFO] [stdout] 21 | #![deny(warnings)] [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] = note: `#[deny(unused_imports)]` implied by `#[deny(warnings)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: unused import: `SIZE_UNCHANGED` [INFO] [stdout] --> lib/order_book.rs:17:96 [INFO] [stdout] | [INFO] [stdout] 17 | use crate::lib::types::{Price, Quantity, OrderConditions, MARKET_ORDER_PRICE, PRICE_UNCHANGED, SIZE_UNCHANGED}; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: unused import: `lib::order_book::OrderBook` [INFO] [stdout] --> lib.rs:74:9 [INFO] [stdout] | [INFO] [stdout] 74 | pub use lib::order_book::OrderBook; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: unused import: `lib::order::Order` [INFO] [stdout] --> lib.rs:111:9 [INFO] [stdout] | [INFO] [stdout] 111 | pub use lib::order::Order; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: unused import: `lib::order_book::OrderBook` [INFO] [stdout] --> lib.rs:112:9 [INFO] [stdout] | [INFO] [stdout] 112 | pub use lib::order_book::OrderBook; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: unused imports: `OrderConditions`, `Price`, and `Quantity` [INFO] [stdout] --> lib.rs:113:22 [INFO] [stdout] | [INFO] [stdout] 113 | pub use lib::types::{Price, Quantity, OrderConditions}; [INFO] [stdout] | ^^^^^ ^^^^^^^^ ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: unused import: `lib::types::condition` [INFO] [stdout] --> lib.rs:114:9 [INFO] [stdout] | [INFO] [stdout] 114 | pub use lib::types::condition; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the trait bound `OB: HasDepthTracker` is not satisfied [INFO] [stdout] --> lib/depth_listener.rs:18:54 [INFO] [stdout] | [INFO] [stdout] 18 | fn on_depth_change(&mut self, book: &OB, depth: &::DepthTracker); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `HasDepthTracker` is not implemented for `OB` [INFO] [stdout] | [INFO] [stdout] help: consider restricting type parameter `OB` with trait `HasDepthTracker` [INFO] [stdout] | [INFO] [stdout] 10 | pub trait DepthListener { [INFO] [stdout] | ++++++++++++++++++++++++++++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the trait bound `O: Clone` is not satisfied [INFO] [stdout] --> lib/order_book_listener.rs:17:47 [INFO] [stdout] | [INFO] [stdout] 17 | fn on_order_book_change(&mut self, book: &OrderBook); [INFO] [stdout] | ^^^^^^^^^^^^ the trait `Clone` is not implemented for `O` [INFO] [stdout] | [INFO] [stdout] note: required by a bound in `lib::order_book::OrderBook` [INFO] [stdout] --> lib/order_book.rs:29:33 [INFO] [stdout] | [INFO] [stdout] 29 | pub struct OrderBook { [INFO] [stdout] | ^^^^^ required by this bound in `OrderBook` [INFO] [stdout] help: consider further restricting type parameter `O` with trait `Clone` [INFO] [stdout] | [INFO] [stdout] 12 | pub trait OrderBookListener { [INFO] [stdout] | +++++++++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: `(dyn depth_order_book::OrderBook + 'static)` doesn't implement `Debug` [INFO] [stdout] --> lib/depth_order_book.rs:23:5 [INFO] [stdout] | [INFO] [stdout] 20 | #[derive(Debug)] [INFO] [stdout] | ----- in this derive macro expansion [INFO] [stdout] ... [INFO] [stdout] 23 | order_book: Box>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Debug` is not implemented for `(dyn depth_order_book::OrderBook + 'static)` [INFO] [stdout] | [INFO] [stdout] = help: the following other types implement trait `Debug`: [INFO] [stdout] dyn Any + Send + Sync [INFO] [stdout] dyn Any + Send [INFO] [stdout] dyn Any [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: `(dyn BboListener> + 'static)` doesn't implement `Debug` [INFO] [stdout] --> lib/depth_order_book.rs:27:5 [INFO] [stdout] | [INFO] [stdout] 20 | #[derive(Debug)] [INFO] [stdout] | ----- in this derive macro expansion [INFO] [stdout] ... [INFO] [stdout] 27 | bbo_listener: RefCell>>>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Debug` is not implemented for `(dyn BboListener> + 'static)` [INFO] [stdout] | [INFO] [stdout] = help: the following other types implement trait `Debug`: [INFO] [stdout] dyn Any + Send + Sync [INFO] [stdout] dyn Any + Send [INFO] [stdout] dyn Any [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: `(dyn DepthListener> + 'static)` doesn't implement `Debug` [INFO] [stdout] --> lib/depth_order_book.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 20 | #[derive(Debug)] [INFO] [stdout] | ----- in this derive macro expansion [INFO] [stdout] ... [INFO] [stdout] 29 | depth_listener: RefCell>>>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Debug` is not implemented for `(dyn DepthListener> + 'static)` [INFO] [stdout] | [INFO] [stdout] = help: the following other types implement trait `Debug`: [INFO] [stdout] dyn Any + Send + Sync [INFO] [stdout] dyn Any + Send [INFO] [stdout] dyn Any [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0369]: binary operation `==` cannot be applied to type `&O` [INFO] [stdout] --> lib/order_book.rs:225:34 [INFO] [stdout] | [INFO] [stdout] 225 | if tracker.ptr() == *order { [INFO] [stdout] | ------------- ^^ ------ O [INFO] [stdout] | | [INFO] [stdout] | &O [INFO] [stdout] | [INFO] [stdout] help: consider introducing a `where` clause, but there might be an alternative better way to express this requirement [INFO] [stdout] | [INFO] [stdout] 73 | impl OrderBook where &O: PartialEq { [INFO] [stdout] | ++++++++++++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0369]: binary operation `==` cannot be applied to type `&O` [INFO] [stdout] --> lib/order_book.rs:246:38 [INFO] [stdout] | [INFO] [stdout] 246 | if tracker.ptr() == *order { [INFO] [stdout] | ------------- ^^ ------ O [INFO] [stdout] | | [INFO] [stdout] | &O [INFO] [stdout] | [INFO] [stdout] help: consider introducing a `where` clause, but there might be an alternative better way to express this requirement [INFO] [stdout] | [INFO] [stdout] 73 | impl OrderBook where &O: PartialEq { [INFO] [stdout] | ++++++++++++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0369]: binary operation `==` cannot be applied to type `&O` [INFO] [stdout] --> lib/order_book.rs:269:34 [INFO] [stdout] | [INFO] [stdout] 269 | if tracker.ptr() == *order { [INFO] [stdout] | ------------- ^^ ------ O [INFO] [stdout] | | [INFO] [stdout] | &O [INFO] [stdout] | [INFO] [stdout] help: consider introducing a `where` clause, but there might be an alternative better way to express this requirement [INFO] [stdout] | [INFO] [stdout] 73 | impl OrderBook where &O: PartialEq { [INFO] [stdout] | ++++++++++++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0369]: binary operation `==` cannot be applied to type `&O` [INFO] [stdout] --> lib/order_book.rs:290:38 [INFO] [stdout] | [INFO] [stdout] 290 | if tracker.ptr() == *order { [INFO] [stdout] | ------------- ^^ ------ O [INFO] [stdout] | | [INFO] [stdout] | &O [INFO] [stdout] | [INFO] [stdout] help: consider introducing a `where` clause, but there might be an alternative better way to express this requirement [INFO] [stdout] | [INFO] [stdout] 73 | impl OrderBook where &O: PartialEq { [INFO] [stdout] | ++++++++++++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> lib/order_book.rs:416:32 [INFO] [stdout] | [INFO] [stdout] 416 | let is_stopped = key < self.market_price; [INFO] [stdout] | --- ^^^^^^^^^^^^^^^^^ expected `ComparablePrice`, found `u64` [INFO] [stdout] | | [INFO] [stdout] | expected because this is `lib::comparable_price::ComparablePrice` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0369]: binary operation `==` cannot be applied to type `&&O` [INFO] [stdout] --> lib/order_book.rs:837:31 [INFO] [stdout] | [INFO] [stdout] 837 | if &tracker.ptr() == order { [INFO] [stdout] | -------------- ^^ ----- &O [INFO] [stdout] | | [INFO] [stdout] | &&O [INFO] [stdout] | [INFO] [stdout] help: consider introducing a `where` clause, but there might be an alternative better way to express this requirement [INFO] [stdout] | [INFO] [stdout] 73 | impl OrderBook where &O: PartialEq { [INFO] [stdout] | ++++++++++++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0369]: binary operation `==` cannot be applied to type `&&O` [INFO] [stdout] --> lib/order_book.rs:861:31 [INFO] [stdout] | [INFO] [stdout] 861 | if &tracker.ptr() == order { [INFO] [stdout] | -------------- ^^ ----- &O [INFO] [stdout] | | [INFO] [stdout] | &&O [INFO] [stdout] | [INFO] [stdout] help: consider introducing a `where` clause, but there might be an alternative better way to express this requirement [INFO] [stdout] | [INFO] [stdout] 73 | impl OrderBook where &O: PartialEq { [INFO] [stdout] | ++++++++++++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> lib/order_book.rs:920:39 [INFO] [stdout] | [INFO] [stdout] 920 | listener.on_trade(self, callback.quantity, callback.price); [INFO] [stdout] | -------- ^^^^ expected `&OrderBook`, found `&mut OrderBook` [INFO] [stdout] | | [INFO] [stdout] | arguments to this method are incorrect [INFO] [stdout] | [INFO] [stdout] = note: `lib::order_book::OrderBook` and `lib::order_book::OrderBook` have similar names, but are actually distinct types [INFO] [stdout] note: `lib::order_book::OrderBook` is defined in module `crate::lib#1::order_book` of the current crate [INFO] [stdout] --> lib/order_book.rs:29:1 [INFO] [stdout] | [INFO] [stdout] 29 | pub struct OrderBook { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] note: `lib::order_book::OrderBook` is defined in module `crate::lib::order_book` of the current crate [INFO] [stdout] --> lib/order_book.rs:29:1 [INFO] [stdout] | [INFO] [stdout] 29 | pub struct OrderBook { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] note: method defined here [INFO] [stdout] --> lib/trade_listener.rs:19:8 [INFO] [stdout] | [INFO] [stdout] 19 | fn on_trade(&mut self, book: &OrderBook, qty: Quantity, price: Price); [INFO] [stdout] | ^^^^^^^^ ---- [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> lib/order_book.rs:1041:51 [INFO] [stdout] | [INFO] [stdout] 1041 | listener.on_order_book_change(self); [INFO] [stdout] | -------------------- ^^^^ expected `&OrderBook`, found `&mut OrderBook` [INFO] [stdout] | | [INFO] [stdout] | arguments to this method are incorrect [INFO] [stdout] | [INFO] [stdout] = note: `lib::order_book::OrderBook` and `lib::order_book::OrderBook` have similar names, but are actually distinct types [INFO] [stdout] note: `lib::order_book::OrderBook` is defined in module `crate::lib#1::order_book` of the current crate [INFO] [stdout] --> lib/order_book.rs:29:1 [INFO] [stdout] | [INFO] [stdout] 29 | pub struct OrderBook { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] note: `lib::order_book::OrderBook` is defined in module `crate::lib::order_book` of the current crate [INFO] [stdout] --> lib/order_book.rs:29:1 [INFO] [stdout] | [INFO] [stdout] 29 | pub struct OrderBook { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] note: method defined here [INFO] [stdout] --> lib/order_book_listener.rs:17:8 [INFO] [stdout] | [INFO] [stdout] 17 | fn on_order_book_change(&mut self, book: &OrderBook); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ ---- [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: unused variable: `new_qty` [INFO] [stdout] --> lib/order_tracker.rs:118:17 [INFO] [stdout] | [INFO] [stdout] 118 | let new_qty = self.order.order_qty() + delta as Quantity; [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_new_qty` [INFO] [stdout] | [INFO] [stdout] = note: `#[deny(unused_variables)]` implied by `#[deny(warnings)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> lib/depth.rs:283:35 [INFO] [stdout] | [INFO] [stdout] 278 | &mut self.bid_levels[level_idx] [INFO] [stdout] | ------------------------------- first mutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 283 | level.set_last_change(self.next_change_id()); [INFO] [stdout] | --------------- ^^^^ second mutable borrow occurs here [INFO] [stdout] | | [INFO] [stdout] | first borrow later used by call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> lib/depth.rs:294:39 [INFO] [stdout] | [INFO] [stdout] 287 | &mut self.excess_bid_levels [INFO] [stdout] | --------------------------- first mutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 294 | level.set_last_change(self.next_change_id()); [INFO] [stdout] | --------------- ^^^^ second mutable borrow occurs here [INFO] [stdout] | | [INFO] [stdout] | first borrow later used by call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> lib/depth.rs:299:39 [INFO] [stdout] | [INFO] [stdout] 287 | &mut self.excess_bid_levels [INFO] [stdout] | --------------------------- first mutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 299 | level.set_last_change(self.next_change_id()); [INFO] [stdout] | ^^^^ second mutable borrow occurs here [INFO] [stdout] 300 | excess_levels.insert(price, level); [INFO] [stdout] | ------------- first borrow later used here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> lib/depth.rs:321:43 [INFO] [stdout] | [INFO] [stdout] 311 | &mut self.bid_levels[level_idx] [INFO] [stdout] | ------------------------------- first mutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 321 | level.set_last_change(self.next_change_id()); [INFO] [stdout] | --------------- ^^^^ second mutable borrow occurs here [INFO] [stdout] | | [INFO] [stdout] | first borrow later used by call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> lib/depth.rs:338:47 [INFO] [stdout] | [INFO] [stdout] 327 | &mut self.excess_bid_levels [INFO] [stdout] | --------------------------- first mutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 338 | level.set_last_change(self.next_change_id()); [INFO] [stdout] | --------------- ^^^^ second mutable borrow occurs here [INFO] [stdout] | | [INFO] [stdout] | first borrow later used by call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> lib/depth.rs:360:35 [INFO] [stdout] | [INFO] [stdout] 354 | &mut self.bid_levels[level_idx] [INFO] [stdout] | ------------------------------- first mutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 360 | level.set_last_change(self.next_change_id()); [INFO] [stdout] | --------------- ^^^^ second mutable borrow occurs here [INFO] [stdout] | | [INFO] [stdout] | first borrow later used by call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> lib/depth.rs:371:39 [INFO] [stdout] | [INFO] [stdout] 364 | &mut self.excess_bid_levels [INFO] [stdout] | --------------------------- first mutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 371 | level.set_last_change(self.next_change_id()); [INFO] [stdout] | --------------- ^^^^ second mutable borrow occurs here [INFO] [stdout] | | [INFO] [stdout] | first borrow later used by call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> lib/depth.rs:388:35 [INFO] [stdout] | [INFO] [stdout] 382 | &mut self.bid_levels[level_idx] [INFO] [stdout] | ------------------------------- first mutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 388 | level.set_last_change(self.next_change_id()); [INFO] [stdout] | --------------- ^^^^ second mutable borrow occurs here [INFO] [stdout] | | [INFO] [stdout] | first borrow later used by call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> lib/depth.rs:399:39 [INFO] [stdout] | [INFO] [stdout] 392 | &mut self.excess_bid_levels [INFO] [stdout] | --------------------------- first mutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 399 | level.set_last_change(self.next_change_id()); [INFO] [stdout] | --------------- ^^^^ second mutable borrow occurs here [INFO] [stdout] | | [INFO] [stdout] | first borrow later used by call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0502]: cannot borrow `self.bid_levels[_]` as mutable because it is also borrowed as immutable [INFO] [stdout] --> lib/depth.rs:485:17 [INFO] [stdout] | [INFO] [stdout] 485 | self.bid_levels[i].copy_from(&self.bid_levels[prev]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^---------^----------------------^ [INFO] [stdout] | | | | [INFO] [stdout] | | | immutable borrow occurs here [INFO] [stdout] | | immutable borrow later used by call [INFO] [stdout] | mutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0502]: cannot borrow `*self` as mutable because it is also borrowed as immutable [INFO] [stdout] --> lib/depth.rs:496:17 [INFO] [stdout] | [INFO] [stdout] 493 | let last_level = &self.bid_levels[last_index]; [INFO] [stdout] | ---------------------------- immutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 496 | self.add_excess_level(last_level, is_buy); [INFO] [stdout] | ^^^^^----------------^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | | [INFO] [stdout] | | immutable borrow later used by call [INFO] [stdout] | mutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0502]: cannot borrow `self.ask_levels[_]` as mutable because it is also borrowed as immutable [INFO] [stdout] --> lib/depth.rs:502:17 [INFO] [stdout] | [INFO] [stdout] 502 | self.ask_levels[i].copy_from(&self.ask_levels[prev]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^---------^----------------------^ [INFO] [stdout] | | | | [INFO] [stdout] | | | immutable borrow occurs here [INFO] [stdout] | | immutable borrow later used by call [INFO] [stdout] | mutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0502]: cannot borrow `*self` as mutable because it is also borrowed as immutable [INFO] [stdout] --> lib/depth.rs:513:17 [INFO] [stdout] | [INFO] [stdout] 510 | let last_level = &self.ask_levels[last_index]; [INFO] [stdout] | ---------------------------- immutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 513 | self.add_excess_level(last_level, is_buy); [INFO] [stdout] | ^^^^^----------------^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | | [INFO] [stdout] | | immutable borrow later used by call [INFO] [stdout] | mutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0502]: cannot borrow `self.bid_levels[_]` as mutable because it is also borrowed as immutable [INFO] [stdout] --> lib/depth.rs:526:17 [INFO] [stdout] | [INFO] [stdout] 526 | self.bid_levels[i].copy_from(&self.bid_levels[next]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^---------^----------------------^ [INFO] [stdout] | | | | [INFO] [stdout] | | | immutable borrow occurs here [INFO] [stdout] | | immutable borrow later used by call [INFO] [stdout] | mutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0502]: cannot borrow `self.ask_levels[_]` as mutable because it is also borrowed as immutable [INFO] [stdout] --> lib/depth.rs:536:17 [INFO] [stdout] | [INFO] [stdout] 536 | self.ask_levels[i].copy_from(&self.ask_levels[next]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^---------^----------------------^ [INFO] [stdout] | | | | [INFO] [stdout] | | | immutable borrow occurs here [INFO] [stdout] | | immutable borrow later used by call [INFO] [stdout] | mutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: variable does not need to be mutable [INFO] [stdout] --> lib/order_book.rs:76:13 [INFO] [stdout] | [INFO] [stdout] 76 | let mut book = Self { [INFO] [stdout] | ----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[deny(unused_mut)]` implied by `#[deny(warnings)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> lib/order_book.rs:134:13 [INFO] [stdout] | [INFO] [stdout] 134 | self.check_stop_orders(true, price, &mut self.stop_bids); [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.stop_bids` as mutable more than once at a time [INFO] [stdout] --> lib/order_book.rs:134:49 [INFO] [stdout] | [INFO] [stdout] 134 | self.check_stop_orders(true, price, &mut self.stop_bids); [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` as mutable more than once at a time [INFO] [stdout] --> lib/order_book.rs:137:13 [INFO] [stdout] | [INFO] [stdout] 137 | self.check_stop_orders(false, price, &mut self.stop_asks); [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.stop_asks` as mutable more than once at a time [INFO] [stdout] --> lib/order_book.rs:137:50 [INFO] [stdout] | [INFO] [stdout] 137 | self.check_stop_orders(false, price, &mut self.stop_asks); [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[E0382]: borrow of moved value: `tracker` [INFO] [stdout] --> lib/order_book.rs:186:45 [INFO] [stdout] | [INFO] [stdout] 177 | let mut tracker = OrderTracker::new(order.clone(), conditions); [INFO] [stdout] | ----------- move occurs because `tracker` has type `lib::order_tracker::OrderTracker`, which does not implement the `Copy` trait [INFO] [stdout] 178 | [INFO] [stdout] 179 | if tracker.ptr().stop_price() != 0 && self.add_stop_order(tracker) { [INFO] [stdout] | ------- value moved here [INFO] [stdout] ... [INFO] [stdout] 186 | matched = self.submit_order(&mut tracker); [INFO] [stdout] | ^^^^^^^^^^^^ value borrowed here after move [INFO] [stdout] | [INFO] [stdout] note: consider changing this parameter type in method `add_stop_order` to borrow instead if owning the value isn't necessary [INFO] [stdout] --> lib/order_book.rs:411:43 [INFO] [stdout] | [INFO] [stdout] 411 | fn add_stop_order(&mut self, tracker: OrderTracker) -> bool { [INFO] [stdout] | -------------- in this method ^^^^^^^^^^^^^^^ this parameter takes ownership of the value [INFO] [stdout] help: consider cloning the value if the performance cost is acceptable [INFO] [stdout] | [INFO] [stdout] 179 | if tracker.ptr().stop_price() != 0 && self.add_stop_order(tracker.clone()) { [INFO] [stdout] | ++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: unused variable: `price_change` [INFO] [stdout] --> lib/order_book.rs:333:13 [INFO] [stdout] | [INFO] [stdout] 333 | let price_change = new_price != 0 && new_price != order.price(); [INFO] [stdout] | ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_price_change` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0502]: cannot borrow `self.callbacks` as mutable because it is also borrowed as immutable [INFO] [stdout] --> lib/order_book.rs:352:13 [INFO] [stdout] | [INFO] [stdout] 340 | let result = self.find_on_market(order); [INFO] [stdout] | ---- immutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 352 | / self.callbacks.push(Callback::replace( [INFO] [stdout] 353 | | order.clone(), [INFO] [stdout] 354 | | tracker.open_qty(), [INFO] [stdout] 355 | | size_delta, [INFO] [stdout] 356 | | price [INFO] [stdout] 357 | | )); [INFO] [stdout] | |______________^ mutable borrow occurs here [INFO] [stdout] 358 | [INFO] [stdout] 359 | let new_open_qty = (tracker.open_qty() as i64 + size_delta) as Quantity; [INFO] [stdout] | ------- immutable borrow later used here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: value assigned to `matched` is never read [INFO] [stdout] --> lib/order_book.rs:461:17 [INFO] [stdout] | [INFO] [stdout] 461 | let mut matched = false; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[deny(unused_assignments)]` implied by `#[deny(warnings)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> lib/order_book.rs:467:23 [INFO] [stdout] | [INFO] [stdout] 467 | matched = self.match_order(&mut tracker, order_price, &mut self.asks, &mut deferred_aons); [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[E0502]: cannot borrow `tracker` as mutable because it is also borrowed as immutable [INFO] [stdout] --> lib/order_book.rs:467:40 [INFO] [stdout] | [INFO] [stdout] 462 | let order = tracker.ptr(); [INFO] [stdout] | ------- immutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 467 | matched = self.match_order(&mut tracker, order_price, &mut self.asks, &mut deferred_aons); [INFO] [stdout] | ^^^^^^^^^^^^ mutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 475 | if order.is_buy() { [INFO] [stdout] | ----- immutable borrow later used here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `self.asks` as mutable more than once at a time [INFO] [stdout] --> lib/order_book.rs:467:67 [INFO] [stdout] | [INFO] [stdout] 467 | matched = self.match_order(&mut tracker, order_price, &mut self.asks, &mut deferred_aons); [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` as mutable more than once at a time [INFO] [stdout] --> lib/order_book.rs:469:23 [INFO] [stdout] | [INFO] [stdout] 469 | matched = self.match_order(&mut tracker, order_price, &mut self.bids, &mut deferred_aons); [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[E0502]: cannot borrow `tracker` as mutable because it is also borrowed as immutable [INFO] [stdout] --> lib/order_book.rs:469:40 [INFO] [stdout] | [INFO] [stdout] 462 | let order = tracker.ptr(); [INFO] [stdout] | ------- immutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 469 | matched = self.match_order(&mut tracker, order_price, &mut self.bids, &mut deferred_aons); [INFO] [stdout] | ^^^^^^^^^^^^ mutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 475 | if order.is_buy() { [INFO] [stdout] | ----- immutable borrow later used here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `self.bids` as mutable more than once at a time [INFO] [stdout] --> lib/order_book.rs:469:67 [INFO] [stdout] | [INFO] [stdout] 469 | matched = self.match_order(&mut tracker, order_price, &mut self.bids, &mut deferred_aons); [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.bids` as mutable more than once at a time [INFO] [stdout] --> lib/order_book.rs:477:17 [INFO] [stdout] | [INFO] [stdout] 469 | matched = self.match_order(&mut tracker, order_price, &mut self.bids, &mut deferred_aons); [INFO] [stdout] | -------------- first mutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 477 | self.bids.insert(key, tracker); [INFO] [stdout] | ^^^^^^^^^ second mutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 480 | if self.check_deferred_aons(&mut deferred_aons, &mut self.asks, &mut self.bids) { [INFO] [stdout] | ------------------ first borrow later used here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> lib/order_book.rs:480:20 [INFO] [stdout] | [INFO] [stdout] 467 | matched = self.match_order(&mut tracker, order_price, &mut self.asks, &mut deferred_aons); [INFO] [stdout] | -------------- first mutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 480 | if self.check_deferred_aons(&mut deferred_aons, &mut self.asks, &mut self.bids) { [INFO] [stdout] | ^^^^ ------------------ first borrow later used here [INFO] [stdout] | | [INFO] [stdout] | second mutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `self.asks` as mutable more than once at a time [INFO] [stdout] --> lib/order_book.rs:480:65 [INFO] [stdout] | [INFO] [stdout] 467 | matched = self.match_order(&mut tracker, order_price, &mut self.asks, &mut deferred_aons); [INFO] [stdout] | -------------- first mutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 480 | if self.check_deferred_aons(&mut deferred_aons, &mut self.asks, &mut self.bids) { [INFO] [stdout] | ------------------- ^^^^^^^^^^^^^^ second mutable borrow occurs here [INFO] [stdout] | | [INFO] [stdout] | first borrow later used by call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `self.bids` as mutable more than once at a time [INFO] [stdout] --> lib/order_book.rs:480:81 [INFO] [stdout] | [INFO] [stdout] 480 | if self.check_deferred_aons(&mut deferred_aons, &mut self.asks, &mut self.bids) { [INFO] [stdout] | ---- ------------------- first borrow later used by call ^^^^^^^^^^^^^^ second mutable borrow occurs here [INFO] [stdout] | | [INFO] [stdout] | first mutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `self.asks` as mutable more than once at a time [INFO] [stdout] --> lib/order_book.rs:485:17 [INFO] [stdout] | [INFO] [stdout] 467 | matched = self.match_order(&mut tracker, order_price, &mut self.asks, &mut deferred_aons); [INFO] [stdout] | -------------- first mutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 485 | self.asks.insert(key, tracker); [INFO] [stdout] | ^^^^^^^^^ second mutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 488 | if self.check_deferred_aons(&mut deferred_aons, &mut self.bids, &mut self.asks) { [INFO] [stdout] | ------------------ first borrow later used here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*self` as mutable more than once at a time [INFO] [stdout] --> lib/order_book.rs:488:20 [INFO] [stdout] | [INFO] [stdout] 467 | matched = self.match_order(&mut tracker, order_price, &mut self.asks, &mut deferred_aons); [INFO] [stdout] | -------------- first mutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 488 | if self.check_deferred_aons(&mut deferred_aons, &mut self.bids, &mut self.asks) { [INFO] [stdout] | ^^^^ ------------------ first borrow later used here [INFO] [stdout] | | [INFO] [stdout] | second mutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `self.bids` as mutable more than once at a time [INFO] [stdout] --> lib/order_book.rs:488:65 [INFO] [stdout] | [INFO] [stdout] 488 | if self.check_deferred_aons(&mut deferred_aons, &mut self.bids, &mut self.asks) { [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.asks` as mutable more than once at a time [INFO] [stdout] --> lib/order_book.rs:488:81 [INFO] [stdout] | [INFO] [stdout] 467 | matched = self.match_order(&mut tracker, order_price, &mut self.asks, &mut deferred_aons); [INFO] [stdout] | -------------- first mutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 488 | if self.check_deferred_aons(&mut deferred_aons, &mut self.bids, &mut self.asks) { [INFO] [stdout] | ------------------- first borrow later used by call ^^^^^^^^^^^^^^ second mutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*market_trackers` as mutable more than once at a time [INFO] [stdout] --> lib/order_book.rs:512:79 [INFO] [stdout] | [INFO] [stdout] 512 | let matched = self.match_order(&mut tracker_clone, current_price, market_trackers, &mut ignored_aons); [INFO] [stdout] | ^^^^^^^^^^^^^^^ ----------------- first borrow used here, in later iteration of loop [INFO] [stdout] | | [INFO] [stdout] | `*market_trackers` was mutably borrowed here in the previous iteration of the loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0502]: cannot borrow `*self` as mutable because it is also borrowed as immutable [INFO] [stdout] --> lib/order_book.rs:890:17 [INFO] [stdout] | [INFO] [stdout] 889 | for callback in &self.working_callbacks { [INFO] [stdout] | ----------------------- [INFO] [stdout] | | [INFO] [stdout] | immutable borrow occurs here [INFO] [stdout] | immutable borrow later used here [INFO] [stdout] 890 | self.process_callback(callback); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ mutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0502]: cannot borrow `*self` as immutable because it is also borrowed as mutable [INFO] [stdout] --> lib/order_book.rs:920:39 [INFO] [stdout] | [INFO] [stdout] 919 | if let Some(listener) = &mut self.trade_listener { [INFO] [stdout] | ------------------------ mutable borrow occurs here [INFO] [stdout] 920 | listener.on_trade(self, callback.quantity, callback.price); [INFO] [stdout] | -------- ^^^^ immutable borrow occurs here [INFO] [stdout] | | [INFO] [stdout] | mutable borrow later used by call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0596]: cannot borrow `**listener` as mutable, as it is behind a `&` reference [INFO] [stdout] --> lib/order_book.rs:1041:21 [INFO] [stdout] | [INFO] [stdout] 1040 | if let Some(listener) = self.order_book_listener.borrow().as_ref() { [INFO] [stdout] | -------- consider changing this binding's type to be: `&mut Box>` [INFO] [stdout] 1041 | listener.on_order_book_change(self); [INFO] [stdout] | ^^^^^^^^ `listener` is a `&` reference, so the data it refers to cannot be borrowed as mutable [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0502]: cannot borrow `*self` as mutable because it is also borrowed as immutable [INFO] [stdout] --> lib/order_book.rs:890:17 [INFO] [stdout] | [INFO] [stdout] 889 | for callback in &self.working_callbacks { [INFO] [stdout] | ----------------------- [INFO] [stdout] | | [INFO] [stdout] | immutable borrow occurs here [INFO] [stdout] | immutable borrow later used here [INFO] [stdout] 890 | self.process_callback(callback); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ mutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `rust-engine` (lib) due to 75 previous errors [INFO] [stdout] Some errors have detailed explanations: E0252, E0277, E0308, E0369, E0382, E0428, E0499, E0502, E0583... [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0252`. [INFO] [stdout] [INFO] running `Command { std: "docker" "inspect" "7527b429c70b49720bd0a6e1025e48adcd694c16ef02738a33ed52e10ce8c7f2", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "7527b429c70b49720bd0a6e1025e48adcd694c16ef02738a33ed52e10ce8c7f2", kill_on_drop: false }` [INFO] [stdout] 7527b429c70b49720bd0a6e1025e48adcd694c16ef02738a33ed52e10ce8c7f2