From 83b8a561a1baf08f678c501de602369d3158f1ae Mon Sep 17 00:00:00 2001 From: Oliver Scherer Date: Sun, 8 Dec 2019 12:58:41 +0100 Subject: [PATCH] Change the const stab default for internal const fns --- src/librustc/ty/constness.rs | 11 +++++++---- 1 file 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.