diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-10-12 21:38:06 +0200 |
|---|---|---|
| committer | Matthias Krüger <matthias.krueger@famsik.de> | 2024-10-23 22:22:58 +0200 |
| commit | d84d659cb523e1156be8f7657879eb168a3f7fd4 (patch) | |
| tree | 0339574eccbfef2e59c0a9b5c3e8713ba021d5f6 | |
| parent | 464f4057c28ef3c6ae4acb696ee27f7f3f2112ce (diff) | |
| download | rust-d84d659cb523e1156be8f7657879eb168a3f7fd4.tar.gz rust-d84d659cb523e1156be8f7657879eb168a3f7fd4.zip | |
clone range in a more obvious way
| -rw-r--r-- | compiler/rustc_infer/src/infer/type_variable.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/compiler/rustc_infer/src/infer/type_variable.rs b/compiler/rustc_infer/src/infer/type_variable.rs index 779ce976bec..2086483b94a 100644 --- a/compiler/rustc_infer/src/infer/type_variable.rs +++ b/compiler/rustc_infer/src/infer/type_variable.rs @@ -187,10 +187,7 @@ impl<'tcx> TypeVariableTable<'_, 'tcx> { value_count: usize, ) -> (Range<TyVid>, Vec<TypeVariableOrigin>) { let range = TyVid::from_usize(value_count)..TyVid::from_usize(self.num_vars()); - ( - range.start..range.end, - (range.start..range.end).map(|index| self.var_origin(index)).collect(), - ) + (range.clone(), range.map(|index| self.var_origin(index)).collect()) } /// Returns indices of all variables that are not yet |
