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
I'm trying to build this crate on debian, since btree is a new dependency of virtiofsd. But I'm having some.. issues with it.
$ cargo test --all-targets --no-default-features --features allimpls
This gives me numerous errors:
error[E0433]: failed to resolve: use of undeclared crate or module `std`
--> src/impls/smallvec.rs:113:18
|
113 | type Iter<'a> = std::slice::Iter<'a, A::Item> where Self: 'a;
| ^^^ use of undeclared crate or module `std`
This is because of no_std feature. But in this place (and a few others), it should be core::slice, not std::slice - it's a commonly confused thing it seems. Apparently this crate has never been test-run by cargo.
Another large source of errors is examples/ordered.rs:
error[E0277]: the trait bound `std::vec::Vec<i32>: CollectionRef` is not satisfied
--> examples/ordered.rs:57:2
|
57 | ordered_stack_usage::<Vec<i32>>(); // a `Vec` is a stack so it works.
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `CollectionRef` is not implemented for `std::vec::Vec<i32>`
|
= help: the following other types implement trait `CollectionRef`:
HashMap<K, V>
HashSet<T>
error[E0277]: the trait bound `std::vec::Vec<i32>: PushBack` is not satisfied
--> examples/ordered.rs:57:24
|
57 | ordered_stack_usage::<Vec<i32>>(); // a `Vec` is a stack so it works.
| ^^^^^^^^ the trait `PushBack` is not implemented for `std::vec::Vec<i32>`
|
note: required by a bound in `ordered_stack_usage`
--> examples/ordered.rs:47:48
|
45 | fn ordered_stack_usage<S>()
| ------------------- required by a bound in this function
46 | where
47 | S: Default + Collection<Item = i32> + Back + PushBack,
| ^^^^^^^^ required by this bound in `ordered_stack_usage`
error[E0277]: the trait bound `std::vec::Vec<i32>: Back` is not satisfied
--> examples/ordered.rs:57:24
|
57 | ordered_stack_usage::<Vec<i32>>(); // a `Vec` is a stack so it works.
| ^^^^^^^^ the trait `Get<usize>` is not implemented for `std::vec::Vec<i32>`, which is required by `std::vec::Vec<i32>: Back`
|
= help: the following other types implement trait `Get<T>`:
HashMap<K, V>
HashSet<T>
= note: required for `std::vec::Vec<i32>` to implement `Back`
note: required by a bound in `ordered_stack_usage`
--> examples/ordered.rs:47:41
|
45 | fn ordered_stack_usage<S>()
| ------------------- required by a bound in this function
46 | where
47 | S: Default + Collection<Item = i32> + Back + PushBack,
| ^^^^ required by this bound in `ordered_stack_usage`
error[E0277]: the trait bound `std::vec::Vec<i32>: Back` is not satisfied
--> examples/ordered.rs:57:24
|
57 | ordered_stack_usage::<Vec<i32>>(); // a `Vec` is a stack so it works.
| ^^^^^^^^ the trait `Len` is not implemented for `std::vec::Vec<i32>`, which is required by `std::vec::Vec<i32>: Back`
|
= help: the following other types implement trait `Len`:
HashMap<K, V>
HashSet<T>
= note: required for `std::vec::Vec<i32>` to implement `Back`
note: required by a bound in `ordered_stack_usage`
etc.
For now, for virtiofsd needs, I disabled ijson, serde_json (lots of errors in there) and removed examples/ordered.rs, fixed s/std/core/ in a few places, and also patched out nightly feature. But apparently this can be fixed upstream for benefit of all :)
The text was updated successfully, but these errors were encountered:
I'm trying to build this crate on debian, since btree is a new dependency of virtiofsd. But I'm having some.. issues with it.
This gives me numerous errors:
This is because of
no_std
feature. But in this place (and a few others), it should becore::slice
, notstd::slice
- it's a commonly confused thing it seems. Apparently this crate has never been test-run by cargo.Another large source of errors is
examples/ordered.rs
:etc.
For now, for virtiofsd needs, I disabled ijson, serde_json (lots of errors in there) and removed examples/ordered.rs, fixed
s/std/core/
in a few places, and also patched outnightly
feature. But apparently this can be fixed upstream for benefit of all :)The text was updated successfully, but these errors were encountered: