about summary refs log tree commit diff
diff options
context:
space:
mode:
authorOliver Scherer <github35764891676564198441@oli-obk.de>2019-12-08 12:58:41 +0100
committerOliver Scherer <github35764891676564198441@oli-obk.de>2019-12-13 11:27:02 +0100
commit83b8a561a1baf08f678c501de602369d3158f1ae (patch)
treea72de9a0d990dbea24f034e6a92fc9c1614d501f
parent395a789def72f5da7fe789c51dcb193b81832755 (diff)
downloadrust-83b8a561a1baf08f678c501de602369d3158f1ae.tar.gz
rust-83b8a561a1baf08f678c501de602369d3158f1ae.zip
Change the const stab default for internal const fns
-rw-r--r--src/librustc/ty/constness.rs11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/librustc/ty/constness.rs b/src/librustc/ty/constness.rs
index 0f07b4abc6d..4dcf4db3b8e 100644
--- a/src/librustc/ty/constness.rs
+++ b/src/librustc/ty/constness.rs
@@ -108,10 +108,13 @@ impl<'tcx> TyCtxt<'tcx> {
                         false
                     }
                 } else {
-                    // Internal functions need not conform to min const fn unless used inside stable
-                    // const fns. Annotate the internal function with a const stability attribute if
-                    // you need this.
-                    false
+                    // Internal functions are forced to conform to min const fn.
+                    // Annotate the internal function with a const stability attribute if
+                    // you need to use unstable features.
+                    // Note: this is an arbitrary choice that does not affect stability or const
+                    // safety or anything, it just changes whether we need to annotate some
+                    // internal functions with `rustc_const_stable` or with `rustc_const_unstable`
+                    true
                 },
                 // Everything else needs to conform, because it would be callable from
                 // other `min_const_fn` functions.