@@ -215,10 +215,10 @@ struct PrintableStruct(Box<i32>);
215
215
// fixes https://github.com/rust-lang/sublime-rust/issues/144
216
216
fn factory ( ) -> Box < Fn ( i32 ) -> i32 > {
217
217
// <- storage.type.function
218
- // ^^^^^^^ entity.name.function
218
+ // ^^^^^^^ entity.name.function
219
219
// ^^^^^^^^^^^^^^ meta.generic
220
- // ^^ storage.type
221
- // ^^ storage.type
220
+ // ^^ storage.type
221
+ // ^^ storage.type
222
222
// ^^ punctuation.separator.generic
223
223
224
224
Box :: new ( |x| x + 1 )
@@ -924,7 +924,7 @@ pub fn next_lex2</* block */T/* comments */:/* everywhere */
924
924
/* help */ PartialOrd // Possibly too many comments
925
925
// ^^^^^^^^^^ comment.block.rust
926
926
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ comment.line.double-slash.rust
927
- > (
927
+ > (
928
928
/* block2 */ data2: & mut [ T ] // line
929
929
// ^^^^^^^^^^^^ source.rust meta.function.rust meta.function.parameters.rust comment.block.rust
930
930
// ^^^^^^^ source.rust meta.function.rust meta.function.parameters.rust comment.line.double-slash.rust
@@ -989,3 +989,33 @@ impl<T> Iterator for Fibonacci<T>
989
989
pub const FOO : Option <[ i32 ; 1 ] > = Some ( [ 1 ] ) ;
990
990
// ^ punctuation.definition.group.begin.rust
991
991
// ^ punctuation.definition.group.end.rust
992
+
993
+ pub fn macro_tests( ) {
994
+ println!( ) ;
995
+ // ^^^^^^^^ support.macro.rust
996
+ println!( "Example" ) ;
997
+ // ^^^^^^^^ support.macro.rust
998
+ // ^ punctuation.definition.group.begin
999
+ // ^^^^^^^^^ string.quoted.double.rust
1000
+ // ^ punctuation.definition.group.end
1001
+ println!( "Example {} {message}" , "test" , message="hi" ) ;
1002
+ // ^^ constant.other.placeholder.rust
1003
+ // ^^^^^^^^^ constant.other.placeholder.rust
1004
+ panic!( ) ;
1005
+ // ^^^^^^ support.macro.rust
1006
+ panic!( "Example" ) ;
1007
+ // ^^^^^^ support.macro.rust
1008
+ // ^ punctuation.definition.group.begin
1009
+ // ^^^^^^^^^ string.quoted.double.rust
1010
+ // ^ punctuation.definition.group.end
1011
+ panic!( "Example {} {message}" , "test" , message="hi" ) ;
1012
+ // ^^ constant.other.placeholder.rust
1013
+ // ^^^^^^^^^ constant.other.placeholder.rust
1014
+ format_args!( "invalid type: {}, expected {}" , unexp, exp) ;
1015
+ // ^^^^^^^^^^^^ support.macro.rust
1016
+ // ^^ constant.other.placeholder.rust
1017
+ // ^^ constant.other.placeholder.rust
1018
+ unreachable!( "{:?}" , e) ;
1019
+ // ^^^^^^^^^^^^ support.macro.rust
1020
+ // ^^^^ constant.other.placeholder.rust
1021
+ }
0 commit comments