Skip to content

Support cfg features generated by build scripts #4631

@AlyoshaVasilieva

Description

@AlyoshaVasilieva

Environment

  • IntelliJ Rust plugin version: 0.2.110.5742-193-dev
  • Rust toolchain version: 1.39 stable
  • IDE name and version: IntelliJ IDEA 2019.3 beta 2
  • Operating system: Windows 10 x64

Problem description

Ctrl-clicking function in specific circumstance takes me to wrong function. Experimental macro expansion engine is enabled.

Steps to reproduce

Cargo.toml:

[package]
name = "bug-repro"
version = "0.1.0"
authors = ["Alyosha Vasilieva <1284317+AlyoshaVasilieva@users.noreply.github.com>"]
edition = "2018"

[dependencies]
indexmap = "=1.3.0"
digest = "=0.8.1"

main.rs:

use indexmap::map::IndexMap;

fn main() {
    let mut map = IndexMap::new();
    map.insert("key", "value");
}

IndexMap::new is highlighted as error with "Unresolved reference: `new`".

Ctrl-clicking IndexMap, despite being highlighted red, correctly takes me to its declaration.

Ctrl-clicking new incorrectly takes me to the new function inside impl<D: Input + FixedOutput + Reset + Clone + Default> Digest for D, part of the digest crate.

Compilation works and gives no warnings or errors.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions