@@ -277,7 +277,7 @@ impl<'a> Visitor<'a> {
277277 fn record_parse_error_for_node (
278278 & mut self ,
279279 message : & str ,
280- args : & [ diagnostics:: Arg ] ,
280+ args : & [ diagnostics:: MessageArg ] ,
281281 node : Node ,
282282 status_page : bool ,
283283 ) {
@@ -307,7 +307,7 @@ impl<'a> Visitor<'a> {
307307 if node. is_missing ( ) {
308308 self . record_parse_error_for_node (
309309 "A parse error occurred (expected {} symbol). Check the syntax of the file. If the file is invalid, correct the error or {} the file from analysis." ,
310- & [ diagnostics:: Arg :: Code ( node. kind ( ) ) , diagnostics:: Arg :: Link ( "exclude" , "https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/customizing-code-scanning" ) ] ,
310+ & [ diagnostics:: MessageArg :: Code ( node. kind ( ) ) , diagnostics:: MessageArg :: Link ( "exclude" , "https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/customizing-code-scanning" ) ] ,
311311 node,
312312 true ,
313313 ) ;
@@ -316,7 +316,7 @@ impl<'a> Visitor<'a> {
316316 if node. is_error ( ) {
317317 self . record_parse_error_for_node (
318318 "A parse error occurred. Check the syntax of the file. If the file is invalid, correct the error or {} the file from analysis." ,
319- & [ diagnostics:: Arg :: Link ( "exclude" , "https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/customizing-code-scanning" ) ] ,
319+ & [ diagnostics:: MessageArg :: Link ( "exclude" , "https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/customizing-code-scanning" ) ] ,
320320 node,
321321 true ,
322322 ) ;
@@ -409,7 +409,7 @@ impl<'a> Visitor<'a> {
409409 . location ( self . path , start_line, start_column, end_line, end_column)
410410 . message (
411411 "Unknown table type: {}" ,
412- & [ diagnostics:: Arg :: Code ( node. kind ( ) ) ] ,
412+ & [ diagnostics:: MessageArg :: Code ( node. kind ( ) ) ] ,
413413 ) ,
414414 ) ;
415415
@@ -461,10 +461,10 @@ impl<'a> Visitor<'a> {
461461 self . record_parse_error_for_node (
462462 "Type mismatch for field {}::{} with type {} != {}" ,
463463 & [
464- diagnostics:: Arg :: Code ( node. kind ( ) ) ,
465- diagnostics:: Arg :: Code ( child_node. field_name . unwrap_or ( "child" ) ) ,
466- diagnostics:: Arg :: Code ( & format ! ( "{:?}" , child_node. type_name) ) ,
467- diagnostics:: Arg :: Code ( & format ! ( "{:?}" , field. type_info) ) ,
464+ diagnostics:: MessageArg :: Code ( node. kind ( ) ) ,
465+ diagnostics:: MessageArg :: Code ( child_node. field_name . unwrap_or ( "child" ) ) ,
466+ diagnostics:: MessageArg :: Code ( & format ! ( "{:?}" , child_node. type_name) ) ,
467+ diagnostics:: MessageArg :: Code ( & format ! ( "{:?}" , field. type_info) ) ,
468468 ] ,
469469 * node,
470470 false ,
@@ -474,9 +474,9 @@ impl<'a> Visitor<'a> {
474474 self . record_parse_error_for_node (
475475 "Value for unknown field: {}::{} and type {}" ,
476476 & [
477- diagnostics:: Arg :: Code ( node. kind ( ) ) ,
478- diagnostics:: Arg :: Code ( & child_node. field_name . unwrap_or ( "child" ) ) ,
479- diagnostics:: Arg :: Code ( & format ! ( "{:?}" , child_node. type_name) ) ,
477+ diagnostics:: MessageArg :: Code ( node. kind ( ) ) ,
478+ diagnostics:: MessageArg :: Code ( & child_node. field_name . unwrap_or ( "child" ) ) ,
479+ diagnostics:: MessageArg :: Code ( & format ! ( "{:?}" , child_node. type_name) ) ,
480480 ] ,
481481 * node,
482482 false ,
@@ -516,8 +516,8 @@ impl<'a> Visitor<'a> {
516516 self . record_parse_error_for_node (
517517 "Too many values for field: {}::{}" ,
518518 & [
519- diagnostics:: Arg :: Code ( node. kind ( ) ) ,
520- diagnostics:: Arg :: Code ( table_name) ,
519+ diagnostics:: MessageArg :: Code ( node. kind ( ) ) ,
520+ diagnostics:: MessageArg :: Code ( table_name) ,
521521 ] ,
522522 * node,
523523 false ,
@@ -637,8 +637,8 @@ fn location_for(visitor: &mut Visitor, n: Node) -> (usize, usize, usize, usize)
637637 . message (
638638 "Cannot correct end column value: end_byte index {} is not in range [1,{}]." ,
639639 & [
640- diagnostics:: Arg :: Code ( & index. to_string ( ) ) ,
641- diagnostics:: Arg :: Code ( & source. len ( ) . to_string ( ) ) ,
640+ diagnostics:: MessageArg :: Code ( & index. to_string ( ) ) ,
641+ diagnostics:: MessageArg :: Code ( & source. len ( ) . to_string ( ) ) ,
642642 ] ,
643643 )
644644 . severity ( diagnostics:: Severity :: Error ) ,
0 commit comments