We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2870891 commit c036594Copy full SHA for c036594
compiler/rustc_mir_transform/src/promote_consts.rs
@@ -970,6 +970,11 @@ fn promote_candidates<'tcx>(
970
// Visit candidates in reverse, in case they're nested.
971
debug!(promote_candidates = ?candidates);
972
973
+ // eagerly fail fast
974
+ if candidates.is_empty() {
975
+ return IndexVec::new();
976
+ }
977
+
978
let mut promotions = IndexVec::new();
979
980
let mut extra_statements = vec![];
0 commit comments