0.12.1 Failing to compile when included as dependency
yeastplume opened this issue · comments
Yeastplume commented
Is there an existing issue for this?
- I have searched the existing issues.
Is this issue related to iced?
- My hardware is compatible and my graphics drivers are up-to-date.
What happened?
Compiling a minimal project that includes iced and nothing else
[package]
name = "iced-test"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
iced = "0.12"
results in
error[E0053]: method `from` has an incompatible type for trait
--> C:\Users\xxxx\.cargo\registry\src\index.crates.io-6f17d22bba15001f\iced_widget-0.12.3\src\container.rs:315:10
|
315 | ) -> Container<'a, Message, Theme, Renderer> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| expected `Element<'a, Message, Theme, Renderer>`, found `Container<'a, Message, Theme, Renderer>`
| help: change the output type to match the trait: `iced_renderer::iced_core::Element<'a, Message, Theme, Renderer>`
|
= note: expected signature `fn(container::Container<'_, _, _, _>) -> iced_renderer::iced_core::Element<'a, Message, Theme, Renderer>`
found signature `fn(container::Container<'_, _, _, _>) -> container::Container<'a, Message, Theme, Renderer>`
error[E0308]: mismatched types
--> C:\Users\xxxx\.cargo\registry\src\index.crates.io-6f17d22bba15001f\iced_widget-0.12.3\src\container.rs:316:9
|
315 | ) -> Container<'a, Message, Theme, Renderer> {
| --------------------------------------- expected `container::Container<'a, Message, Theme, Renderer>` because of return type
316 | Element::new(column)
| ^^^^^^^^^^^^^^^^^^^^ expected `Container<'_, Message, Theme, Renderer>`, found `Element<'_, Message, Theme, Renderer>`
|
= note: expected struct `container::Container<'a, Message, Theme, Renderer>`
found struct `iced_renderer::iced_core::Element<'_, Message, Theme, Renderer>`
Some errors have detailed explanations: E0053, E0308.
For more information about an error, try `rustc --explain E0053`.
error: could not compile `iced_widget` (lib) due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
It looks like 0.12.1 is resolving iced-widget to a later 0.12.3:
PS D:\xxx\iced-test> cargo tree -i iced_widget
iced_widget v0.12.3
└── iced v0.12.1
└── iced-test v0.1.0 (D:\Projects\grin-projects\iced-test)
PS D:\xxx\iced-test>
What is the expected behavior?
Compilation
Version
crates.io release
Operating System
Windows
Do you have any log output?
No response
Héctor Ramón commented
Can't reproduce. Those versions should be compatible, since they are just patches.
Try cargo update
.