diff --git a/crates/ide/src/syntax_highlighting/test_data/highlight_issue_19357.html b/crates/ide/src/syntax_highlighting/test_data/highlight_issue_19357.html new file mode 100644 index 0000000000..36ed8c594f --- /dev/null +++ b/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/crates/ide/src/syntax_highlighting/tests.rs b/crates/ide/src/syntax_highlighting/tests.rs
index 4b3fec1d2f..59f2b90333 100644
--- a/crates/ide/src/syntax_highlighting/tests.rs
+++ b/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,
+ );
+}