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 install gping fails with "type annotations needed" #399

Closed
DavidAntliff opened this issue Nov 25, 2023 · 2 comments
Closed

Cargo install gping fails with "type annotations needed" #399

DavidAntliff opened this issue Nov 25, 2023 · 2 comments

Comments

@DavidAntliff
Copy link

On Mac OS 13.6, cargo 1.74.0, rustc 1.74.0:

$ cargo install gping
...
   Compiling gping v1.15.1
error[E0283]: type annotations needed
   --> /Users/david/.cargo/registry/src/index.crates.io-6f17d22bba15001f/gping-1.15.1/src/main.rs:486:26
    |
486 |                         .constraints(
    |                          ^^^^^^^^^^^ cannot infer type of the type parameter `C` declared on the method `constraints`
...
491 |                                 .as_ref(),
    |                                  ------ type must be known at this point
    |
    = note: multiple `impl`s satisfying `Vec<Constraint>: AsRef<_>` found in the `alloc` crate:
            - impl<T, A> AsRef<Vec<T, A>> for Vec<T, A>
              where A: Allocator;
            - impl<T, A> AsRef<[T]> for Vec<T, A>
              where A: Allocator;
help: consider specifying the generic argument
    |
486 |                         .constraints::<&T>(
    |                                     ++++++

For more information about this error, try `rustc --explain E0283`.
error: could not compile `gping` (bin "gping") due to previous error
@orf
Copy link
Owner

orf commented Nov 29, 2023

My bad, the fix wasn't included in the release for some reason. Doing a new one now.

@orf
Copy link
Owner

orf commented Nov 29, 2023

Should be ok!

@orf orf closed this as completed Nov 29, 2023
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