@@ -181,8 +181,6 @@ pub struct Validator<'mir, 'tcx> {
181181 /// The span of the current statement.
182182 span : Span ,
183183
184- const_checking_stopped : bool ,
185-
186184 error_emitted : bool ,
187185 secondary_errors : Vec < Diagnostic > ,
188186}
@@ -201,7 +199,6 @@ impl Validator<'mir, 'tcx> {
201199 span : ccx. body . span ,
202200 ccx,
203201 qualifs : Default :: default ( ) ,
204- const_checking_stopped : false ,
205202 error_emitted : false ,
206203 secondary_errors : Vec :: new ( ) ,
207204 }
@@ -289,12 +286,6 @@ impl Validator<'mir, 'tcx> {
289286 /// Emits an error at the given `span` if an expression cannot be evaluated in the current
290287 /// context.
291288 pub fn check_op_spanned < O : NonConstOp > ( & mut self , op : O , span : Span ) {
292- // HACK: This is for strict equivalence with the old `qualify_min_const_fn` pass, which
293- // only emitted one error per function. It should be removed and the test output updated.
294- if self . const_checking_stopped {
295- return ;
296- }
297-
298289 let gate = match op. status_in_item ( self . ccx ) {
299290 Status :: Allowed => return ,
300291
@@ -328,10 +319,6 @@ impl Validator<'mir, 'tcx> {
328319
329320 ops:: DiagnosticImportance :: Secondary => err. buffer ( & mut self . secondary_errors ) ,
330321 }
331-
332- if O :: STOPS_CONST_CHECKING {
333- self . const_checking_stopped = true ;
334- }
335322 }
336323
337324 fn check_static ( & mut self , def_id : DefId , span : Span ) {
0 commit comments