diff --git a/src/tools/rust-analyzer/crates/ide/src/syntax_highlighting/test_data/highlight_issue_19357.html b/src/tools/rust-analyzer/crates/ide/src/syntax_highlighting/test_data/highlight_issue_19357.html new file mode 100644 index 000000000000..36ed8c594f7e --- /dev/null +++ b/src/tools/rust-analyzer/crates/ide/src/syntax_highlighting/test_data/highlight_issue_19357.html @@ -0,0 +1,46 @@ + + +
fn main() {
+ let x = &raw mut 5;
+}
+
\ No newline at end of file
diff --git a/src/tools/rust-analyzer/crates/ide/src/syntax_highlighting/tests.rs b/src/tools/rust-analyzer/crates/ide/src/syntax_highlighting/tests.rs
index 4b3fec1d2f7c..59f2b90333d3 100644
--- a/src/tools/rust-analyzer/crates/ide/src/syntax_highlighting/tests.rs
+++ b/src/tools/rust-analyzer/crates/ide/src/syntax_highlighting/tests.rs
@@ -1420,3 +1420,18 @@ fn template() {}
false,
);
}
+
+#[test]
+fn issue_19357() {
+ check_highlighting(
+ r#"
+//- /foo.rs
+fn main() {
+ let x = &raw mut 5;
+}
+//- /main.rs
+"#,
+ expect_file!["./test_data/highlight_issue_19357.html"],
+ false,
+ );
+}