Closed Garkatron closed 4 months ago
This is caused by an internal workaround for a compiler bug (hard to explain inline here). Duplicate of #129. Simply set resolver = "2"
in your workspace's Cargo.toml
as the compiler warning tells you to anyway.
Feel free to reopen if that doesn't fix it.
Explanation, details:
I'm trying to create a simple web-page app using examples while I review the documentation. However, I encounter an error displayed on the terminal when I attempt to execute it with trunk serve --open.
Sorry if, in the end, the issue isn't actually a problem and it turns out my code is incorrect. My fault.
My code:
Cargo.toml
App.rs
Main.rs
[Rustc version]
rustc 1.76.0 (07dca489a 2024-02-04)
[Cargo version]
cargo 1.76.0 (c84b36747 2024-01-18)
[Trunk version]
trunk 0.18.8
The docs I read: link = https://docs.rs/stylist/latest/stylist/
This is the entire message from the terminal.
resolver = "1"
despite one or more workspace members being on edition 2021 which impliesresolver = "2"
note: to keep the current resolver, specifyworkspace.resolver = "1"
in the workspace root's manifest note: to use the edition 2021 resolver, specifyworkspace.resolver = "2"
in the workspace root's manifest note: for more details see https://doc.rust-lang.org/cargo/reference/resolver.html#resolver-versions Compiling stylist v0.13.0 error[E0308]: mismatched types --> C:\Users\user.cargo\registry\src\index.crates.io-6f17d22bba15001f\stylist-0.13.0\src\manager\mod.rs:244:38()
, foundJsValue
JsValue
due to the type of the argument passed --> C:\Users\user.cargo\registry\src\index.crates.io-6f17d22bba15001f\stylist-0.13.0\src\manager\mod.rs:244:33Some
note: tuple variant defined here --> C:\Users\user.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib/rustlib/src/rust\library/core/src/option.rs:578:5 | 578 | Some(#[stable(feature = "rust1", since = "1.0.0")] T), | ^^^^
?
couldn't convert the error to()
--> C:\Users\user.cargo\registry\src\index.crates.io-6f17d22bba15001f\stylist-0.13.0\src\manager\mod.rs:255:91From<JsValue>
is not implemented for()
?
couldn't convert the error to()
--> C:\Users\user.cargo\registry\src\index.crates.io-6f17d22bba15001f\stylist-0.13.0\src\manager\mod.rs:257:44From<JsValue>
is not implemented for()
Some errors have detailed explanations: E0277, E0308. For more information about an error, try
rustc --explain E0277
. error: could not compilestylist
(lib) due to 3 previous errors 2024-02-24T20:22:07.228717Z ERROR error error from build pipelineCaused by: 0: HTML build pipeline failed (1 errors), showing first 1: error from asset pipeline 2: error during cargo build execution 3: cargo call to executable 'cargo' with args: '["build", "--target=wasm32-unknown-unknown", "--manifest-path", "D:\Carpetas\Proyectos\EmailClient\web-app\Cargo.toml"]' returned a bad status: exit code: 101 2024-02-24T20:22:07.236936Z INFO serving static assets at -> / 2024-02-24T20:22:07.237214Z INFO server listening at http://127.0.0.1:8080