]> git.lizzy.rs Git - rust.git/commitdiff
No need to call `is_min_const_fn` for side-effects
authorDylan MacKenzie <ecstaticmorse@gmail.com>
Fri, 25 Sep 2020 20:50:18 +0000 (13:50 -0700)
committerDylan MacKenzie <ecstaticmorse@gmail.com>
Fri, 25 Sep 2020 21:31:32 +0000 (14:31 -0700)
compiler/rustc_mir/src/transform/check_consts/validation.rs

index dc28ba46d7cbbe0cf7fca6a3c9e1e24fbd34c7b3..3a5ae4c8348f599cffbe53fb1c09f386c5811a1a 100644 (file)
@@ -204,9 +204,6 @@ pub fn new(ccx: &'mir ConstCx<'mir, 'tcx>) -> Self {
     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`.