mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-10 20:28:51 +00:00
Fix copy/paste error.
The `CString` handling code is erroneously identical to the `ByteString` handling code.
This commit is contained in:
parent
2e5aca322f
commit
6ad00bb71e
1 changed files with 2 additions and 2 deletions
|
@ -5,7 +5,7 @@
|
|||
mod block;
|
||||
|
||||
use rowan::Direction;
|
||||
use rustc_lexer::unescape::{self, unescape_literal, Mode};
|
||||
use rustc_lexer::unescape::{self, unescape_c_string, unescape_literal, Mode};
|
||||
|
||||
use crate::{
|
||||
algo,
|
||||
|
@ -162,7 +162,7 @@ fn validate_literal(literal: ast::Literal, acc: &mut Vec<SyntaxError>) {
|
|||
ast::LiteralKind::CString(s) => {
|
||||
if !s.is_raw() {
|
||||
if let Some(without_quotes) = unquote(text, 2, '"') {
|
||||
unescape_literal(without_quotes, Mode::ByteStr, &mut |range, char| {
|
||||
unescape_c_string(without_quotes, Mode::CStr, &mut |range, char| {
|
||||
if let Err(err) = char {
|
||||
push_err(1, range.start, err);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue