Skip to content

Commit 733cb1e64 breaks imports.preferNoStd #17840

Closed
@traviscross

Description

@traviscross

Commit 733cb1e ("Optimize find_path for sysroot library search some more") breaks the rust-analyzer.imports.preferNoStd behavior.

That is, with that option set, and that commit applied, writing:

fn main() {
    let _ = Pin<tab><enter>
}

...produces:

use std::pin::Pin;

fn main() {
    let _ = Pin
}

...rather than:

use core::pin::Pin;

fn main() {
    let _ = Pin
}

The commit reverts cleanly, and reverting the commit on master fixes the behavior.

cc @Veykril

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions