Skip to content

Commit

Permalink
Only check min_const_fn for const fns
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk committed Dec 3, 2019
1 parent f1bacb2 commit 52be0b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustc_mir/transform/check_consts/validation.rs
Expand Up @@ -201,7 +201,7 @@ impl Validator<'a, 'mir, 'tcx> {
let Item { tcx, body, def_id, const_kind, .. } = *self.item;

let use_min_const_fn_checks =
tcx.is_min_const_fn(def_id)
(const_kind == Some(ConstKind::ConstFn) && tcx.is_min_const_fn(def_id))
&& !tcx.sess.opts.debugging_opts.unleash_the_miri_inside_of_you;

if use_min_const_fn_checks {
Expand Down

0 comments on commit 52be0b0

Please sign in to comment.