Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Hirohumi opened this issue Apr 7, 2024 · 2 comments
Open

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

Hirohumi opened this issue Apr 7, 2024 · 2 comments

Comments

@Hirohumi
Copy link

Hirohumi commented Apr 7, 2024

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

@dtolnay
Copy link
Contributor

dtolnay commented Apr 7, 2024

That code does not appear in the published bitvec 1.0.1.
https://docs.rs/crate/bitvec/1.0.1/source/src/slice.rs

@Hirohumi
Copy link
Author

Hirohumi commented Apr 8, 2024

That code does not appear in the published bitvec 1.0.1. https://docs.rs/crate/bitvec/1.0.1/source/src/slice.rs

wow, that is really interesting... did my rust cargo messed up a little bit? I'll go check……

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants