mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 07:04:49 +00:00
Fix type inference for raw (byte) strings
This commit is contained in:
parent
2689348772
commit
d67eabb512
7 changed files with 119 additions and 65 deletions
|
@ -49,7 +49,7 @@ pub(crate) fn scan_byte_char_or_string(ptr: &mut Ptr) -> SyntaxKind {
|
|||
BYTE_STRING
|
||||
}
|
||||
'r' => {
|
||||
scan_raw_byte_string(ptr);
|
||||
scan_raw_string(ptr);
|
||||
RAW_BYTE_STRING
|
||||
}
|
||||
_ => unreachable!(),
|
||||
|
@ -108,16 +108,3 @@ fn scan_byte(ptr: &mut Ptr) {
|
|||
fn scan_byte_string(ptr: &mut Ptr) {
|
||||
scan_string(ptr)
|
||||
}
|
||||
|
||||
fn scan_raw_byte_string(ptr: &mut Ptr) {
|
||||
if !ptr.at('"') {
|
||||
return;
|
||||
}
|
||||
ptr.bump();
|
||||
|
||||
while let Some(c) = ptr.bump() {
|
||||
if c == '"' {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue