Skip to content

Commit 83b8a56

Browse files
committed
Change the const stab default for internal const fns
1 parent 395a789 commit 83b8a56

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/librustc/ty/constness.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,13 @@ impl<'tcx> TyCtxt<'tcx> {
108108
false
109109
}
110110
} else {
111-
// Internal functions need not conform to min const fn unless used inside stable
112-
// const fns. Annotate the internal function with a const stability attribute if
113-
// you need this.
114-
false
111+
// Internal functions are forced to conform to min const fn.
112+
// Annotate the internal function with a const stability attribute if
113+
// you need to use unstable features.
114+
// Note: this is an arbitrary choice that does not affect stability or const
115+
// safety or anything, it just changes whether we need to annotate some
116+
// internal functions with `rustc_const_stable` or with `rustc_const_unstable`
117+
true
115118
},
116119
// Everything else needs to conform, because it would be callable from
117120
// other `min_const_fn` functions.

0 commit comments

Comments
 (0)