Skip to content

Rust analyzer not highlighting conditional complication branches if cfg is given by build.rs #16244

@publicqi

Description

@publicqi

rust-analyzer version: 0.3.1791-standalone (9db5155 2024-01-01)

rustc version: rustc 1.76.0-nightly (87e1447aa 2023-11-30)

relevant settings: N/A

image

As shown in the screenshot, build.rs will output cargo:rustc-cfg=feature="foo", which will set the feature of foo. Therefore, line 2 and 3 should be highlighted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-cargocargo related issuesC-bugCategory: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions