est31 / cargo-udeps

Find unused dependencies in Cargo.toml
Other
1.75k stars 46 forks source link

Fails to build #190

Closed kaimast closed 1 year ago

kaimast commented 1 year ago

When running cargo install cargo-udeps I get the following errors. This happens on my local machine and on Github Actions.

error[E0599]: `Vec<u8>` is not an iterator
   --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cargo-0.72.2/src/cargo/core/compiler/future_incompat.rs:275:18
    |
274 | /             strip_ansi_escapes::strip(&to_display)
275 | |                 .map(|v| String::from_utf8(v).expect("utf8"))
    | |                 -^^^ `Vec<u8>` is not an iterator; try calling `.into_iter()` or `.iter()`
    | |_________________|
    | 
   --> /rustc/f88a8b71cebb730cbd5058c45ebcae1d4d9be377/library/alloc/src/vec/mod.rs:396:1
    |
    = note: doesn't satisfy `Vec<u8>: Iterator`
    |
    = note: the following trait bounds were not satisfied:
            `Vec<u8>: Iterator`
            which is required by `&mut Vec<u8>: Iterator`
            `[u8]: Iterator`
            which is required by `&mut [u8]: Iterator`
    = help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
    |
36  + use winnow::parser::Parser;
    |

error[E0599]: `Vec<u8>` is not an iterator
    --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cargo-0.72.2/src/cargo/core/compiler/mod.rs:1644:26
     |
1643 | /                     strip_ansi_escapes::strip(&msg.rendered)
1644 | |                         .map(|v| String::from_utf8(v).expect("utf8"))
     | |                         -^^^ `Vec<u8>` is not an iterator; try calling `.into_iter()` or `.iter()`
     | |_________________________|
     | 
    --> /rustc/f88a8b71cebb730cbd5058c45ebcae1d4d9be377/library/alloc/src/vec/mod.rs:396:1
     |
     = note: doesn't satisfy `Vec<u8>: Iterator`
     |
     = note: the following trait bounds were not satisfied:
             `Vec<u8>: Iterator`
             which is required by `&mut Vec<u8>: Iterator`
             `[u8]: Iterator`
             which is required by `&mut [u8]: Iterator`
     = help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
     |
34   + use winnow::parser::Parser;
     |

error[E0599]: `Vec<u8>` is not an iterator
    --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cargo-0.72.2/src/cargo/core/compiler/mod.rs:1678:22
     |
1677 |                   error.rendered = strip_ansi_escapes::strip(&error.rendered)
     |  __________________________________-
1678 | |                     .map(|v| String::from_utf8(v).expect("utf8"))
     | |                     -^^^ `Vec<u8>` is not an iterator; try calling `.into_iter()` or `.iter()`
     | |_____________________|
     | 
    --> /rustc/f88a8b71cebb730cbd5058c45ebcae1d4d9be377/library/alloc/src/vec/mod.rs:396:1
     |
     = note: doesn't satisfy `Vec<u8>: Iterator`
     |
     = note: the following trait bounds were not satisfied:
             `Vec<u8>: Iterator`
             which is required by `&mut Vec<u8>: Iterator`
             `[u8]: Iterator`
             which is required by `&mut [u8]: Iterator`
     = help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
     |
34   + use winnow::parser::Parser;
     |

For more information about this error, try `rustc --explain E0599`.
error: could not compile `cargo` (lib) due to 3 previous errors
error: failed to compile `cargo-udeps v0.1.41`, intermediate artifacts can be found at `/tmp/cargo-installAQy67a`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
Error: Process completed with exit code 101.
kaimast commented 1 year ago

My bad. cargo install cargo-udeps --locked works fine...