Skip to content

syntax: fix span for obsolete extern visibility error #8060

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
wants to merge 1 commit into from
Closed

syntax: fix span for obsolete extern visibility error #8060

wants to merge 1 commit into from

Conversation

Blei
Copy link
Contributor

@Blei Blei commented Jul 26, 2013

No description provided.

bors added a commit that referenced this pull request Jul 27, 2013
@bors bors closed this Jul 27, 2013
flip1995 pushed a commit to flip1995/rust that referenced this pull request Dec 6, 2021
…le_char_pattern, r=giraffate

Escape backslash in single_char_pattern.rs

Escape backslash in single_char_pattern.

Previously, the proposed clippy fix for a single backslash in raw strings ```r"\"``` or ```r#"\"#``` was also only an unescaped, *single* ```'\'```:
```shell
warning: single-character string constant used as pattern
2 |     let s = r#"abc\xyz/"#.find(r"\");
  |                                ^^^^ help: try using a `char` instead: `'\'`
  |
  = note: `#[warn(clippy::single_char_pattern)]` on by default
```

This PR corrects this to a properly escaped *double* backslash ```'\\'```.
I haven't come up with any other problematic cases, a single quote was already handled.

Closes: rust-lang#8060

changelog:  Escape backslash in ``[`single_char_pattern`]``
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.

2 participants