Skip to content

Commit

Permalink
No need to call is_min_const_fn for side-effects
Browse files Browse the repository at this point in the history
  • Loading branch information
ecstatic-morse committed Sep 25, 2020
1 parent 11bfc60 commit 76c6f2d
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions compiler/rustc_mir/src/transform/check_consts/validation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,6 @@ impl Validator<'mir, 'tcx> {
pub fn check_body(&mut self) {
let ConstCx { tcx, body, def_id, .. } = *self.ccx;

// HACK: This function has side-effects???? Make sure we call it.
let _ = crate::const_eval::is_min_const_fn(tcx, def_id.to_def_id());

// The local type and predicate checks are not free and only relevant for `const fn`s.
if self.const_kind() == hir::ConstContext::ConstFn {
// Prevent const trait methods from being annotated as `stable`.
Expand Down

0 comments on commit 76c6f2d

Please sign in to comment.