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

Refactor writeback code. cc #5527 #13990

Merged
merged 2 commits into from
May 8, 2014

Conversation

nikomatsakis
Copy link
Contributor

As part of #5527 I had to make some changes here and I just couldn't take it anymore. Refactor the writeback code. Should be functionally equivalent to the old stuff.

r? @pcwalton

@alexcrichton
Copy link
Member

There appear to be legitimate travis failures

bors added a commit that referenced this pull request May 8, 2014
…, r=pcwalton

As part of #5527 I had to make some changes here and I just couldn't take it anymore. Refactor the writeback code. Should be functionally equivalent to the old stuff.

r? @pcwalton
@bors bors closed this May 8, 2014
@bors bors merged commit 683d664 into rust-lang:master May 8, 2014
@nikomatsakis nikomatsakis deleted the issue-5527-cleanup-writeback branch March 30, 2016 16:15
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 13, 2023
…ievink

fix(ide-assists): unwrap block when it parent is let stmt

fix rust-lang#13990
flip1995 pushed a commit to flip1995/rust that referenced this pull request Feb 6, 2025
…estion (rust-lang#13990)

fix rust-lang#13959

The current implementation of the `write_literal` and `print_literal`
lint performs escaping for the second argument of `write!` ,`writeln!`,
`print!` and `println!` of the suggestion by first replacing `"` with
`\"`, and then replacing `\` with `\\`. Performing these replacements in
this order may lead to unnecessary backslashes being added if the
original code contains `"` (e.g. `"` -> `\\"`), potentially resulting in
a suggestion that causes the code to fail to compile.
In the issue mentioned above, it’s suggested to use raw strings as raw
strings, but implementing this would require an ad-hoc change to the
current implementation, so it has been deferred. (I'll implement this in
another PR)

changelog: [`write_literal`]: fix incorrect escaping of suggestions
changelog: [`print_literal`]: fix incorrect escaping of suggestions
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

Successfully merging this pull request may close these issues.

4 participants