about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRemy Rakic <remy.rakic@gmail.com>2019-12-05 17:41:25 +0100
committerRemy Rakic <remy.rakic@gmail.com>2019-12-05 17:41:25 +0100
commit2d83b7608070d6ad250e8cd6d9d5a7d4be628dc4 (patch)
treeb673bd31a20af2b2aef0a3fab16da616900d6fe7
parent4a760c6ea12a1d15334879b40787f6f0a7056d9d (diff)
downloadrust-2d83b7608070d6ad250e8cd6d9d5a7d4be628dc4.tar.gz
rust-2d83b7608070d6ad250e8cd6d9d5a7d4be628dc4.zip
update comment to explain the importance of this check more clearly
-rw-r--r--src/librustc_mir/transform/check_consts/mod.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/librustc_mir/transform/check_consts/mod.rs b/src/librustc_mir/transform/check_consts/mod.rs
index abad6222890..82ffafbedf8 100644
--- a/src/librustc_mir/transform/check_consts/mod.rs
+++ b/src/librustc_mir/transform/check_consts/mod.rs
@@ -79,8 +79,9 @@ impl ConstKind {
 
             // Note: this is deliberately checking for `is_const_fn_raw`, as the `is_const_fn`
             // checks take into account the `rustc_const_unstable` attribute combined with enabled
-            // feature gates. An unstable `const fn` could otherwise be considered "not const"
-            // by const qualification. See issue #67053 for more details.
+            // feature gates. Otherwise, const qualification would _not check_ whether this
+            // function body follows the `const fn` rules, as an unstable `const fn` would
+            // be considered "not const". More details are available in issue #67053.
             HirKind::Fn if tcx.is_const_fn_raw(def_id) => ConstKind::ConstFn,
             HirKind::Fn => return None,