mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
Highlight escape sequences in byte strings
This commit is contained in:
parent
36e87fdb98
commit
581e1bf0d7
4 changed files with 97 additions and 18 deletions
|
@ -476,6 +476,20 @@ fn main() {
|
|||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_byte_string_highlight() {
|
||||
check_highlighting(
|
||||
r#"
|
||||
fn main() {
|
||||
let _ = "\x28\x28\x00\x63\n";
|
||||
let _ = b"\x28\x28\x00\x63\n";
|
||||
}
|
||||
"#,
|
||||
expect_file!["./test_data/highlight_byte_string.html"],
|
||||
false,
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_unsafe_highlighting() {
|
||||
check_highlighting(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue