Skip to content

Commit

Permalink
Change the const stab default for internal const fns
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk committed Dec 13, 2019
1 parent 395a789 commit 83b8a56
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/librustc/ty/constness.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 83b8a56

Please sign in to comment.