mirror of
https://github.com/masscollaborationlabs/emacs.git
synced 2025-07-09 13:40:50 +00:00

* test/lisp/progmodes/rust-ts-mode-tests.el: New file for rust-ts-mode tests. * test/lisp/progmodes/rust-ts-mode-resources/font-lock.rs: New file with rust-ts-mode font-locking tests. New tests added for macro font-locking (bug#70464) and function signatures (bug#70465).
25 lines
882 B
Rust
25 lines
882 B
Rust
// -*- rust-ts-mode-indent-offset: 0 -*-
|
|
// Trait with function signature
|
|
trait Foo {
|
|
fn foo();
|
|
// ^ font-lock-function-name-face
|
|
}
|
|
|
|
// Macros
|
|
macro_rules! unsafe_foo {
|
|
($env:expr, $name:ident $(, $args:expr)*) => {
|
|
// ^ font-lock-variable-name-face
|
|
// ^ font-lock-type-face
|
|
// ^ font-lock-variable-name-face
|
|
// ^ font-lock-type-face
|
|
// ^ font-lock-operator-face
|
|
// ^ font-lock-variable-name-face
|
|
// ^ font-lock-type-face
|
|
// ^ font-lock-operator-face
|
|
{
|
|
foo!($env, $name $(, $args)*);
|
|
// ^ font-lock-variable-use-face
|
|
// ^ font-lock-operator-face
|
|
// ^ font-lock-operator-face
|
|
}
|
|
};
|