@@ -1638,13 +1638,13 @@ this_is_not_a_string();)"
1638
1638
" Ensure question mark operator is highlighted."
1639
1639
(rust-test-font-lock
1640
1640
" ?"
1641
- '(" ?" rust-question-mark-face ))
1641
+ '(" ?" rust-question-mark))
1642
1642
(rust-test-font-lock
1643
1643
" foo\(\) ?;"
1644
- '(" ?" rust-question-mark-face ))
1644
+ '(" ?" rust-question-mark))
1645
1645
(rust-test-font-lock
1646
1646
" foo\( bar\(\) ?\) ;"
1647
- '(" ?" rust-question-mark-face ))
1647
+ '(" ?" rust-question-mark))
1648
1648
(rust-test-font-lock
1649
1649
" \" ?\" "
1650
1650
'(" \" ?\" " font-lock-string-face ))
@@ -1664,7 +1664,7 @@ this_is_not_a_string();)"
1664
1664
(rust-test-font-lock
1665
1665
" foo\(\" ?\"\) ?;"
1666
1666
'(" \" ?\" " font-lock-string-face
1667
- " ?" rust-question-mark-face )))
1667
+ " ?" rust-question-mark)))
1668
1668
1669
1669
(ert-deftest rust-test-default-context-sensitive ()
1670
1670
(rust-test-font-lock
@@ -2250,195 +2250,195 @@ fn main() {
2250
2250
; ; is ignored
2251
2251
(rust-test-font-lock
2252
2252
" print!(\"\" ); { /* print!(\"\" ); */ }"
2253
- '(" print!" rust-builtin-formatting-macro-face
2253
+ '(" print!" rust-builtin-formatting-macro
2254
2254
" \"\" " font-lock-string-face
2255
2255
" /* " font-lock-comment-delimiter-face
2256
2256
" print!(\"\" ); */" font-lock-comment-face ))
2257
2257
; ; with newline directly following delimiter
2258
2258
(rust-test-font-lock
2259
2259
" print!(\n\"\"\n ); { /* print!(\"\" ); */ }"
2260
- '(" print!" rust-builtin-formatting-macro-face
2260
+ '(" print!" rust-builtin-formatting-macro
2261
2261
" \"\" " font-lock-string-face
2262
2262
" /* " font-lock-comment-delimiter-face
2263
2263
" print!(\"\" ); */" font-lock-comment-face ))
2264
2264
; ; with empty println!()
2265
2265
(rust-test-font-lock
2266
2266
" println!(); { /* println!(); */ }"
2267
- '(" println!" rust-builtin-formatting-macro-face
2267
+ '(" println!" rust-builtin-formatting-macro
2268
2268
" /* " font-lock-comment-delimiter-face
2269
2269
" println!(); */" font-lock-comment-face ))
2270
2270
; ; other delimiters
2271
2271
(rust-test-font-lock
2272
2272
" print!{\"\" }; { /* no-op */ }"
2273
- '(" print!" rust-builtin-formatting-macro-face
2273
+ '(" print!" rust-builtin-formatting-macro
2274
2274
" \"\" " font-lock-string-face
2275
2275
" /* " font-lock-comment-delimiter-face
2276
2276
" no-op */" font-lock-comment-face ))
2277
2277
; ; other delimiters
2278
2278
(rust-test-font-lock
2279
2279
" print![\"\" ]; { /* no-op */ }"
2280
- '(" print!" rust-builtin-formatting-macro-face
2280
+ '(" print!" rust-builtin-formatting-macro
2281
2281
" \"\" " font-lock-string-face
2282
2282
" /* " font-lock-comment-delimiter-face
2283
2283
" no-op */" font-lock-comment-face ))
2284
2284
; ; no interpolation
2285
2285
(rust-test-font-lock
2286
2286
" print!(\" abcd\" ); { /* no-op */ }"
2287
- '(" print!" rust-builtin-formatting-macro-face
2287
+ '(" print!" rust-builtin-formatting-macro
2288
2288
" \" abcd\" " font-lock-string-face
2289
2289
" /* " font-lock-comment-delimiter-face
2290
2290
" no-op */" font-lock-comment-face ))
2291
2291
; ; only interpolation
2292
2292
(rust-test-font-lock
2293
2293
" print!(\" {}\" ); { /* no-op */ }"
2294
- '(" print!" rust-builtin-formatting-macro-face
2294
+ '(" print!" rust-builtin-formatting-macro
2295
2295
" \" " font-lock-string-face
2296
- " {}" rust-string-interpolation-face
2296
+ " {}" rust-string-interpolation
2297
2297
" \" " font-lock-string-face
2298
2298
" /* " font-lock-comment-delimiter-face
2299
2299
" no-op */" font-lock-comment-face ))
2300
2300
; ; text + interpolation
2301
2301
(rust-test-font-lock
2302
2302
" print!(\" abcd {}\" , foo); { /* no-op */ }"
2303
- '(" print!" rust-builtin-formatting-macro-face
2303
+ '(" print!" rust-builtin-formatting-macro
2304
2304
" \" abcd " font-lock-string-face
2305
- " {}" rust-string-interpolation-face
2305
+ " {}" rust-string-interpolation
2306
2306
" \" " font-lock-string-face
2307
2307
" /* " font-lock-comment-delimiter-face
2308
2308
" no-op */" font-lock-comment-face ))
2309
2309
; ; text + interpolation with specification
2310
2310
(rust-test-font-lock
2311
2311
" print!(\" abcd {0}\" , foo); { /* no-op */ }"
2312
- '(" print!" rust-builtin-formatting-macro-face
2312
+ '(" print!" rust-builtin-formatting-macro
2313
2313
" \" abcd " font-lock-string-face
2314
- " {0}" rust-string-interpolation-face
2314
+ " {0}" rust-string-interpolation
2315
2315
" \" " font-lock-string-face
2316
2316
" /* " font-lock-comment-delimiter-face
2317
2317
" no-op */" font-lock-comment-face ))
2318
2318
; ; text + interpolation with specification and escape
2319
2319
(rust-test-font-lock
2320
2320
" print!(\" abcd {0}}}\" , foo); { /* no-op */ }"
2321
- '(" print!" rust-builtin-formatting-macro-face
2321
+ '(" print!" rust-builtin-formatting-macro
2322
2322
" \" abcd " font-lock-string-face
2323
- " {0}" rust-string-interpolation-face
2323
+ " {0}" rust-string-interpolation
2324
2324
" }}\" " font-lock-string-face
2325
2325
" /* " font-lock-comment-delimiter-face
2326
2326
" no-op */" font-lock-comment-face ))
2327
2327
; ; multiple pairs
2328
2328
(rust-test-font-lock
2329
2329
" print!(\" abcd {0} efgh {1}\" , foo, bar); { /* no-op */ }"
2330
- '(" print!" rust-builtin-formatting-macro-face
2330
+ '(" print!" rust-builtin-formatting-macro
2331
2331
" \" abcd " font-lock-string-face
2332
- " {0}" rust-string-interpolation-face
2332
+ " {0}" rust-string-interpolation
2333
2333
" efgh " font-lock-string-face
2334
- " {1}" rust-string-interpolation-face
2334
+ " {1}" rust-string-interpolation
2335
2335
" \" " font-lock-string-face
2336
2336
" /* " font-lock-comment-delimiter-face
2337
2337
" no-op */" font-lock-comment-face ))
2338
2338
; ; println
2339
2339
(rust-test-font-lock
2340
2340
" println!(\" abcd {0} efgh {1}\" , foo, bar); { /* no-op */ }"
2341
- '(" println!" rust-builtin-formatting-macro-face
2341
+ '(" println!" rust-builtin-formatting-macro
2342
2342
" \" abcd " font-lock-string-face
2343
- " {0}" rust-string-interpolation-face
2343
+ " {0}" rust-string-interpolation
2344
2344
" efgh " font-lock-string-face
2345
- " {1}" rust-string-interpolation-face
2345
+ " {1}" rust-string-interpolation
2346
2346
" \" " font-lock-string-face
2347
2347
" /* " font-lock-comment-delimiter-face
2348
2348
" no-op */" font-lock-comment-face ))
2349
2349
; ; eprint
2350
2350
(rust-test-font-lock
2351
2351
" eprint!(\" abcd {0} efgh {1}\" , foo, bar); { /* no-op */ }"
2352
- '(" eprint!" rust-builtin-formatting-macro-face
2352
+ '(" eprint!" rust-builtin-formatting-macro
2353
2353
" \" abcd " font-lock-string-face
2354
- " {0}" rust-string-interpolation-face
2354
+ " {0}" rust-string-interpolation
2355
2355
" efgh " font-lock-string-face
2356
- " {1}" rust-string-interpolation-face
2356
+ " {1}" rust-string-interpolation
2357
2357
" \" " font-lock-string-face
2358
2358
" /* " font-lock-comment-delimiter-face
2359
2359
" no-op */" font-lock-comment-face ))
2360
2360
; ; eprintln
2361
2361
(rust-test-font-lock
2362
2362
" eprintln!(\" abcd {0} efgh {1}\" , foo, bar); { /* no-op */ }"
2363
- '(" eprintln!" rust-builtin-formatting-macro-face
2363
+ '(" eprintln!" rust-builtin-formatting-macro
2364
2364
" \" abcd " font-lock-string-face
2365
- " {0}" rust-string-interpolation-face
2365
+ " {0}" rust-string-interpolation
2366
2366
" efgh " font-lock-string-face
2367
- " {1}" rust-string-interpolation-face
2367
+ " {1}" rust-string-interpolation
2368
2368
" \" " font-lock-string-face
2369
2369
" /* " font-lock-comment-delimiter-face
2370
2370
" no-op */" font-lock-comment-face ))
2371
2371
; ; format
2372
2372
(rust-test-font-lock
2373
2373
" format!(\" abcd {0} efgh {1}\" , foo, bar); { /* no-op */ }"
2374
- '(" format!" rust-builtin-formatting-macro-face
2374
+ '(" format!" rust-builtin-formatting-macro
2375
2375
" \" abcd " font-lock-string-face
2376
- " {0}" rust-string-interpolation-face
2376
+ " {0}" rust-string-interpolation
2377
2377
" efgh " font-lock-string-face
2378
- " {1}" rust-string-interpolation-face
2378
+ " {1}" rust-string-interpolation
2379
2379
" \" " font-lock-string-face
2380
2380
" /* " font-lock-comment-delimiter-face
2381
2381
" no-op */" font-lock-comment-face ))
2382
2382
; ; print + raw string
2383
2383
(rust-test-font-lock
2384
2384
" format!(r\" abcd {0} efgh {1}\" , foo, bar); { /* no-op */ }"
2385
- '(" format!" rust-builtin-formatting-macro-face
2385
+ '(" format!" rust-builtin-formatting-macro
2386
2386
" r\" abcd " font-lock-string-face
2387
- " {0}" rust-string-interpolation-face
2387
+ " {0}" rust-string-interpolation
2388
2388
" efgh " font-lock-string-face
2389
- " {1}" rust-string-interpolation-face
2389
+ " {1}" rust-string-interpolation
2390
2390
" \" " font-lock-string-face
2391
2391
" /* " font-lock-comment-delimiter-face
2392
2392
" no-op */" font-lock-comment-face ))
2393
2393
; ; print + raw string with hash
2394
2394
(rust-test-font-lock
2395
2395
" format!(r#\" abcd {0} efgh {1}\" #, foo, bar); { /* no-op */ }"
2396
- '(" format!" rust-builtin-formatting-macro-face
2396
+ '(" format!" rust-builtin-formatting-macro
2397
2397
" r#\" abcd " font-lock-string-face
2398
- " {0}" rust-string-interpolation-face
2398
+ " {0}" rust-string-interpolation
2399
2399
" efgh " font-lock-string-face
2400
- " {1}" rust-string-interpolation-face
2400
+ " {1}" rust-string-interpolation
2401
2401
" \" #" font-lock-string-face
2402
2402
" /* " font-lock-comment-delimiter-face
2403
2403
" no-op */" font-lock-comment-face ))
2404
2404
; ; print + raw string with two hashes
2405
2405
(rust-test-font-lock
2406
2406
" format!(r##\" abcd {0} efgh {1}\" ##, foo, bar); { /* no-op */ }"
2407
- '(" format!" rust-builtin-formatting-macro-face
2407
+ '(" format!" rust-builtin-formatting-macro
2408
2408
" r##\" abcd " font-lock-string-face
2409
- " {0}" rust-string-interpolation-face
2409
+ " {0}" rust-string-interpolation
2410
2410
" efgh " font-lock-string-face
2411
- " {1}" rust-string-interpolation-face
2411
+ " {1}" rust-string-interpolation
2412
2412
" \" ##" font-lock-string-face
2413
2413
" /* " font-lock-comment-delimiter-face
2414
2414
" no-op */" font-lock-comment-face )))
2415
2415
2416
2416
(ert-deftest rust-write-macro-font-lock ()
2417
2417
(rust-test-font-lock
2418
2418
" write!(f, \" abcd {0}}} efgh {1}\" , foo, bar); { /* no-op */ }"
2419
- '(" write!" rust-builtin-formatting-macro-face
2419
+ '(" write!" rust-builtin-formatting-macro
2420
2420
" \" abcd " font-lock-string-face
2421
- " {0}" rust-string-interpolation-face
2421
+ " {0}" rust-string-interpolation
2422
2422
" }} efgh " font-lock-string-face
2423
- " {1}" rust-string-interpolation-face
2423
+ " {1}" rust-string-interpolation
2424
2424
" \" " font-lock-string-face
2425
2425
" /* " font-lock-comment-delimiter-face
2426
2426
" no-op */" font-lock-comment-face ))
2427
2427
(rust-test-font-lock
2428
2428
" writeln!(f, \" abcd {0}}} efgh {1}\" , foo, bar); { /* no-op */ }"
2429
- '(" writeln!" rust-builtin-formatting-macro-face
2429
+ '(" writeln!" rust-builtin-formatting-macro
2430
2430
" \" abcd " font-lock-string-face
2431
- " {0}" rust-string-interpolation-face
2431
+ " {0}" rust-string-interpolation
2432
2432
" }} efgh " font-lock-string-face
2433
- " {1}" rust-string-interpolation-face
2433
+ " {1}" rust-string-interpolation
2434
2434
" \" " font-lock-string-face
2435
2435
" /* " font-lock-comment-delimiter-face
2436
2436
" no-op */" font-lock-comment-face ))
2437
2437
(rust-test-font-lock
2438
2438
" println!(\" 123\" ); eprintln!(\" 123\" ); cprintln!(\" 123\" );"
2439
- '(" println!" rust-builtin-formatting-macro-face
2439
+ '(" println!" rust-builtin-formatting-macro
2440
2440
" \" 123\" " font-lock-string-face
2441
- " eprintln!" rust-builtin-formatting-macro-face
2441
+ " eprintln!" rust-builtin-formatting-macro
2442
2442
" \" 123\" " font-lock-string-face
2443
2443
" cprintln!" font-lock-preprocessor-face
2444
2444
" \" 123\" " font-lock-string-face )))
0 commit comments