Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion compiler/rustc_next_trait_solver/src/solve/eval_ctxt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1001,7 +1001,8 @@ where
) -> Result<Option<Certainty>, NoSolutionOrRerunNonErased> {
// If this loop did not result in any progress, what's our final certainty.
let mut unchanged_certainty = Some(Certainty::Yes);
for (source, goal, stalled_on) in mem::take(&mut self.nested_goals) {
let new_nested_goals = Vec::with_capacity(self.nested_goals.len());
for (source, goal, stalled_on) in mem::replace(&mut self.nested_goals, new_nested_goals) {
// We never handle `NormalizesTo` as a nested goal
debug_assert!(!matches!(
goal.predicate.kind().skip_binder(),
Expand Down
Loading