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

error[E0282]: type annotations needed for Box<_> #3173

Closed
cxp-13 opened this issue Aug 16, 2024 · 2 comments
Closed

error[E0282]: type annotations needed for Box<_> #3173

cxp-13 opened this issue Aug 16, 2024 · 2 comments
Labels
avm cli duplicate This issue or pull request already exists installation error Issues related to installation errors

Comments

@cxp-13
Copy link

cxp-13 commented Aug 16, 2024

error[E0282]: type annotations needed for `Box<_>`
  --> /home/cxp/.cargo/registry/src/index.crates.io-6f17d22bba15001f/time-0.3.29/src/format_description/parse/mod.rs:83:9
   |
83 |     let items = format_items
   |         ^^^^^
...
86 |     Ok(items.into())
   |              ---- type must be known at this point
   |
help: consider giving `items` an explicit type, where the placeholders `_` are specified
   |
83 |     let items: Box<_> = format_items
   |              ++++++++

   Compiling heck v0.3.3
   Compiling futures-executor v0.3.28
   Compiling Inflector v0.11.4
   Compiling async-trait v0.1.73
   Compiling bs58 v0.5.0
   Compiling minimal-lexical v0.2.1
   Compiling futures v0.3.28
   Compiling synstructure v0.12.6
   Compiling nom v7.1.3
   Compiling memoffset v0.7.1
For more information about this error, try `rustc --explain E0282`.
error: could not compile `time` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
error: failed to compile `anchor-cli v0.29.0 (https://github.com/coral-xyz/anchor?tag=v0.29.0#fc9fd6d2)`, intermediate artifacts can be found at `/tmp/cargo-installcMeC2K`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
Error: Failed to install 0.29.0, is it a valid version?

When i try to avm install 0.29.0 get this error. but 0.30.1 and 0.30.0 is fine.

@cxp-13
Copy link
Author

cxp-13 commented Aug 16, 2024

The locations where these errors are reported are the source code of some libraries, which I am unlikely to be able to modify manually. It feels like it's caused by differences between rust versions.

@acheroncrypto acheroncrypto added duplicate This issue or pull request already exists cli avm installation error Issues related to installation errors labels Aug 16, 2024
@acheroncrypto
Copy link
Collaborator

You've created this exact issue in #3150. As noted in the answer I posted there, see #3143 "Note" section to understand why this error happens, and how you can fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
avm cli duplicate This issue or pull request already exists installation error Issues related to installation errors
Projects
None yet
Development

No branches or pull requests

2 participants