Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
lh123 opened this issue May 17, 2023 · 1 comment · Fixed by #14828
Closed

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

lh123 opened this issue May 17, 2023 · 1 comment · Fixed by #14828
Labels
A-completion autocompletion C-bug Category: bug

Comments

@lh123
Copy link
Contributor

lh123 commented May 17, 2023

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!()
}
@lh123 lh123 added the C-bug Category: bug label May 17, 2023
@Veykril Veykril added the A-completion autocompletion label May 17, 2023
@flodiebold
Copy link
Member

Caused by #14781, cc @lowr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-completion autocompletion C-bug Category: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants