Skip to content

Error installing cargo-watch on M4 Mac #138922

Closed as not planned
Closed as not planned
@thegreathir

Description

@thegreathir

Command:

cargo install cargo-watch

Error:

error[E0283]: type annotations needed
  --> /Users/XXX/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/notify-rust-4.11.5/src/timeout.rs:50:51
   |
50 |         } else if duration.as_millis() > u32::MAX.into() {
   |                                        -          ^^^^
   |                                        |
   |                                        type must be known at this point
   |
   = note: multiple `impl`s satisfying `u128: PartialOrd<_>` found in the following crates: `core`, `deranged`:
           - impl PartialOrd for u128;
           - impl<MIN, MAX> PartialOrd<deranged::RangedU128<MIN, MAX>> for u128
             where the constant `MIN` has type `u128`, the constant `MAX` has type `u128`;
help: try using a fully qualified path to specify the expected types
   |
50 |         } else if duration.as_millis() > <u32 as Into<T>>::into(u32::MAX) {
   |                                          +++++++++++++++++++++++        ~


Compiler version:

➜  ~ rustc --version --verbose
rustc 1.85.1 (4eb161250 2025-03-15)
binary: rustc
commit-hash: 4eb161250e340c8f48f66e2b929ef4a5bed7c181
commit-date: 2025-03-15
host: aarch64-apple-darwin
release: 1.85.1
LLVM version: 19.1.7

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-discussionCategory: Discussion or questions that doesn't represent real issues.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions