1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 06:20:55 -08:00
emacs/test/lisp/progmodes/rust-ts-mode-resources/font-lock-number.rs
Christophe Troestler 902696c3ae Rust ts: fontify as type the possible suffix of number literals
* lisp/progmodes/rust-ts-mode.el
(rust-ts-mode--fontify-number-literal): Perform the improved
fontification of numbers.  (Bug#73877)
* test/lisp/progmodes/rust-ts-mode-tests.el:
* test/lisp/progmodes/rust-ts-mode-resources/font-lock.rs:
* test/lisp/progmodes/rust-ts-mode-resources/font-lock-number.rs:
Add tests for the new optional fontification of the possible type
suffix of numbers.
2024-11-23 14:56:38 +02:00

17 lines
482 B
Rust

fn main() {
let x = 1usize;
// ^ font-lock-number-face
// ^ font-lock-type-face
let x = 1_usize;
// ^ font-lock-number-face
// ^ font-lock-type-face
let x = 1_f64;
// ^ font-lock-number-face
// ^ font-lock-type-face
let x = 1.0f64;
// ^ font-lock-number-face
// ^ font-lock-type-face
let x = 1.0_f64;
// ^ font-lock-number-face
// ^ font-lock-type-face
}