Skip to content

RA incorrectly suggests importing println from std when using println!() #14826

Closed
@lh123

Description

@lh123

rust-analyzer version: 0.3.1514-standalone

rustc version: rustc 1.69.0 (84c898d65 2023-04-16)

When I use println RA suggest to import println from std

Example

fn main() {
    println!(); // when I use `println` RA suggest to import `println` from `std`
}

Actual

use std::println; // which is no need!

fn main() {
    println!()
}

image

Expect

Dont suggest import std::println

fn main() {
    println!()
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions