Skip to content
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

Struct member suggestions are flanky on windows #11343

Closed
mrpink76 opened this issue Jan 25, 2022 · 3 comments
Closed

Struct member suggestions are flanky on windows #11343

mrpink76 opened this issue Jan 25, 2022 · 3 comments

Comments

@mrpink76
Copy link

mrpink76 commented Jan 25, 2022

rust-analyzer version: 5f13d6a 2022-01-25 nightly

rustc version: rustc 1.58.1 (db9d1b20b 2022-01-20)

vscode version: Version: 1.63.2 (user setup) (Commit: 899d46d82c4c95423fb7e10e68eba52050e30ba3, OS: Windows_NT x64 10.0.22000)

The starting point is the following:

struct Test {
    pub field : String,
}

fn main() {
    println!("Hello, world!");
    let x = Test { field: "".to_string()};
    // cursor is placed directly after x on the next line
    let a = x
}

When writing ".fi" fast, the suggestion for "field" is not beeing shown.

If first write the "." and then after a short wait write "fi". The success rate is much higher.

Tried the same thing on vscode on macos (macbook pro) and there I could not reproduce the issue.

The bug happens quite frequently on windows.

A related issue is that the suggestion might disapear if you write two or more aditional characters quickly, that is go from "let a = x.fi" to "let a = x.fiel". It seems to work if you only write one character and then waits for the suggestion before writing another character.

@Veykril
Copy link
Member

Veykril commented Jan 28, 2022

Duplicate of #10187

@Veykril Veykril marked this as a duplicate of #10187 Jan 28, 2022
@Veykril Veykril closed this as completed Jan 28, 2022
@mrpink76
Copy link
Author

@Veykril I don't think this is a duplicate of "10187" since this bug is reproducible with a very small code base (hello world size).
This behavior is limited to Windows (no issues in macos/darwin).

@Veykril
Copy link
Member

Veykril commented Jan 28, 2022

We have plenty more of these kinda issue, but here is a windows specific one of which this might be a duplicate actually #3973
(Truth be told I picked the first one of these that I could find when closing this)

Other related ones #7560 #10263

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants