1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-23 14:10:28 -08:00
Commit graph

1 commit

Author SHA1 Message Date
Steven Allen
f0b987c32c rust-ts-mode: handle invalid rust syntax without signaling
Don't signal an error when encountering invalid rust syntax.  Without
this patch, invalid rust code would prevent a chunk of the buffer from
being highlighted (bug#79272).

* lisp/progmodes/rust-ts-mode.el (rust-ts-mode--fontify-scope):
(rust-ts-mode--fontify-pattern): Avoid calling `string-match-p' on nil
when a node is missing a parent.
* test/lisp/progmodes/rust-ts-mode-resources/font-lock-no-parent.rs:
Rust file that reproduces the issue.
* test/lisp/progmodes/rust-ts-mode-tests.el: Test case to reproduce the
issue.
2025-08-21 19:59:04 +03:00