Skip to content

Fails to evaluate anyhow crate's build script after sync. #9959

@ledyba

Description

@ledyba

Environment

  • IntelliJ Rust plugin version: 0.4.185.5086-223
  • Rust toolchain version: 1.66.1 (90743e729 2023-01-10) x86_64-pc-windows-msvc
  • IDE name and version: CLion 2022.3.1 (CL-223.8214.51)
  • Operating system: Windows 10 10.0
  • Macro expansion: enabled

Problem description

Failed to build project with this message:

error[E0554]: `#![feature]` may not be used on the stable release channel
   --> C:\Users\kaede\scoop\persist\rustup-msvc\.cargo\registry\src\github.com-1ecc6299db9ec823\anyhow-1.0.68\src\lib.rs:214:32
    |
214 | #![cfg_attr(backtrace, feature(error_generic_member_access, provide_any))]
    |                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^

image

Steps to reproduce

  1. Create a new project.
  2. Add anyhow = "1.0.68" to dependencies. Do not push build button yet.
  3. Push sync button.
  4. Build the project.

After step 4, cargo build always fails. For workaround, remove /target/ and type cargo build from a terminal.

Maybe rust-lang/rust-analyzer#12973, dtolnay/anyhow#250 and dtolnay/anyhow#288 are related issue.

#9198 may be not fully resolved or en-bugged.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugsubsystem::project modelIssues with setting up project structure and retrieving information about project from various tool

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions