Change error in fn_queries to delay_span_bug

This should be caught by the new check in `rustc_passes`. At some point,
this function will be removed entirely.
This commit is contained in:
Dylan MacKenzie 2020-09-25 14:08:44 -07:00
parent 61d86fa06c
commit 11bfc60a4b

View File

@ -50,7 +50,7 @@ pub fn is_min_const_fn(tcx: TyCtxt<'_>, def_id: DefId) -> bool {
None => {
if let Some(stab) = tcx.lookup_stability(def_id) {
if stab.level.is_stable() {
tcx.sess.span_err(
tcx.sess.delay_span_bug(
tcx.def_span(def_id),
"stable const functions must have either `rustc_const_stable` or \
`rustc_const_unstable` attribute",