Cargo install cargo-generate failed on Apple M1

Hi Rustaceans,

A newbie here.

   Compiling cargo-generate v0.14.0
error[E0658]: trait bounds other than `Sized` on const fn parameters are unstable
  --> /Users/nsimaria/.cargo/registry/src/
19 | impl<F: FnOnce()> CleanupJob<F> {
   |      ^
20 |     pub const fn new(f: F) -> Self {
   |     ------------------------------ function declared as const here
   = note: see issue #93706 <> for more information

For more information about this error, try `rustc --explain E0658`.
error: could not compile `cargo-generate` due to previous error
warning: build failed, waiting for other jobs to finish...
error: failed to compile `cargo-generate v0.14.0`, intermediate artifacts can be found at `/var/folders/gx/4vp7fh6905nfj7srlsvrn_sc0000gp/T/cargo-install27Jl0J`

Caused by:
  build failed


rustc 1.60.0 (7737e0b5c 2022-04-04)
cargo 1.60.0 (d1fd9fe2c 2022-03-01)
Mac OS Monterey
Apple M1 Pro

Try updating Rust and then install again.

1 Like

Thanks a lot. Updated to rustc 1.61.0 (fe5b13d68 2022-05-18) and it worked.

I'm getting this issue as well, but latest version isn't helping stable or nightly.
stable-x86_64-apple-darwin unchanged - rustc 1.61.0 (fe5b13d68 2022-05-18)
nightly-x86_64-apple-darwin unchanged - rustc 1.63.0-nightly (420c970cb 2022-06-09)

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.