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> {
3083
3083
. replace ( "\\ " , "/" ) // normalize for paths on windows
3084
3084
. replace ( "\r \n " , "\n " ) // normalize for linebreaks on windows
3085
3085
. 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
+
3086
3092
for rule in custom_rules {
3087
3093
let re = Regex :: new ( & rule. 0 ) . expect ( "bad regex in custom normalization rule" ) ;
3088
3094
normalized = re. replace_all ( & normalized, & rule. 1 [ ..] ) . into_owned ( ) ;
You can’t perform that action at this time.
0 commit comments