Skip to content

Commit 2d83b76

Browse files
committed
update comment to explain the importance of this check more clearly
1 parent 4a760c6 commit 2d83b76

File tree

1 file changed

+3
-2
lines changed
  • src/librustc_mir/transform/check_consts

1 file changed

+3
-2
lines changed

src/librustc_mir/transform/check_consts/mod.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,9 @@ impl ConstKind {
7979

8080
// Note: this is deliberately checking for `is_const_fn_raw`, as the `is_const_fn`
8181
// checks take into account the `rustc_const_unstable` attribute combined with enabled
82-
// feature gates. An unstable `const fn` could otherwise be considered "not const"
83-
// by const qualification. See issue #67053 for more details.
82+
// feature gates. Otherwise, const qualification would _not check_ whether this
83+
// function body follows the `const fn` rules, as an unstable `const fn` would
84+
// be considered "not const". More details are available in issue #67053.
8485
HirKind::Fn if tcx.is_const_fn_raw(def_id) => ConstKind::ConstFn,
8586
HirKind::Fn => return None,
8687

0 commit comments

Comments
 (0)