bitvec icon indicating copy to clipboard operation
bitvec copied to clipboard

Cargo check failed with error: could not compile `bitvec` (lib)

Open Hirohumi opened this issue 1 year ago • 2 comments

cargo check failed with the following messages:

error[E0403]: the name `T` is already used for a generic parameter in this item's generic parameters
    --> /Users/hirohumi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitvec-1.0.1/src/slice.rs:1783:19
     |
1755 | impl<T, O> BitSlice<T, O>
     |      - first use of `T`
...
1783 |     pub fn to_bitvec<T>(&self) -> BitVec<T::Unalias, O> {
     |                      ^ already used

error[E0282]: type annotations needed
    --> /Users/hirohumi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitvec-1.0.1/src/slice/api.rs:2369:8
     |
2369 |         self.to_bitvec()
     |              ^^^^^^^^^ cannot infer type of the type parameter `T` declared on the method `to_bitvec`
     |
help: consider specifying the generic argument
     |
2369 |         self.to_bitvec::<T>()
     |                       +++++

first occurred when running the following command

RUSTFLAGS='-C link-arg=-Wl,-soname,libmylib.so' cargo build --target aarch64-linux-android

was used to be okay, not sure what is causing the problem

Hirohumi avatar Apr 07 '24 09:04 Hirohumi