File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed
Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,9 @@ fn fn_string(s: String) {
3434 let _ = s;
3535}
3636
37+ #[ instrument( fields( keywords. impl . type . fn = _arg) , skip( _arg) ) ]
38+ fn fn_keyword_ident_in_field ( _arg : & str ) { }
39+
3740#[ derive( Debug ) ]
3841struct HasField {
3942 my_field : & ' static str ,
@@ -146,6 +149,16 @@ fn string_field() {
146149 } ) ;
147150}
148151
152+ #[ test]
153+ fn keyword_ident_in_field_name ( ) {
154+ let span = expect:: span ( ) . with_field (
155+ expect:: field ( "keywords.impl.type.fn" )
156+ . with_value ( & "test" )
157+ . only ( ) ,
158+ ) ;
159+ run_test ( span, || fn_keyword_ident_in_field ( "test" ) ) ;
160+ }
161+
149162fn run_test < F : FnOnce ( ) -> T , T > ( span : NewSpan , fun : F ) {
150163 let ( collector, handle) = collector:: mock ( )
151164 . new_span ( span)
Original file line number Diff line number Diff line change @@ -3069,8 +3069,8 @@ macro_rules! level_to_log {
30693069#[ doc( hidden) ]
30703070#[ macro_export]
30713071macro_rules! __tracing_stringify {
3072- ( $s : expr ) => {
3073- stringify!( $s )
3072+ ( $( $t : tt ) * ) => {
3073+ stringify!( $( $t ) * )
30743074 } ;
30753075}
30763076
You can’t perform that action at this time.
0 commit comments