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

Escape string literals when fixing overlong char literal #103354

Merged
merged 2 commits into from
Oct 23, 2022

Conversation

clubby789
Copy link
Contributor

Fixes #103323

@rustbot label +A-diagnostics +A-suggestion-diagnostics

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Oct 21, 2022
@rust-highfive
Copy link
Collaborator

r? @compiler-errors

(rust-highfive has picked a reviewer for you, use r? to override)

@rustbot rustbot added A-diagnostics Area: Messages for errors, warnings, and lints A-suggestion-diagnostics Area: Suggestions generated by the compiler applied by `cargo fix`. labels Oct 21, 2022
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 21, 2022
@rust-log-analyzer

This comment has been minimized.

@clubby789
Copy link
Contributor Author

Also fixing the case of let _: char = "'" becoming let _: char = '''

@compiler-errors
Copy link
Member

Hm, this doesn't handle the case where we have already have an escaped literal like "\'", right?

@compiler-errors
Copy link
Member

Also, can you remove the intermediate commits like 51f2826f7fc866c29842cc541684dd6ce066ba88 where you tried something and it didn't end up working out? It's not useful to keep those in the commit history, imo.

@compiler-errors
Copy link
Member

Thanks @bors r+ rollup

@bors
Copy link
Contributor

bors commented Oct 22, 2022

📌 Commit 8762485 has been approved by compiler-errors

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 22, 2022
notriddle added a commit to notriddle/rust that referenced this pull request Oct 22, 2022
…r=compiler-errors

Escape string literals when fixing overlong char literal

Fixes rust-lang#103323

`@rustbot` label +A-diagnostics +A-suggestion-diagnostics
notriddle added a commit to notriddle/rust that referenced this pull request Oct 22, 2022
…r=compiler-errors

Escape string literals when fixing overlong char literal

Fixes rust-lang#103323

``@rustbot`` label +A-diagnostics +A-suggestion-diagnostics
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Oct 22, 2022
…r=compiler-errors

Escape string literals when fixing overlong char literal

Fixes rust-lang#103323

```@rustbot``` label +A-diagnostics +A-suggestion-diagnostics
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 23, 2022
…iaskrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#103123 (Introduce `subst_iter` and `subst_iter_copied` on `EarlyBinder` )
 - rust-lang#103328 (Do not suggest trivially false const predicates)
 - rust-lang#103354 (Escape string literals when fixing overlong char literal)
 - rust-lang#103355 (Handle return-position `impl Trait` in traits properly in `register_hidden_type`)
 - rust-lang#103368 (Delay ambiguity span bug in normalize query iff not rustdoc)
 - rust-lang#103388 (rustdoc: remove unused CSS class `.result-description`)
 - rust-lang#103399 (Change `unknown_lint` applicability to `MaybeIncorrect`)
 - rust-lang#103401 (Use functions for headings rustdoc GUI test)
 - rust-lang#103412 (Fix typo in docs of `String::leak`.)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit b656f5e into rust-lang:master Oct 23, 2022
@rustbot rustbot added this to the 1.66.0 milestone Oct 23, 2022
@clubby789 clubby789 deleted the escape-string-literals branch February 11, 2023 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints A-suggestion-diagnostics Area: Suggestions generated by the compiler applied by `cargo fix`. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Use double quotes" suggestion turns overlong char literal into unterminated string literal
6 participants