@@ -145,6 +145,8 @@ pub struct TestProps {
145
145
pub run_rustfix : bool ,
146
146
// If true, `rustfix` will only apply `MachineApplicable` suggestions.
147
147
pub rustfix_only_machine_applicable : bool ,
148
+ // Lints to ignore when checking diagnostics.
149
+ pub ignored_diaglints : Vec < String > ,
148
150
pub assembly_output : Option < String > ,
149
151
// If true, the test is expected to ICE
150
152
pub should_ice : bool ,
@@ -188,6 +190,7 @@ impl TestProps {
188
190
failure_status : -1 ,
189
191
run_rustfix : false ,
190
192
rustfix_only_machine_applicable : false ,
193
+ ignored_diaglints : vec ! [ ] ,
191
194
assembly_output : None ,
192
195
should_ice : false ,
193
196
stderr_per_bitwidth : false ,
@@ -358,6 +361,10 @@ impl TestProps {
358
361
config. parse_rustfix_only_machine_applicable ( ln) ;
359
362
}
360
363
364
+ if let Some ( ignored_diaglint) = config. parse_ignored_diaglints ( ln) {
365
+ self . ignored_diaglints . push ( ignored_diaglint) ;
366
+ }
367
+
361
368
if self . assembly_output . is_none ( ) {
362
369
self . assembly_output = config. parse_assembly_output ( ln) ;
363
370
}
@@ -618,6 +625,10 @@ impl Config {
618
625
self . parse_name_directive ( line, "stderr-per-bitwidth" )
619
626
}
620
627
628
+ fn parse_ignored_diaglints ( & self , line : & str ) -> Option < String > {
629
+ self . parse_name_value_directive ( line, "ignored-diaglints" ) . map ( |r| r. trim ( ) . to_string ( ) )
630
+ }
631
+
621
632
fn parse_assembly_output ( & self , line : & str ) -> Option < String > {
622
633
self . parse_name_value_directive ( line, "assembly-output" ) . map ( |r| r. trim ( ) . to_string ( ) )
623
634
}
0 commit comments