We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 88dd764 commit df02bcaCopy full SHA for df02bca
compiler/rustc_infer/src/infer/canonical/query_response.rs
@@ -457,7 +457,7 @@ impl<'tcx> InferCtxt<'tcx> {
457
// Create result arguments: if we found a value for a
458
// given variable in the loop above, use that. Otherwise, use
459
// a fresh inference variable.
460
- let mut var_values = Vec::new();
+ let mut var_values = Vec::with_capacity(query_response.variables.len());
461
for (index, info) in query_response.variables.iter().enumerate() {
462
let value = if info.universe() != ty::UniverseIndex::ROOT {
463
// A variable from inside a binder of the query. While ideally these shouldn't
0 commit comments