We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 29aebf4 commit f5c3315Copy full SHA for f5c3315
src/librustc_mir/transform/promote_consts.rs
@@ -735,6 +735,14 @@ pub fn validate_candidates(
735
// and `#[rustc_args_required_const]` arguments here.
736
737
let is_promotable = validator.validate_candidate(candidate).is_ok();
738
+
739
+ if validator.explicit && !is_promotable {
740
+ ccx.tcx.sess.delay_span_bug(
741
+ ccx.body.span,
742
+ "Explicit promotion requested, but failed to promote",
743
+ );
744
+ }
745
746
match candidate {
747
Candidate::Argument { bb, index } if !is_promotable => {
748
let span = ccx.body[bb].terminator().source_info.span;
0 commit comments