File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
src/tools/compiletest/src/runtest Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -145,12 +145,13 @@ impl TestCx<'_> {
145145 self . fatal_proc_rec ( "test run succeeded!" , & proc_res) ;
146146 }
147147
148+ let output_to_check = self . get_output ( & proc_res) ;
148149 if !self . props . error_patterns . is_empty ( ) || !self . props . regex_error_patterns . is_empty ( )
149150 {
150151 // "// error-pattern" comments
151- let output_to_check = self . get_output ( & proc_res) ;
152152 self . check_all_error_patterns ( & output_to_check, & proc_res, pm) ;
153153 }
154+ self . check_forbid_output ( & output_to_check, & proc_res)
154155 }
155156
156157 debug ! (
@@ -181,11 +182,12 @@ impl TestCx<'_> {
181182 ) ;
182183 self . fatal ( & msg) ;
183184 }
185+ let output_to_check = self . get_output ( & proc_res) ;
184186 if check_patterns {
185187 // "// error-pattern" comments
186- let output_to_check = self . get_output ( & proc_res) ;
187188 self . check_all_error_patterns ( & output_to_check, & proc_res, pm) ;
188189 }
190+ self . check_forbid_output ( & output_to_check, & proc_res) ;
189191
190192 if self . props . run_rustfix && self . config . compare_mode . is_none ( ) {
191193 // And finally, compile the fixed code and make sure it both
You can’t perform that action at this time.
0 commit comments