diff --git a/src/librustc_data_structures/obligation_forest/mod.rs b/src/librustc_data_structures/obligation_forest/mod.rs index 37f4537f4b77..bcd041afc055 100644 --- a/src/librustc_data_structures/obligation_forest/mod.rs +++ b/src/librustc_data_structures/obligation_forest/mod.rs @@ -355,10 +355,9 @@ impl ObligationForest { let mut errors = vec![]; for (index, node) in self.nodes.iter().enumerate() { if let NodeState::Pending = node.state.get() { - let backtrace = self.error_at(index); errors.push(Error { error: error.clone(), - backtrace, + backtrace: self.error_at(index), }); } } @@ -439,10 +438,9 @@ impl ObligationForest { } ProcessResult::Error(err) => { stalled = false; - let backtrace = self.error_at(index); errors.push(Error { error: err, - backtrace, + backtrace: self.error_at(index), }); } }