12 lines
38 KiB
Plaintext
Executable File
12 lines
38 KiB
Plaintext
Executable File
{"$message_type":"diagnostic","message":"prefix `section` is unknown","code":null,"level":"error","spans":[{"file_name":"src/lib.rs","byte_start":3843,"byte_end":3850,"line_start":149,"line_end":149,"column_start":41,"column_end":48,"is_primary":true,"text":[{"text":" <div class=\"meta\"><span class=\"pill section\">{section}</span>{programs}</div>","highlight_start":41,"highlight_end":48}],"label":"unknown prefix","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"prefixed identifiers and literals are reserved since Rust 2021","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"consider inserting whitespace here","code":null,"level":"help","spans":[{"file_name":"src/lib.rs","byte_start":3850,"byte_end":3850,"line_start":149,"line_end":149,"column_start":48,"column_end":48,"is_primary":true,"text":[{"text":" <div class=\"meta\"><span class=\"pill section\">{section}</span>{programs}</div>","highlight_start":48,"highlight_end":48}],"label":null,"suggested_replacement":" ","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror\u001b[0m\u001b[0m\u001b[1m: prefix `section` is unknown\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/lib.rs:149:41\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;12m149\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m <div class=\"meta\"><span class=\"pill section\">{section}</span>{programs}</div>\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[38;5;9m^^^^^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9munknown prefix\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: prefixed identifiers and literals are reserved since Rust 2021\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;14mhelp\u001b[0m\u001b[0m: consider inserting whitespace here\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;12m149\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m <div class=\"meta\"><span class=\"pill section\u001b[0m\u001b[0m\u001b[38;5;10m \u001b[0m\u001b[0m\">{section}</span>{programs}</div>\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[38;5;10m+\u001b[0m\n\n"}
|
|
{"$message_type":"diagnostic","message":"expected `,`, found `/`","code":null,"level":"error","spans":[{"file_name":"src/lib.rs","byte_start":3687,"byte_end":3688,"line_start":144,"line_end":144,"column_start":13,"column_end":14,"is_primary":true,"text":[{"text":" <a href=\"#/\" id=\"back\">← Back</a>","highlight_start":13,"highlight_end":14}],"label":"expected `,`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror\u001b[0m\u001b[0m\u001b[1m: expected `,`, found `/`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/lib.rs:144:13\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;12m144\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m <a href=\"#/\" id=\"back\">← Back</a>\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[38;5;9m^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9mexpected `,`\u001b[0m\n\n"}
|
|
{"$message_type":"diagnostic","message":"`?` couldn't convert the error to `wasm_bindgen::JsValue`","code":{"code":"E0277","explanation":"You tried to use a type which doesn't implement some trait in a place which\nexpected that trait.\n\nErroneous code example:\n\n```compile_fail,E0277\n// here we declare the Foo trait with a bar method\ntrait Foo {\n fn bar(&self);\n}\n\n// we now declare a function which takes an object implementing the Foo trait\nfn some_func<T: Foo>(foo: T) {\n foo.bar();\n}\n\nfn main() {\n // we now call the method with the i32 type, which doesn't implement\n // the Foo trait\n some_func(5i32); // error: the trait bound `i32 : Foo` is not satisfied\n}\n```\n\nIn order to fix this error, verify that the type you're using does implement\nthe trait. Example:\n\n```\ntrait Foo {\n fn bar(&self);\n}\n\n// we implement the trait on the i32 type\nimpl Foo for i32 {\n fn bar(&self) {}\n}\n\nfn some_func<T: Foo>(foo: T) {\n foo.bar(); // we can now use this method since i32 implements the\n // Foo trait\n}\n\nfn main() {\n some_func(5i32); // ok!\n}\n```\n\nOr in a generic context, an erroneous code example would look like:\n\n```compile_fail,E0277\nfn some_func<T>(foo: T) {\n println!(\"{:?}\", foo); // error: the trait `core::fmt::Debug` is not\n // implemented for the type `T`\n}\n\nfn main() {\n // We now call the method with the i32 type,\n // which *does* implement the Debug trait.\n some_func(5i32);\n}\n```\n\nNote that the error here is in the definition of the generic function. Although\nwe only call it with a parameter that does implement `Debug`, the compiler\nstill rejects the function. It must work with all possible input types. In\norder to make this example compile, we need to restrict the generic type we're\naccepting:\n\n```\nuse std::fmt;\n\n// Restrict the input type to types that implement Debug.\nfn some_func<T: fmt::Debug>(foo: T) {\n println!(\"{:?}\", foo);\n}\n\nfn main() {\n // Calling the method is still fine, as i32 implements Debug.\n some_func(5i32);\n\n // This would fail to compile now:\n // struct WithoutDebug;\n // some_func(WithoutDebug);\n}\n```\n\nRust only looks at the signature of the called function, as such it must\nalready specify all requirements that will be used for every type parameter.\n"},"level":"error","spans":[{"file_name":"src/lib.rs","byte_start":4226,"byte_end":4265,"line_start":166,"line_end":166,"column_start":16,"column_end":55,"is_primary":false,"text":[{"text":" let text = Request::get(\"index.json\").send().await?.text().await?;","highlight_start":16,"highlight_end":55}],"label":"this can't be annotated with `?` because it has type `Result<_, gloo_net::Error>`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/lib.rs","byte_start":4265,"byte_end":4266,"line_start":166,"line_end":166,"column_start":55,"column_end":56,"is_primary":true,"text":[{"text":" let text = Request::get(\"index.json\").send().await?.text().await?;","highlight_start":55,"highlight_end":56}],"label":"the trait `From<gloo_net::Error>` is not implemented for `wasm_bindgen::JsValue`","suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"src/lib.rs","byte_start":4265,"byte_end":4266,"line_start":166,"line_end":166,"column_start":55,"column_end":56,"is_primary":false,"text":[{"text":" let text = Request::get(\"index.json\").send().await?.text().await?;","highlight_start":55,"highlight_end":56}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"desugaring of operator `?`","def_site_span":{"file_name":"src/lib.rs","byte_start":0,"byte_end":0,"line_start":1,"line_end":1,"column_start":1,"column_end":1,"is_primary":false,"text":[],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}}],"children":[{"message":"the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"the following other types implement trait `From<T>`:\n `wasm_bindgen::JsValue` implements `From<&T>`\n `wasm_bindgen::JsValue` implements `From<&std::string::String>`\n `wasm_bindgen::JsValue` implements `From<&str>`\n `wasm_bindgen::JsValue` implements `From<*const T>`\n `wasm_bindgen::JsValue` implements `From<*mut T>`\n `wasm_bindgen::JsValue` implements `From<AbortSignal>`\n `wasm_bindgen::JsValue` implements `From<AddEventListenerOptions>`\n `wasm_bindgen::JsValue` implements `From<ArrayBuffer>`\nand 124 others","code":null,"level":"help","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror[E0277]\u001b[0m\u001b[0m\u001b[1m: `?` couldn't convert the error to `wasm_bindgen::JsValue`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/lib.rs:166:55\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;12m166\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m let text = Request::get(\"index.json\").send().await?.text().await?;\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[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;9mthe trait `From<gloo_net::Error>` is not implemented for `wasm_bindgen::JsValue`\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[38;5;12m|\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[38;5;12mthis can't be annotated with `?` because it has type `Result<_, gloo_net::Error>`\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: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mhelp\u001b[0m\u001b[0m: the following other types implement trait `From<T>`:\u001b[0m\n\u001b[0m `wasm_bindgen::JsValue` implements `From<&T>`\u001b[0m\n\u001b[0m `wasm_bindgen::JsValue` implements `From<&std::string::String>`\u001b[0m\n\u001b[0m `wasm_bindgen::JsValue` implements `From<&str>`\u001b[0m\n\u001b[0m `wasm_bindgen::JsValue` implements `From<*const T>`\u001b[0m\n\u001b[0m `wasm_bindgen::JsValue` implements `From<*mut T>`\u001b[0m\n\u001b[0m `wasm_bindgen::JsValue` implements `From<AbortSignal>`\u001b[0m\n\u001b[0m `wasm_bindgen::JsValue` implements `From<AddEventListenerOptions>`\u001b[0m\n\u001b[0m `wasm_bindgen::JsValue` implements `From<ArrayBuffer>`\u001b[0m\n\u001b[0m and 124 others\u001b[0m\n\n"}
|
|
{"$message_type":"diagnostic","message":"`?` couldn't convert the error to `wasm_bindgen::JsValue`","code":{"code":"E0277","explanation":"You tried to use a type which doesn't implement some trait in a place which\nexpected that trait.\n\nErroneous code example:\n\n```compile_fail,E0277\n// here we declare the Foo trait with a bar method\ntrait Foo {\n fn bar(&self);\n}\n\n// we now declare a function which takes an object implementing the Foo trait\nfn some_func<T: Foo>(foo: T) {\n foo.bar();\n}\n\nfn main() {\n // we now call the method with the i32 type, which doesn't implement\n // the Foo trait\n some_func(5i32); // error: the trait bound `i32 : Foo` is not satisfied\n}\n```\n\nIn order to fix this error, verify that the type you're using does implement\nthe trait. Example:\n\n```\ntrait Foo {\n fn bar(&self);\n}\n\n// we implement the trait on the i32 type\nimpl Foo for i32 {\n fn bar(&self) {}\n}\n\nfn some_func<T: Foo>(foo: T) {\n foo.bar(); // we can now use this method since i32 implements the\n // Foo trait\n}\n\nfn main() {\n some_func(5i32); // ok!\n}\n```\n\nOr in a generic context, an erroneous code example would look like:\n\n```compile_fail,E0277\nfn some_func<T>(foo: T) {\n println!(\"{:?}\", foo); // error: the trait `core::fmt::Debug` is not\n // implemented for the type `T`\n}\n\nfn main() {\n // We now call the method with the i32 type,\n // which *does* implement the Debug trait.\n some_func(5i32);\n}\n```\n\nNote that the error here is in the definition of the generic function. Although\nwe only call it with a parameter that does implement `Debug`, the compiler\nstill rejects the function. It must work with all possible input types. In\norder to make this example compile, we need to restrict the generic type we're\naccepting:\n\n```\nuse std::fmt;\n\n// Restrict the input type to types that implement Debug.\nfn some_func<T: fmt::Debug>(foo: T) {\n println!(\"{:?}\", foo);\n}\n\nfn main() {\n // Calling the method is still fine, as i32 implements Debug.\n some_func(5i32);\n\n // This would fail to compile now:\n // struct WithoutDebug;\n // some_func(WithoutDebug);\n}\n```\n\nRust only looks at the signature of the called function, as such it must\nalready specify all requirements that will be used for every type parameter.\n"},"level":"error","spans":[{"file_name":"src/lib.rs","byte_start":4226,"byte_end":4279,"line_start":166,"line_end":166,"column_start":16,"column_end":69,"is_primary":false,"text":[{"text":" let text = Request::get(\"index.json\").send().await?.text().await?;","highlight_start":16,"highlight_end":69}],"label":"this can't be annotated with `?` because it has type `Result<_, gloo_net::Error>`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/lib.rs","byte_start":4279,"byte_end":4280,"line_start":166,"line_end":166,"column_start":69,"column_end":70,"is_primary":true,"text":[{"text":" let text = Request::get(\"index.json\").send().await?.text().await?;","highlight_start":69,"highlight_end":70}],"label":"the trait `From<gloo_net::Error>` is not implemented for `wasm_bindgen::JsValue`","suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"src/lib.rs","byte_start":4279,"byte_end":4280,"line_start":166,"line_end":166,"column_start":69,"column_end":70,"is_primary":false,"text":[{"text":" let text = Request::get(\"index.json\").send().await?.text().await?;","highlight_start":69,"highlight_end":70}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"desugaring of operator `?`","def_site_span":{"file_name":"src/lib.rs","byte_start":0,"byte_end":0,"line_start":1,"line_end":1,"column_start":1,"column_end":1,"is_primary":false,"text":[],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}}],"children":[{"message":"the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"the following other types implement trait `From<T>`:\n `wasm_bindgen::JsValue` implements `From<&T>`\n `wasm_bindgen::JsValue` implements `From<&std::string::String>`\n `wasm_bindgen::JsValue` implements `From<&str>`\n `wasm_bindgen::JsValue` implements `From<*const T>`\n `wasm_bindgen::JsValue` implements `From<*mut T>`\n `wasm_bindgen::JsValue` implements `From<AbortSignal>`\n `wasm_bindgen::JsValue` implements `From<AddEventListenerOptions>`\n `wasm_bindgen::JsValue` implements `From<ArrayBuffer>`\nand 124 others","code":null,"level":"help","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror[E0277]\u001b[0m\u001b[0m\u001b[1m: `?` couldn't convert the error to `wasm_bindgen::JsValue`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/lib.rs:166:69\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;12m166\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m let text = Request::get(\"index.json\").send().await?.text().await?;\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[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;9mthe trait `From<gloo_net::Error>` is not implemented for `wasm_bindgen::JsValue`\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[38;5;12m|\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[38;5;12mthis can't be annotated with `?` because it has type `Result<_, gloo_net::Error>`\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: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mhelp\u001b[0m\u001b[0m: the following other types implement trait `From<T>`:\u001b[0m\n\u001b[0m `wasm_bindgen::JsValue` implements `From<&T>`\u001b[0m\n\u001b[0m `wasm_bindgen::JsValue` implements `From<&std::string::String>`\u001b[0m\n\u001b[0m `wasm_bindgen::JsValue` implements `From<&str>`\u001b[0m\n\u001b[0m `wasm_bindgen::JsValue` implements `From<*const T>`\u001b[0m\n\u001b[0m `wasm_bindgen::JsValue` implements `From<*mut T>`\u001b[0m\n\u001b[0m `wasm_bindgen::JsValue` implements `From<AbortSignal>`\u001b[0m\n\u001b[0m `wasm_bindgen::JsValue` implements `From<AddEventListenerOptions>`\u001b[0m\n\u001b[0m `wasm_bindgen::JsValue` implements `From<ArrayBuffer>`\u001b[0m\n\u001b[0m and 124 others\u001b[0m\n\n"}
|
|
{"$message_type":"diagnostic","message":"`?` couldn't convert the error to `wasm_bindgen::JsValue`","code":{"code":"E0277","explanation":"You tried to use a type which doesn't implement some trait in a place which\nexpected that trait.\n\nErroneous code example:\n\n```compile_fail,E0277\n// here we declare the Foo trait with a bar method\ntrait Foo {\n fn bar(&self);\n}\n\n// we now declare a function which takes an object implementing the Foo trait\nfn some_func<T: Foo>(foo: T) {\n foo.bar();\n}\n\nfn main() {\n // we now call the method with the i32 type, which doesn't implement\n // the Foo trait\n some_func(5i32); // error: the trait bound `i32 : Foo` is not satisfied\n}\n```\n\nIn order to fix this error, verify that the type you're using does implement\nthe trait. Example:\n\n```\ntrait Foo {\n fn bar(&self);\n}\n\n// we implement the trait on the i32 type\nimpl Foo for i32 {\n fn bar(&self) {}\n}\n\nfn some_func<T: Foo>(foo: T) {\n foo.bar(); // we can now use this method since i32 implements the\n // Foo trait\n}\n\nfn main() {\n some_func(5i32); // ok!\n}\n```\n\nOr in a generic context, an erroneous code example would look like:\n\n```compile_fail,E0277\nfn some_func<T>(foo: T) {\n println!(\"{:?}\", foo); // error: the trait `core::fmt::Debug` is not\n // implemented for the type `T`\n}\n\nfn main() {\n // We now call the method with the i32 type,\n // which *does* implement the Debug trait.\n some_func(5i32);\n}\n```\n\nNote that the error here is in the definition of the generic function. Although\nwe only call it with a parameter that does implement `Debug`, the compiler\nstill rejects the function. It must work with all possible input types. In\norder to make this example compile, we need to restrict the generic type we're\naccepting:\n\n```\nuse std::fmt;\n\n// Restrict the input type to types that implement Debug.\nfn some_func<T: fmt::Debug>(foo: T) {\n println!(\"{:?}\", foo);\n}\n\nfn main() {\n // Calling the method is still fine, as i32 implements Debug.\n some_func(5i32);\n\n // This would fail to compile now:\n // struct WithoutDebug;\n // some_func(WithoutDebug);\n}\n```\n\nRust only looks at the signature of the called function, as such it must\nalready specify all requirements that will be used for every type parameter.\n"},"level":"error","spans":[{"file_name":"src/lib.rs","byte_start":4607,"byte_end":4638,"line_start":175,"line_end":175,"column_start":16,"column_end":47,"is_primary":false,"text":[{"text":" let text = Request::get(&url).send().await?.text().await?;","highlight_start":16,"highlight_end":47}],"label":"this can't be annotated with `?` because it has type `Result<_, gloo_net::Error>`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/lib.rs","byte_start":4638,"byte_end":4639,"line_start":175,"line_end":175,"column_start":47,"column_end":48,"is_primary":true,"text":[{"text":" let text = Request::get(&url).send().await?.text().await?;","highlight_start":47,"highlight_end":48}],"label":"the trait `From<gloo_net::Error>` is not implemented for `wasm_bindgen::JsValue`","suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"src/lib.rs","byte_start":4638,"byte_end":4639,"line_start":175,"line_end":175,"column_start":47,"column_end":48,"is_primary":false,"text":[{"text":" let text = Request::get(&url).send().await?.text().await?;","highlight_start":47,"highlight_end":48}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"desugaring of operator `?`","def_site_span":{"file_name":"src/lib.rs","byte_start":0,"byte_end":0,"line_start":1,"line_end":1,"column_start":1,"column_end":1,"is_primary":false,"text":[],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}}],"children":[{"message":"the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"the following other types implement trait `From<T>`:\n `wasm_bindgen::JsValue` implements `From<&T>`\n `wasm_bindgen::JsValue` implements `From<&std::string::String>`\n `wasm_bindgen::JsValue` implements `From<&str>`\n `wasm_bindgen::JsValue` implements `From<*const T>`\n `wasm_bindgen::JsValue` implements `From<*mut T>`\n `wasm_bindgen::JsValue` implements `From<AbortSignal>`\n `wasm_bindgen::JsValue` implements `From<AddEventListenerOptions>`\n `wasm_bindgen::JsValue` implements `From<ArrayBuffer>`\nand 124 others","code":null,"level":"help","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror[E0277]\u001b[0m\u001b[0m\u001b[1m: `?` couldn't convert the error to `wasm_bindgen::JsValue`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/lib.rs:175:47\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;12m175\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m let text = Request::get(&url).send().await?.text().await?;\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[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;9mthe trait `From<gloo_net::Error>` is not implemented for `wasm_bindgen::JsValue`\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[38;5;12m|\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[38;5;12mthis can't be annotated with `?` because it has type `Result<_, gloo_net::Error>`\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: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mhelp\u001b[0m\u001b[0m: the following other types implement trait `From<T>`:\u001b[0m\n\u001b[0m `wasm_bindgen::JsValue` implements `From<&T>`\u001b[0m\n\u001b[0m `wasm_bindgen::JsValue` implements `From<&std::string::String>`\u001b[0m\n\u001b[0m `wasm_bindgen::JsValue` implements `From<&str>`\u001b[0m\n\u001b[0m `wasm_bindgen::JsValue` implements `From<*const T>`\u001b[0m\n\u001b[0m `wasm_bindgen::JsValue` implements `From<*mut T>`\u001b[0m\n\u001b[0m `wasm_bindgen::JsValue` implements `From<AbortSignal>`\u001b[0m\n\u001b[0m `wasm_bindgen::JsValue` implements `From<AddEventListenerOptions>`\u001b[0m\n\u001b[0m `wasm_bindgen::JsValue` implements `From<ArrayBuffer>`\u001b[0m\n\u001b[0m and 124 others\u001b[0m\n\n"}
|
|
{"$message_type":"diagnostic","message":"`?` couldn't convert the error to `wasm_bindgen::JsValue`","code":{"code":"E0277","explanation":"You tried to use a type which doesn't implement some trait in a place which\nexpected that trait.\n\nErroneous code example:\n\n```compile_fail,E0277\n// here we declare the Foo trait with a bar method\ntrait Foo {\n fn bar(&self);\n}\n\n// we now declare a function which takes an object implementing the Foo trait\nfn some_func<T: Foo>(foo: T) {\n foo.bar();\n}\n\nfn main() {\n // we now call the method with the i32 type, which doesn't implement\n // the Foo trait\n some_func(5i32); // error: the trait bound `i32 : Foo` is not satisfied\n}\n```\n\nIn order to fix this error, verify that the type you're using does implement\nthe trait. Example:\n\n```\ntrait Foo {\n fn bar(&self);\n}\n\n// we implement the trait on the i32 type\nimpl Foo for i32 {\n fn bar(&self) {}\n}\n\nfn some_func<T: Foo>(foo: T) {\n foo.bar(); // we can now use this method since i32 implements the\n // Foo trait\n}\n\nfn main() {\n some_func(5i32); // ok!\n}\n```\n\nOr in a generic context, an erroneous code example would look like:\n\n```compile_fail,E0277\nfn some_func<T>(foo: T) {\n println!(\"{:?}\", foo); // error: the trait `core::fmt::Debug` is not\n // implemented for the type `T`\n}\n\nfn main() {\n // We now call the method with the i32 type,\n // which *does* implement the Debug trait.\n some_func(5i32);\n}\n```\n\nNote that the error here is in the definition of the generic function. Although\nwe only call it with a parameter that does implement `Debug`, the compiler\nstill rejects the function. It must work with all possible input types. In\norder to make this example compile, we need to restrict the generic type we're\naccepting:\n\n```\nuse std::fmt;\n\n// Restrict the input type to types that implement Debug.\nfn some_func<T: fmt::Debug>(foo: T) {\n println!(\"{:?}\", foo);\n}\n\nfn main() {\n // Calling the method is still fine, as i32 implements Debug.\n some_func(5i32);\n\n // This would fail to compile now:\n // struct WithoutDebug;\n // some_func(WithoutDebug);\n}\n```\n\nRust only looks at the signature of the called function, as such it must\nalready specify all requirements that will be used for every type parameter.\n"},"level":"error","spans":[{"file_name":"src/lib.rs","byte_start":4607,"byte_end":4652,"line_start":175,"line_end":175,"column_start":16,"column_end":61,"is_primary":false,"text":[{"text":" let text = Request::get(&url).send().await?.text().await?;","highlight_start":16,"highlight_end":61}],"label":"this can't be annotated with `?` because it has type `Result<_, gloo_net::Error>`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/lib.rs","byte_start":4652,"byte_end":4653,"line_start":175,"line_end":175,"column_start":61,"column_end":62,"is_primary":true,"text":[{"text":" let text = Request::get(&url).send().await?.text().await?;","highlight_start":61,"highlight_end":62}],"label":"the trait `From<gloo_net::Error>` is not implemented for `wasm_bindgen::JsValue`","suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"src/lib.rs","byte_start":4652,"byte_end":4653,"line_start":175,"line_end":175,"column_start":61,"column_end":62,"is_primary":false,"text":[{"text":" let text = Request::get(&url).send().await?.text().await?;","highlight_start":61,"highlight_end":62}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"desugaring of operator `?`","def_site_span":{"file_name":"src/lib.rs","byte_start":0,"byte_end":0,"line_start":1,"line_end":1,"column_start":1,"column_end":1,"is_primary":false,"text":[],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}}],"children":[{"message":"the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"the following other types implement trait `From<T>`:\n `wasm_bindgen::JsValue` implements `From<&T>`\n `wasm_bindgen::JsValue` implements `From<&std::string::String>`\n `wasm_bindgen::JsValue` implements `From<&str>`\n `wasm_bindgen::JsValue` implements `From<*const T>`\n `wasm_bindgen::JsValue` implements `From<*mut T>`\n `wasm_bindgen::JsValue` implements `From<AbortSignal>`\n `wasm_bindgen::JsValue` implements `From<AddEventListenerOptions>`\n `wasm_bindgen::JsValue` implements `From<ArrayBuffer>`\nand 124 others","code":null,"level":"help","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror[E0277]\u001b[0m\u001b[0m\u001b[1m: `?` couldn't convert the error to `wasm_bindgen::JsValue`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/lib.rs:175:61\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;12m175\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m let text = Request::get(&url).send().await?.text().await?;\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[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;9mthe trait `From<gloo_net::Error>` is not implemented for `wasm_bindgen::JsValue`\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[38;5;12m|\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[38;5;12mthis can't be annotated with `?` because it has type `Result<_, gloo_net::Error>`\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: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mhelp\u001b[0m\u001b[0m: the following other types implement trait `From<T>`:\u001b[0m\n\u001b[0m `wasm_bindgen::JsValue` implements `From<&T>`\u001b[0m\n\u001b[0m `wasm_bindgen::JsValue` implements `From<&std::string::String>`\u001b[0m\n\u001b[0m `wasm_bindgen::JsValue` implements `From<&str>`\u001b[0m\n\u001b[0m `wasm_bindgen::JsValue` implements `From<*const T>`\u001b[0m\n\u001b[0m `wasm_bindgen::JsValue` implements `From<*mut T>`\u001b[0m\n\u001b[0m `wasm_bindgen::JsValue` implements `From<AbortSignal>`\u001b[0m\n\u001b[0m `wasm_bindgen::JsValue` implements `From<AddEventListenerOptions>`\u001b[0m\n\u001b[0m `wasm_bindgen::JsValue` implements `From<ArrayBuffer>`\u001b[0m\n\u001b[0m and 124 others\u001b[0m\n\n"}
|
|
{"$message_type":"diagnostic","message":"failed to resolve: use of unresolved module or unlinked crate `wasm_bindgen_futures`","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 module or unlinked crate\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":"src/lib.rs","byte_start":6259,"byte_end":6279,"line_start":224,"line_end":224,"column_start":9,"column_end":29,"is_primary":true,"text":[{"text":" wasm_bindgen_futures::spawn_local(async {","highlight_start":9,"highlight_end":29}],"label":"use of unresolved module or unlinked crate `wasm_bindgen_futures`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"if you wanted to use a crate named `wasm_bindgen_futures`, use `cargo add wasm_bindgen_futures` to add it to your `Cargo.toml`","code":null,"level":"help","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror[E0433]\u001b[0m\u001b[0m\u001b[1m: failed to resolve: use of unresolved module or unlinked crate `wasm_bindgen_futures`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/lib.rs:224:9\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;12m224\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m wasm_bindgen_futures::spawn_local(async {\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[38;5;9m^^^^^^^^^^^^^^^^^^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9muse of unresolved module or unlinked crate `wasm_bindgen_futures`\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[1mhelp\u001b[0m\u001b[0m: if you wanted to use a crate named `wasm_bindgen_futures`, use `cargo add wasm_bindgen_futures` to add it to your `Cargo.toml`\u001b[0m\n\n"}
|
|
{"$message_type":"diagnostic","message":"failed to resolve: use of unresolved module or unlinked crate `wasm_bindgen_futures`","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 module or unlinked crate\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":"src/lib.rs","byte_start":7316,"byte_end":7336,"line_start":259,"line_end":259,"column_start":5,"column_end":25,"is_primary":true,"text":[{"text":" wasm_bindgen_futures::spawn_local(async { initial_render().await });","highlight_start":5,"highlight_end":25}],"label":"use of unresolved module or unlinked crate `wasm_bindgen_futures`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"if you wanted to use a crate named `wasm_bindgen_futures`, use `cargo add wasm_bindgen_futures` to add it to your `Cargo.toml`","code":null,"level":"help","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror[E0433]\u001b[0m\u001b[0m\u001b[1m: failed to resolve: use of unresolved module or unlinked crate `wasm_bindgen_futures`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/lib.rs:259:5\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;12m259\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m wasm_bindgen_futures::spawn_local(async { initial_render().await });\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[38;5;9m^^^^^^^^^^^^^^^^^^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9muse of unresolved module or unlinked crate `wasm_bindgen_futures`\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[1mhelp\u001b[0m\u001b[0m: if you wanted to use a crate named `wasm_bindgen_futures`, use `cargo add wasm_bindgen_futures` to add it to your `Cargo.toml`\u001b[0m\n\n"}
|
|
{"$message_type":"diagnostic","message":"aborting due to 8 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror\u001b[0m\u001b[0m\u001b[1m: aborting due to 8 previous errors\u001b[0m\n\n"}
|
|
{"$message_type":"diagnostic","message":"Some errors have detailed explanations: E0277, E0433.","code":null,"level":"failure-note","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1mSome errors have detailed explanations: E0277, E0433.\u001b[0m\n"}
|
|
{"$message_type":"diagnostic","message":"For more information about an error, try `rustc --explain E0277`.","code":null,"level":"failure-note","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1mFor more information about an error, try `rustc --explain E0277`.\u001b[0m\n"}
|