Skip to content

Rewrite as raw string is not working properly on the string-suffix #19621

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
A4-Tacks opened this issue Apr 18, 2025 · 2 comments · Fixed by #19622
Closed

Rewrite as raw string is not working properly on the string-suffix #19621

A4-Tacks opened this issue Apr 18, 2025 · 2 comments · Fixed by #19622
Assignees
Labels
C-bug Category: bug

Comments

@A4-Tacks
Copy link
Contributor

A4-Tacks commented Apr 18, 2025

rust-analyzer version: rust-analyzer 1.85.1 (4eb16125 2025-03-15)

rustc version: rustc 1.85.1 (4eb161250 2025-03-15)

editor or extension: VIM9.1 coc-rust-analyzer

code snippet to reproduce:

fn foo() {
    let _ = "foo"i32;
}

On line 2 use Rewrite as raw string to:

fn foo() {
    let _ = r#"foo"i32#;
}

Expect:

fn foo() {
    let _ = r#"foo"#i32;
}
@A4-Tacks A4-Tacks added the C-bug Category: bug label Apr 18, 2025
@A4-Tacks
Copy link
Contributor Author

@rustbot claim

@A4-Tacks
Copy link
Contributor Author

The string suffix is meaningful for passing to attribute macros

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

Successfully merging a pull request may close this issue.

1 participant