[INFO] cloning repository https://github.com/lalamariposa/ICP-Final-Project [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/lalamariposa/ICP-Final-Project" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Flalamariposa%2FICP-Final-Project", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Flalamariposa%2FICP-Final-Project'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 0b10085236b5b3ba4e33b2d2d1b1859524e7c717 [INFO] checking lalamariposa/ICP-Final-Project/0b10085236b5b3ba4e33b2d2d1b1859524e7c717 against master#9f48dedc9763334a587c66558974635807a113ed for pr-137394 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Flalamariposa%2FICP-Final-Project" "/workspace/builds/worker-4-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-4-tc1/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/lalamariposa/ICP-Final-Project on toolchain 9f48dedc9763334a587c66558974635807a113ed [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+9f48dedc9763334a587c66558974635807a113ed" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/lalamariposa/ICP-Final-Project [INFO] finished tweaking git repo https://github.com/lalamariposa/ICP-Final-Project [INFO] tweaked toml for git repo https://github.com/lalamariposa/ICP-Final-Project written to /workspace/builds/worker-4-tc1/source/Cargo.toml [INFO] crate git repo https://github.com/lalamariposa/ICP-Final-Project 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" "+9f48dedc9763334a587c66558974635807a113ed" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] warning: virtual workspace defaulting to `resolver = "1"` despite one or more workspace members being on edition 2021 which implies `resolver = "2"` [INFO] [stderr] note: to keep the current resolver, specify `workspace.resolver = "1"` in the workspace root's manifest [INFO] [stderr] note: to use the edition 2021 resolver, specify `workspace.resolver = "2"` in the workspace root's manifest [INFO] [stderr] note: for more details see https://doc.rust-lang.org/cargo/reference/resolver.html#resolver-versions [INFO] [stderr] Updating crates.io index [INFO] [stderr] Locking 1 package to latest compatible version [INFO] [stderr] Adding ic-stable-structures v0.5.6 (available: v0.6.7) [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded rustix v0.38.9 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-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:3959728d45483eb673ba100a951a6b9f5012970368db2a9e08e0ac9b67c8a5ad" "/opt/rustwide/cargo-home/bin/cargo" "+9f48dedc9763334a587c66558974635807a113ed" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 6459486cbbfe07159cd8a5c05497f21c70899aac28f3a0b73cee892b772d9bf9 [INFO] running `Command { std: "docker" "start" "-a" "6459486cbbfe07159cd8a5c05497f21c70899aac28f3a0b73cee892b772d9bf9", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "6459486cbbfe07159cd8a5c05497f21c70899aac28f3a0b73cee892b772d9bf9", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "6459486cbbfe07159cd8a5c05497f21c70899aac28f3a0b73cee892b772d9bf9", kill_on_drop: false }` [INFO] [stdout] 6459486cbbfe07159cd8a5c05497f21c70899aac28f3a0b73cee892b772d9bf9 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-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:3959728d45483eb673ba100a951a6b9f5012970368db2a9e08e0ac9b67c8a5ad" "/opt/rustwide/cargo-home/bin/cargo" "+9f48dedc9763334a587c66558974635807a113ed" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 769fef929c56981554cacfd65ca30efac75e2490119e6957a7a516f59b82d33b [INFO] running `Command { std: "docker" "start" "-a" "769fef929c56981554cacfd65ca30efac75e2490119e6957a7a516f59b82d33b", kill_on_drop: false }` [INFO] [stderr] warning: virtual workspace defaulting to `resolver = "1"` despite one or more workspace members being on edition 2021 which implies `resolver = "2"` [INFO] [stderr] note: to keep the current resolver, specify `workspace.resolver = "1"` in the workspace root's manifest [INFO] [stderr] note: to use the edition 2021 resolver, specify `workspace.resolver = "2"` in the workspace root's manifest [INFO] [stderr] note: for more details see https://doc.rust-lang.org/cargo/reference/resolver.html#resolver-versions [INFO] [stderr] Compiling proc-macro2 v1.0.66 [INFO] [stderr] Compiling unicode-ident v1.0.11 [INFO] [stderr] Compiling autocfg v1.1.0 [INFO] [stderr] Compiling memchr v2.5.0 [INFO] [stderr] Compiling version_check v0.9.4 [INFO] [stderr] Compiling typenum v1.16.0 [INFO] [stderr] Compiling syn v1.0.109 [INFO] [stderr] Compiling libc v0.2.147 [INFO] [stderr] Compiling cfg-if v1.0.0 [INFO] [stderr] Compiling hashbrown v0.14.0 [INFO] [stderr] Compiling equivalent v1.0.1 [INFO] [stderr] Compiling serde v1.0.188 [INFO] [stderr] Compiling once_cell v1.18.0 [INFO] [stderr] Compiling lock_api v0.4.10 [INFO] [stderr] Compiling generic-array v0.14.7 [INFO] [stderr] Compiling quote v1.0.33 [INFO] [stderr] Compiling num-traits v0.2.16 [INFO] [stderr] Compiling parking_lot_core v0.9.8 [INFO] [stderr] Compiling either v1.9.0 [INFO] [stderr] Compiling syn v2.0.29 [INFO] [stderr] Compiling indexmap v2.0.0 [INFO] [stderr] Compiling regex-syntax v0.7.4 [INFO] [stderr] Compiling scopeguard v1.2.0 [INFO] [stderr] Compiling aho-corasick v1.0.4 [INFO] [stderr] Compiling rustix v0.38.9 [INFO] [stderr] Compiling regex-syntax v0.6.29 [INFO] [stderr] Compiling crunchy v0.2.2 [INFO] [stderr] Compiling smallvec v1.11.0 [INFO] [stderr] Compiling dirs-sys-next v0.1.2 [INFO] [stderr] Compiling num-integer v0.1.45 [INFO] [stderr] Compiling dirs-next v2.0.0 [INFO] [stderr] Compiling bitflags v2.4.0 [INFO] [stderr] Compiling linux-raw-sys v0.4.5 [INFO] [stderr] Compiling tiny-keccak v2.0.2 [INFO] [stderr] Compiling winnow v0.5.15 [INFO] [stderr] Compiling toml_datetime v0.6.3 [INFO] [stderr] Compiling siphasher v0.3.11 [INFO] [stderr] Compiling phf_shared v0.10.0 [INFO] [stderr] Compiling term v0.7.0 [INFO] [stderr] Compiling parking_lot v0.12.1 [INFO] [stderr] Compiling log v0.4.20 [INFO] [stderr] Compiling bit-vec v0.6.3 [INFO] [stderr] Compiling precomputed-hash v0.1.1 [INFO] [stderr] Compiling rustversion v1.0.14 [INFO] [stderr] Compiling toml_edit v0.19.14 [INFO] [stderr] Compiling regex-automata v0.3.6 [INFO] [stderr] Compiling new_debug_unreachable v1.0.4 [INFO] [stderr] Compiling fixedbitset v0.4.2 [INFO] [stderr] Compiling string_cache v0.8.7 [INFO] [stderr] Compiling petgraph v0.6.4 [INFO] [stderr] Compiling bit-set v0.5.3 [INFO] [stderr] Compiling ena v0.14.2 [INFO] [stderr] Compiling serde_derive v1.0.188 [INFO] [stderr] Compiling is-terminal v0.4.9 [INFO] [stderr] Compiling ascii-canvas v3.0.0 [INFO] [stderr] Compiling itertools v0.10.5 [INFO] [stderr] Compiling num-bigint v0.4.4 [INFO] [stderr] Compiling beef v0.5.2 [INFO] [stderr] Compiling thiserror v1.0.47 [INFO] [stderr] Compiling fnv v1.0.7 [INFO] [stderr] Compiling anyhow v1.0.75 [INFO] [stderr] Compiling diff v0.1.13 [INFO] [stderr] Compiling unicode-xid v0.2.4 [INFO] [stderr] Compiling crc32fast v1.3.2 [INFO] [stderr] Compiling proc-macro-crate v1.3.1 [INFO] [stderr] Compiling thiserror-impl v1.0.47 [INFO] [stderr] Compiling paste v1.0.14 [INFO] [stderr] Compiling lazy_static v1.4.0 [INFO] [stderr] Compiling futures-core v0.3.28 [INFO] [stderr] Compiling block-buffer v0.10.4 [INFO] [stderr] Compiling crypto-common v0.1.6 [INFO] [stderr] Compiling slab v0.4.9 [INFO] [stderr] Compiling futures-task v0.3.28 [INFO] [stderr] Compiling regex v1.9.3 [INFO] [stderr] Compiling futures-channel v0.3.28 [INFO] [stderr] Compiling lalrpop-util v0.19.12 [INFO] [stderr] Compiling lalrpop v0.19.12 [INFO] [stderr] Compiling digest v0.10.7 [INFO] [stderr] Compiling typed-arena v2.0.2 [INFO] [stderr] Compiling termcolor v1.2.0 [INFO] [stderr] Compiling num_enum_derive v0.5.11 [INFO] [stderr] Compiling logos-derive v0.12.1 [INFO] [stderr] Compiling binread_derive v2.1.0 [INFO] [stderr] Compiling candid_derive v0.5.0 [INFO] [stderr] Compiling arrayvec v0.5.2 [INFO] [stderr] Checking futures-sink v0.3.28 [INFO] [stderr] Compiling futures-util v0.3.28 [INFO] [stderr] Compiling cpufeatures v0.2.9 [INFO] [stderr] Compiling unicode-width v0.1.10 [INFO] [stderr] Compiling codespan-reporting v0.11.1 [INFO] [stderr] Compiling sha2 v0.10.7 [INFO] [stderr] Compiling pretty v0.10.0 [INFO] [stderr] Compiling num_enum v0.5.11 [INFO] [stderr] Compiling logos v0.12.1 [INFO] [stderr] Compiling binread v2.2.0 [INFO] [stderr] Compiling futures-macro v0.3.28 [INFO] [stderr] Compiling hex v0.4.3 [INFO] [stderr] Compiling byteorder v1.4.3 [INFO] [stderr] Compiling data-encoding v2.4.0 [INFO] [stderr] Compiling serde_bytes v0.11.12 [INFO] [stderr] Compiling leb128 v0.2.5 [INFO] [stderr] Checking futures-io v0.3.28 [INFO] [stderr] Checking pin-project-lite v0.2.13 [INFO] [stderr] Checking pin-utils v0.1.0 [INFO] [stderr] Compiling serde_tokenstream v0.1.7 [INFO] [stderr] Compiling slotmap v1.0.6 [INFO] [stderr] Checking ic0 v0.18.11 [INFO] [stderr] Compiling serde_json v1.0.105 [INFO] [stderr] Checking itoa v1.0.9 [INFO] [stderr] Checking ryu v1.0.15 [INFO] [stderr] Checking ic-stable-structures v0.5.6 [INFO] [stderr] Checking futures-executor v0.3.28 [INFO] [stderr] Checking futures v0.3.28 [INFO] [stderr] Compiling candid v0.8.4 [INFO] [stderr] Compiling ic-cdk-macros v0.6.10 [INFO] [stderr] Checking ic-cdk v0.7.4 [INFO] [stderr] Checking ic-cdk-timers v0.1.2 [INFO] [stderr] Checking ICP_final_project_backend v0.1.0 (/opt/rustwide/workdir/src/ICP_final_project_backend) [INFO] [stdout] error[E0252]: the name `Principal` is defined multiple times [INFO] [stdout] --> src/ICP_final_project_backend/src/lib.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 5 | use candid::Principal; [INFO] [stdout] | ----------------- previous import of the type `Principal` here [INFO] [stdout] 6 | use candid::types::Type::Principal; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Principal` reimported here [INFO] [stdout] | [INFO] [stdout] = note: `Principal` 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] 6 | use candid::types::Type::Principal as OtherPrincipal; [INFO] [stdout] | +++++++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0106]: missing lifetime specifier [INFO] [stdout] --> src/ICP_final_project_backend/src/lib.rs:83:31 [INFO] [stdout] | [INFO] [stdout] 83 | fn get_list_of_items() -> Vec<&Item> { [INFO] [stdout] | ^ expected named lifetime parameter [INFO] [stdout] | [INFO] [stdout] = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from [INFO] [stdout] help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static` [INFO] [stdout] | [INFO] [stdout] 83 | fn get_list_of_items() -> Vec<&'static Item> { [INFO] [stdout] | +++++++ [INFO] [stdout] help: instead, you are more likely to want to return an owned value [INFO] [stdout] | [INFO] [stdout] 83 - fn get_list_of_items() -> Vec<&Item> { [INFO] [stdout] 83 + fn get_list_of_items() -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0412]: cannot find type `LocalKey` in this scope [INFO] [stdout] --> src/ICP_final_project_backend/src/lib.rs:63:6 [INFO] [stdout] | [INFO] [stdout] 63 | impl LocalKey { [INFO] [stdout] | ^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] help: consider importing this struct [INFO] [stdout] | [INFO] [stdout] 1 + use std::thread::LocalKey; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0412]: cannot find type `Iter` in this scope [INFO] [stdout] --> src/ICP_final_project_backend/src/lib.rs:64:27 [INFO] [stdout] | [INFO] [stdout] 22 | struct Item { [INFO] [stdout] | ----------- similarly named struct `Item` defined here [INFO] [stdout] ... [INFO] [stdout] 64 | pub fn iter(&self) -> Iter { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] help: a struct with a similar name exists [INFO] [stdout] | [INFO] [stdout] 64 - pub fn iter(&self) -> Iter { [INFO] [stdout] 64 + pub fn iter(&self) -> Item { [INFO] [stdout] | [INFO] [stdout] help: consider importing one of these structs [INFO] [stdout] | [INFO] [stdout] 1 + use std::collections::binary_heap::Iter; [INFO] [stdout] | [INFO] [stdout] 1 + use std::collections::btree_map::Iter; [INFO] [stdout] | [INFO] [stdout] 1 + use std::collections::btree_set::Iter; [INFO] [stdout] | [INFO] [stdout] 1 + use std::collections::hash_map::Iter; [INFO] [stdout] | [INFO] [stdout] and 15 other candidates [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0252]: the name `Principal` is defined multiple times [INFO] [stdout] --> src/ICP_final_project_backend/src/lib.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 5 | use candid::Principal; [INFO] [stdout] | ----------------- previous import of the type `Principal` here [INFO] [stdout] 6 | use candid::types::Type::Principal; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Principal` reimported here [INFO] [stdout] | [INFO] [stdout] = note: `Principal` 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] 6 | use candid::types::Type::Principal as OtherPrincipal; [INFO] [stdout] | +++++++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `borrow_mut` found for struct `LocalKey` in the current scope [INFO] [stdout] --> src/ICP_final_project_backend/src/lib.rs:87:29 [INFO] [stdout] | [INFO] [stdout] 87 | let item_map = ITEM_MAP.borrow_mut(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] --> /rustc/9f48dedc9763334a587c66558974635807a113ed/library/core/src/borrow.rs:205:8 [INFO] [stdout] | [INFO] [stdout] = note: the method is available for `LocalKey>>>>>>` here [INFO] [stdout] | [INFO] [stdout] = help: use `with` or `try_with` to access thread local storage [INFO] [stdout] note: the method `borrow_mut` exists on the type `RefCell>>>>>` [INFO] [stdout] --> /rustc/9f48dedc9763334a587c66558974635807a113ed/library/core/src/cell.rs:1089:5 [INFO] [stdout] = help: items from traits can only be used if the trait is in scope [INFO] [stdout] help: trait `BorrowMut` which provides `borrow_mut` is implemented but not in scope; perhaps you want to import it [INFO] [stdout] | [INFO] [stdout] 1 + use std::borrow::BorrowMut; [INFO] [stdout] | [INFO] [stdout] help: there is a method `borrow` with a similar name [INFO] [stdout] | [INFO] [stdout] 87 - let item_map = ITEM_MAP.borrow_mut(); [INFO] [stdout] 87 + let item_map = ITEM_MAP.borrow(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `iter` found for struct `LocalKey` in the current scope [INFO] [stdout] --> src/ICP_final_project_backend/src/lib.rs:94:14 [INFO] [stdout] | [INFO] [stdout] 94 | ITEM_MAP.iter() [INFO] [stdout] | ^^^^ method not found in `LocalKey>>>>>>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `iter` found for struct `LocalKey` in the current scope [INFO] [stdout] --> src/ICP_final_project_backend/src/lib.rs:101:14 [INFO] [stdout] | [INFO] [stdout] 101 | ITEM_MAP.iter() [INFO] [stdout] | ^^^^ method not found in `LocalKey>>>>>>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/ICP_final_project_backend/src/lib.rs:111:31 [INFO] [stdout] | [INFO] [stdout] 111 | currentHighestBidder: Principal, //candid:: [INFO] [stdout] | ^^^^^^^^^ expected `Principal`, found `Type` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/ICP_final_project_backend/src/lib.rs:178:37 [INFO] [stdout] | [INFO] [stdout] 178 | item.currentHighestBidder = Principal; //candid:: [INFO] [stdout] | ------------------------- ^^^^^^^^^ expected `Principal`, found `Type` [INFO] [stdout] | | [INFO] [stdout] | expected due to the type of this binding [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: `match` arms have incompatible types [INFO] [stdout] --> src/ICP_final_project_backend/src/lib.rs:198:21 [INFO] [stdout] | [INFO] [stdout] 196 | let mut item = match item_opt { [INFO] [stdout] | ________________________- [INFO] [stdout] 197 | | Some(value) => value, [INFO] [stdout] | | ----- this is found to be of type `Item` [INFO] [stdout] 198 | | None => Err(BidError::NoSuchItem), [INFO] [stdout] | | ^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Item`, found `Result<_, BidError>` [INFO] [stdout] 199 | | }; [INFO] [stdout] | |_________- `match` arms have incompatible types [INFO] [stdout] | [INFO] [stdout] = note: expected struct `Item` [INFO] [stdout] found enum `Result<_, BidError>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0106]: missing lifetime specifier [INFO] [stdout] --> src/ICP_final_project_backend/src/lib.rs:83:31 [INFO] [stdout] | [INFO] [stdout] 83 | fn get_list_of_items() -> Vec<&Item> { [INFO] [stdout] | ^ expected named lifetime parameter [INFO] [stdout] | [INFO] [stdout] = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from [INFO] [stdout] help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static` [INFO] [stdout] | [INFO] [stdout] 83 | fn get_list_of_items() -> Vec<&'static Item> { [INFO] [stdout] | +++++++ [INFO] [stdout] help: instead, you are more likely to want to return an owned value [INFO] [stdout] | [INFO] [stdout] 83 - fn get_list_of_items() -> Vec<&Item> { [INFO] [stdout] 83 + fn get_list_of_items() -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0412]: cannot find type `LocalKey` in this scope [INFO] [stdout] --> src/ICP_final_project_backend/src/lib.rs:63:6 [INFO] [stdout] | [INFO] [stdout] 63 | impl LocalKey { [INFO] [stdout] | ^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] help: consider importing this struct [INFO] [stdout] | [INFO] [stdout] 1 + use std::thread::LocalKey; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0412]: cannot find type `Iter` in this scope [INFO] [stdout] --> src/ICP_final_project_backend/src/lib.rs:64:27 [INFO] [stdout] | [INFO] [stdout] 22 | struct Item { [INFO] [stdout] | ----------- similarly named struct `Item` defined here [INFO] [stdout] ... [INFO] [stdout] 64 | pub fn iter(&self) -> Iter { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] help: a struct with a similar name exists [INFO] [stdout] | [INFO] [stdout] 64 - pub fn iter(&self) -> Iter { [INFO] [stdout] 64 + pub fn iter(&self) -> Item { [INFO] [stdout] | [INFO] [stdout] help: consider importing one of these structs [INFO] [stdout] | [INFO] [stdout] 1 + use std::collections::binary_heap::Iter; [INFO] [stdout] | [INFO] [stdout] 1 + use std::collections::btree_map::Iter; [INFO] [stdout] | [INFO] [stdout] 1 + use std::collections::btree_set::Iter; [INFO] [stdout] | [INFO] [stdout] 1 + use std::collections::hash_map::Iter; [INFO] [stdout] | [INFO] [stdout] and 15 other candidates [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0596]: cannot borrow data in dereference of `Ref<'_, StableBTreeMap>>>>>` as mutable [INFO] [stdout] --> src/ICP_final_project_backend/src/lib.rs:148:19 [INFO] [stdout] | [INFO] [stdout] 148 | let res = p.borrow().insert(key, value); [INFO] [stdout] | ^^^^^^^^^^ cannot borrow as mutable [INFO] [stdout] | [INFO] [stdout] = help: trait `DerefMut` is required to modify through a dereference, but it is not implemented for `Ref<'_, StableBTreeMap>>>>>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0106, E0252, E0308, E0412, E0596, E0599. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0106`. [INFO] [stdout] [INFO] [stderr] error: could not compile `ICP_final_project_backend` (lib test) due to 11 previous errors [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stdout] error[E0599]: no method named `borrow_mut` found for struct `LocalKey` in the current scope [INFO] [stdout] --> src/ICP_final_project_backend/src/lib.rs:87:29 [INFO] [stdout] | [INFO] [stdout] 87 | let item_map = ITEM_MAP.borrow_mut(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] --> /rustc/9f48dedc9763334a587c66558974635807a113ed/library/core/src/borrow.rs:205:8 [INFO] [stdout] | [INFO] [stdout] = note: the method is available for `LocalKey>>>>>>` here [INFO] [stdout] | [INFO] [stdout] = help: use `with` or `try_with` to access thread local storage [INFO] [stdout] note: the method `borrow_mut` exists on the type `RefCell>>>>>` [INFO] [stdout] --> /rustc/9f48dedc9763334a587c66558974635807a113ed/library/core/src/cell.rs:1089:5 [INFO] [stdout] = help: items from traits can only be used if the trait is in scope [INFO] [stdout] help: trait `BorrowMut` which provides `borrow_mut` is implemented but not in scope; perhaps you want to import it [INFO] [stdout] | [INFO] [stdout] 1 + use std::borrow::BorrowMut; [INFO] [stdout] | [INFO] [stdout] help: there is a method `borrow` with a similar name [INFO] [stdout] | [INFO] [stdout] 87 - let item_map = ITEM_MAP.borrow_mut(); [INFO] [stdout] 87 + let item_map = ITEM_MAP.borrow(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `iter` found for struct `LocalKey` in the current scope [INFO] [stdout] --> src/ICP_final_project_backend/src/lib.rs:94:14 [INFO] [stdout] | [INFO] [stdout] 94 | ITEM_MAP.iter() [INFO] [stdout] | ^^^^ method not found in `LocalKey>>>>>>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `iter` found for struct `LocalKey` in the current scope [INFO] [stdout] --> src/ICP_final_project_backend/src/lib.rs:101:14 [INFO] [stdout] | [INFO] [stdout] 101 | ITEM_MAP.iter() [INFO] [stdout] | ^^^^ method not found in `LocalKey>>>>>>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/ICP_final_project_backend/src/lib.rs:111:31 [INFO] [stdout] | [INFO] [stdout] 111 | currentHighestBidder: Principal, //candid:: [INFO] [stdout] | ^^^^^^^^^ expected `Principal`, found `Type` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/ICP_final_project_backend/src/lib.rs:178:37 [INFO] [stdout] | [INFO] [stdout] 178 | item.currentHighestBidder = Principal; //candid:: [INFO] [stdout] | ------------------------- ^^^^^^^^^ expected `Principal`, found `Type` [INFO] [stdout] | | [INFO] [stdout] | expected due to the type of this binding [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: `match` arms have incompatible types [INFO] [stdout] --> src/ICP_final_project_backend/src/lib.rs:198:21 [INFO] [stdout] | [INFO] [stdout] 196 | let mut item = match item_opt { [INFO] [stdout] | ________________________- [INFO] [stdout] 197 | | Some(value) => value, [INFO] [stdout] | | ----- this is found to be of type `Item` [INFO] [stdout] 198 | | None => Err(BidError::NoSuchItem), [INFO] [stdout] | | ^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Item`, found `Result<_, BidError>` [INFO] [stdout] 199 | | }; [INFO] [stdout] | |_________- `match` arms have incompatible types [INFO] [stdout] | [INFO] [stdout] = note: expected struct `Item` [INFO] [stdout] found enum `Result<_, BidError>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0596]: cannot borrow data in dereference of `Ref<'_, StableBTreeMap>>>>>` as mutable [INFO] [stdout] --> src/ICP_final_project_backend/src/lib.rs:148:19 [INFO] [stdout] | [INFO] [stdout] 148 | let res = p.borrow().insert(key, value); [INFO] [stdout] | ^^^^^^^^^^ cannot borrow as mutable [INFO] [stdout] | [INFO] [stdout] = help: trait `DerefMut` is required to modify through a dereference, but it is not implemented for `Ref<'_, StableBTreeMap>>>>>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0106, E0252, E0308, E0412, E0596, E0599. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0106`. [INFO] [stdout] [INFO] [stderr] error: could not compile `ICP_final_project_backend` (lib) due to 11 previous errors [INFO] running `Command { std: "docker" "inspect" "769fef929c56981554cacfd65ca30efac75e2490119e6957a7a516f59b82d33b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "769fef929c56981554cacfd65ca30efac75e2490119e6957a7a516f59b82d33b", kill_on_drop: false }` [INFO] [stdout] 769fef929c56981554cacfd65ca30efac75e2490119e6957a7a516f59b82d33b