rust icon indicating copy to clipboard operation
rust copied to clipboard

Incorrect raw identifier variable name help suggestion

Open olegnn opened this issue 5 years ago • 6 comments

Incorrect hint for variable with a similar name defined using raw identifiers

fn main() {
    let r#final = 1;
    r#fina;
}

(Playground)

Errors:

   Compiling playground v0.0.1 (/playground)
error[E0425]: cannot find value `fina` in this scope
 --> src/main.rs:3:5
  |
3 |     r#fina;
  |     ^^^^^^ help: a local variable with a similar name exists: `final`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0425`.
error: could not compile `playground`.

To learn more, run the command again with --verbose.

Should be help: a local variable with a similar name exists: r#final

olegnn avatar Feb 08 '20 17:02 olegnn

@rustbot claim

I've fixed this issue and will try to find and fix more similarly incorrect suggestions before submitting a PR.

duckymirror avatar Oct 15 '23 20:10 duckymirror

@rustbot claim

I would love to take this up. It would help to know where I should begin.

nouritsu avatar Jan 26 '24 07:01 nouritsu

Sorry for dropping this, my exams are around the corner.

nouritsu avatar Jan 31 '24 12:01 nouritsu

@rustbot claim

kmpzr avatar Feb 09 '24 07:02 kmpzr

Hi @Dylan-DPC, I'm in the middle of the implementation of this issue. Would it be possible to assign it back to me?

kmpzr avatar Mar 10 '24 16:03 kmpzr

@rustbot claim

kmpzr avatar Mar 10 '24 16:03 kmpzr

Unfortunately, I'm extremely busy right now, therefore I will unassign me so that someone else can work on it.

kmpzr avatar Apr 13 '24 08:04 kmpzr