When I run cargo build in the sudoku path, error occurs:
error[E0311]: the parameter type `K` may not live long enough
--> /home/hustccc/.cargo/registry/src/mirrors.tuna.tsinghua.edu.cn-df7c3c540f42cdbd/rusttype-0.2.3/src/support/bst/map.rs:81:19
|
81 | match node.force() {
| ^^^^
|
= help: consider adding an explicit lifetime bound for `K`
note: the parameter type `K` must be valid for the anonymous lifetime #1 defined on the function body at 77:9...
--> /home/hustccc/.cargo/registry/src/mirrors.tuna.tsinghua.edu.cn-df7c3c540f42cdbd/rusttype-0.2.3/src/support/bst/map.rs:77:9
|
77 | / fn clone_subtree<K: Clone, V: Clone>(
78 | | node: node::NodeRef<marker::Immut, K, V, marker::LeafOrInternal>)
79 | | -> BTreeMap<K, V> {
80 | |
... |
136 | | }
137 | | }
| |_________^
error: could not compile `rusttype`.
It looks like the crate rusttype-0.2.3 compiles error. And the piston2d-graphics crate depends on it.
How can I solve this problem?
Thanks for your answer.
When I run
cargo build
in the sudoku path, error occurs:It looks like the crate
rusttype-0.2.3
compiles error.And the
piston2d-graphics
crate depends on it.How can I solve this problem?
Thanks for your answer.