7 lines
9.6 KiB
Plaintext
7 lines
9.6 KiB
Plaintext
{"$message_type":"diagnostic","message":"cannot find type `SharesClient` in this scope","code":{"code":"E0412","explanation":"A used type name is not in scope.\n\nErroneous code examples:\n\n```compile_fail,E0412\nimpl Something {} // error: type name `Something` is not in scope\n\n// or:\n\ntrait Foo {\n fn bar(N); // error: type name `N` is not in scope\n}\n\n// or:\n\nfn foo(x: T) {} // type name `T` is not in scope\n```\n\nTo fix this error, please verify you didn't misspell the type name, you did\ndeclare it or imported it into the scope. Examples:\n\n```\nstruct Something;\n\nimpl Something {} // ok!\n\n// or:\n\ntrait Foo {\n type N;\n\n fn bar(_: Self::N); // ok!\n}\n\n// or:\n\nfn foo<T>(x: T) {} // ok!\n```\n\nAnother case that causes this error is when a type is imported into a parent\nmodule. To fix this, you can follow the suggestion and use File directly or\n`use super::File;` which will import the types from the parent namespace. An\nexample that causes this error is below:\n\n```compile_fail,E0412\nuse std::fs::File;\n\nmod foo {\n fn some_function(f: File) {}\n}\n```\n\n```\nuse std::fs::File;\n\nmod foo {\n // either\n use super::File;\n // or\n // use std::fs::File;\n fn foo(f: File) {}\n}\n# fn main() {} // don't insert it for us; that'll break imports\n```\n"},"level":"error","spans":[{"file_name":"shares/src/lib.rs","byte_start":696,"byte_end":711,"line_start":32,"line_end":32,"column_start":1,"column_end":16,"is_primary":true,"text":[{"text":"#[contractimpl]","highlight_start":1,"highlight_end":16}],"label":"not found in this scope","suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"shares/src/lib.rs","byte_start":696,"byte_end":711,"line_start":32,"line_end":32,"column_start":1,"column_end":16,"is_primary":false,"text":[{"text":"#[contractimpl]","highlight_start":1,"highlight_end":16}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"#[soroban_sdk::contractclient]","def_site_span":{"file_name":"/Users/emirhancavusoglu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/soroban-sdk-macros-20.5.0/src/lib.rs","byte_start":17088,"byte_end":17167,"line_start":554,"line_end":554,"column_start":1,"column_end":80,"is_primary":false,"text":[{"text":"pub fn contractclient(metadata: TokenStream, input: TokenStream) -> TokenStream {","highlight_start":1,"highlight_end":80}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}}],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror[E0412]\u001b[0m\u001b[0m\u001b[1m: cannot find type `SharesClient` in this scope\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0mshares/src/lib.rs:32:1\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m32\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m#[contractimpl]\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9m^^^^^^^^^^^^^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9mnot found in this scope\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: this error originates in the attribute macro `soroban_sdk::contractclient` (in Nightly builds, run with -Z macro-backtrace for more info)\u001b[0m\n\n"}
|
|
{"$message_type":"diagnostic","message":"unused import: `vec`","code":{"code":"unused_imports","explanation":null},"level":"warning","spans":[{"file_name":"shares/src/lib.rs","byte_start":86,"byte_end":89,"line_start":2,"line_end":2,"column_start":76,"column_end":79,"is_primary":true,"text":[{"text":"use soroban_sdk::{contractimpl, contracttype, contracterror, symbol_short, vec, Env, Address, Vec, Map};","highlight_start":76,"highlight_end":79}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(unused_imports)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"remove the unused import","code":null,"level":"help","spans":[{"file_name":"shares/src/lib.rs","byte_start":84,"byte_end":89,"line_start":2,"line_end":2,"column_start":74,"column_end":79,"is_primary":true,"text":[{"text":"use soroban_sdk::{contractimpl, contracttype, contracterror, symbol_short, vec, Env, Address, Vec, Map};","highlight_start":74,"highlight_end":79}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: unused import: `vec`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0mshares/src/lib.rs:2:76\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m2\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0muse soroban_sdk::{contractimpl, contracttype, contracterror, symbol_short, vec, Env, Address, Vec, Map};\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: `#[warn(unused_imports)]` on by default\u001b[0m\n\n"}
|
|
{"$message_type":"diagnostic","message":"failed to resolve: use of undeclared crate or module `__Shares_fn_set_registry`","code":{"code":"E0433","explanation":"An undeclared crate, module, or type was used.\n\nErroneous code example:\n\n```compile_fail,E0433\nlet map = HashMap::new();\n// error: failed to resolve: use of undeclared type `HashMap`\n```\n\nPlease verify you didn't misspell the type/module's name or that you didn't\nforget to import it:\n\n```\nuse std::collections::HashMap; // HashMap has been imported.\nlet map: HashMap<u32, u32> = HashMap::new(); // So it can be used!\n```\n\nIf you've expected to use a crate name:\n\n```compile_fail\nuse ferris_wheel::BigO;\n// error: failed to resolve: use of undeclared crate or module `ferris_wheel`\n```\n\nMake sure the crate has been added as a dependency in `Cargo.toml`.\n\nTo use a module from your current crate, add the `crate::` prefix to the path.\n"},"level":"error","spans":[{"file_name":"shares/src/lib.rs","byte_start":696,"byte_end":711,"line_start":32,"line_end":32,"column_start":1,"column_end":16,"is_primary":true,"text":[{"text":"#[contractimpl]","highlight_start":1,"highlight_end":16}],"label":"use of undeclared crate or module `__Shares_fn_set_registry`","suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"shares/src/lib.rs","byte_start":696,"byte_end":711,"line_start":32,"line_end":32,"column_start":1,"column_end":16,"is_primary":false,"text":[{"text":"#[contractimpl]","highlight_start":1,"highlight_end":16}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"#[contractimpl]","def_site_span":{"file_name":"/Users/emirhancavusoglu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/soroban-sdk-macros-20.5.0/src/lib.rs","byte_start":5863,"byte_end":5940,"line_start":197,"line_end":197,"column_start":1,"column_end":78,"is_primary":false,"text":[{"text":"pub fn contractimpl(metadata: TokenStream, input: TokenStream) -> TokenStream {","highlight_start":1,"highlight_end":78}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}}],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror[E0433]\u001b[0m\u001b[0m\u001b[1m: failed to resolve: use of undeclared crate or module `__Shares_fn_set_registry`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0mshares/src/lib.rs:32:1\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m32\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m#[contractimpl]\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9m^^^^^^^^^^^^^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9muse of undeclared crate or module `__Shares_fn_set_registry`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: this error originates in the attribute macro `contractimpl` (in Nightly builds, run with -Z macro-backtrace for more info)\u001b[0m\n\n"}
|
|
{"$message_type":"diagnostic","message":"aborting due to 2 previous errors; 1 warning emitted","code":null,"level":"error","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror\u001b[0m\u001b[0m\u001b[1m: aborting due to 2 previous errors; 1 warning emitted\u001b[0m\n\n"}
|
|
{"$message_type":"diagnostic","message":"Some errors have detailed explanations: E0412, E0433.","code":null,"level":"failure-note","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1mSome errors have detailed explanations: E0412, E0433.\u001b[0m\n"}
|
|
{"$message_type":"diagnostic","message":"For more information about an error, try `rustc --explain E0412`.","code":null,"level":"failure-note","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1mFor more information about an error, try `rustc --explain E0412`.\u001b[0m\n"}
|