File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
src/tools/compiletest/src Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -3083,6 +3083,12 @@ impl<'test> TestCx<'test> {
30833083 . replace ( "\\ " , "/" ) // normalize for paths on windows
30843084 . replace ( "\r \n " , "\n " ) // normalize for linebreaks on windows
30853085 . replace ( "\t " , "\\ t" ) ; // makes tabs visible
3086+
3087+ // Remove test annotations like `//~ ERROR text` from the output,
3088+ // since they duplicate actual errors and make the output hard to read.
3089+ normalized = Regex :: new ( "\\ s*//~.*" ) . unwrap ( )
3090+ . replace_all ( & normalized, "" ) . into_owned ( ) ;
3091+
30863092 for rule in custom_rules {
30873093 let re = Regex :: new ( & rule. 0 ) . expect ( "bad regex in custom normalization rule" ) ;
30883094 normalized = re. replace_all ( & normalized, & rule. 1 [ ..] ) . into_owned ( ) ;
You can’t perform that action at this time.
0 commit comments