rust-analyzer icon indicating copy to clipboard operation
rust-analyzer copied to clipboard

"ra@gennew" appearing in inline suggestion

Open CarbonSmasher opened this issue 2 years ago • 3 comments

rust-analyzer version: 0.3.1657-standalone

rustc version: 1.71.1

relevant settings: none

Steps to reproduce:

  1. Open a rust file
  2. Create a new function
  3. Type for foo.

Example:

fn bar() {
    for foo.
}

Rust analyzer will suggest the text <ra@gennew>[some number] as a property Expected behavior: No suggestion is made Actual behavior: The text is suggested

CarbonSmasher avatar Sep 17 '23 14:09 CarbonSmasher

Duplicate of #14986 but I will close that one since this one is more detailed.

HKalbasi avatar Sep 17 '23 21:09 HKalbasi

Can we filter out completion items like ra@gennew<idx> just based on name matching?

roife avatar Jun 24 '24 09:06 roife

We probably should for now, the proper fix is to probably have desugaring hygiene like rustc and then once we have hygienic name resolution they'd be filtered out on their own.

Veykril avatar Jun 24 '24 09:06 Veykril

any updates on this? it's been bugging me ever since i started using rust analyzer.

Paladynee avatar Jan 03 '25 06:01 Paladynee

Do you have an example snippet at hand that triggers this? The one in the issue does not seem to trigger this behavior anymore

Veykril avatar Jan 03 '25 10:01 Veykril

fn bar() {
    for i in 0..10 {
        for j in 0..10 {
            r| // cursor
        }
    }
}
Image

roife avatar Jan 03 '25 17:01 roife