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