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

Extra backslashes when generating a trait method #16655

Closed
JustinHuPrime opened this issue Feb 24, 2024 · 2 comments
Closed

Extra backslashes when generating a trait method #16655

JustinHuPrime opened this issue Feb 24, 2024 · 2 comments
Labels
C-bug Category: bug

Comments

@JustinHuPrime
Copy link

rust-analyzer version: 0.3.1850-standalone

rustc version: rustc 1.75.0 (82e1608df 2023-12-21)

relevant settings: default settings

This is a regression from 0.3.1850 and 0.3.1839

When in 0.3.1850 (newer), asking RA to implement the missing members for a trait generates extra backslashes:

struct SomeStruct {
    field: i32,
}
impl Display for SomeStruct {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result \{
        todo!()
    \}
}

When in 0.3.1839 (older), asking RA to implement the same missing member generates the expected code without the extra backslashes:

struct SomeStruct {
    field: i32,
}
impl Display for SomeStruct {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        todo!()
    }
}
@JustinHuPrime JustinHuPrime added the C-bug Category: bug label Feb 24, 2024
@l1nxy
Copy link
Contributor

l1nxy commented Feb 24, 2024

fixed in #16618

@flodiebold
Copy link
Member

Duplicate of #16607

@flodiebold flodiebold marked this as a duplicate of #16607 Feb 24, 2024
@flodiebold flodiebold closed this as not planned Won't fix, can't repro, duplicate, stale Feb 24, 2024
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

No branches or pull requests

3 participants