You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error[E0308]: mismatched types
--> /home/epage/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/syntect-1.7.0/src/parsing/yaml_load.rs:90:34
|
90 | if let Ok(map) = get_key(h, "variables", |x| x.as_hash()) {
| ^ expected struct `std::collections::BTreeMap`, found struct `linked_hash_map::LinkedHashMap`
|
= note: expected type `&std::collections::BTreeMap<yaml_rust::Yaml, yaml_rust::Yaml>`
found type `&linked_hash_map::LinkedHashMap<yaml_rust::Yaml, yaml_rust::Yaml>`
= help: here are some functions which might fulfill your needs:
- .hasher()
In case there is something weird we are doing with syntect
Basically, one of the dependencies of cobalt (serde-yaml) turns on the preserve_order feature, which changes what type Hash is in yaml-rust from BTreeMap to LinkedHashMap. Syntect expects to be compiled with the default features, which means using BTreeMap.
But I think we might be able to fix it by using the type alias instead of the concrete type instead. Let me try that.
robinst
added a commit
to robinst/syntect
that referenced
this issue
Jul 4, 2017
I ran into this problem with cobalt. I hacked around it by disabling the default features I didn't need.
Example error
In case there is something weird we are doing with syntect
The text was updated successfully, but these errors were encountered: