diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-09-29 13:31:30 +0200 |
|---|---|---|
| committer | Matthias Krüger <matthias.krueger@famsik.de> | 2024-09-29 13:31:30 +0200 |
| commit | 71cd918dc78c84d41bb89c2fc8effcfd000f4e3e (patch) | |
| tree | 515044518fc7db3857e2b19c2da3d4f1fc45b86f /compiler/rustc_pattern_analysis | |
| parent | 9903b256a2f5d57a912c6aa793d4373db30f9f9a (diff) | |
| download | rust-71cd918dc78c84d41bb89c2fc8effcfd000f4e3e.tar.gz rust-71cd918dc78c84d41bb89c2fc8effcfd000f4e3e.zip | |
cleanup: don't clone types that are Copy
Diffstat (limited to 'compiler/rustc_pattern_analysis')
| -rw-r--r-- | compiler/rustc_pattern_analysis/src/constructor.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_pattern_analysis/src/constructor.rs b/compiler/rustc_pattern_analysis/src/constructor.rs index 3cb7576154f..8fce4266345 100644 --- a/compiler/rustc_pattern_analysis/src/constructor.rs +++ b/compiler/rustc_pattern_analysis/src/constructor.rs @@ -735,10 +735,10 @@ impl<Cx: PatCx> Clone for Constructor<Cx> { Constructor::UnionField => Constructor::UnionField, Constructor::Bool(b) => Constructor::Bool(*b), Constructor::IntRange(range) => Constructor::IntRange(*range), - Constructor::F16Range(lo, hi, end) => Constructor::F16Range(lo.clone(), *hi, *end), - Constructor::F32Range(lo, hi, end) => Constructor::F32Range(lo.clone(), *hi, *end), - Constructor::F64Range(lo, hi, end) => Constructor::F64Range(lo.clone(), *hi, *end), - Constructor::F128Range(lo, hi, end) => Constructor::F128Range(lo.clone(), *hi, *end), + Constructor::F16Range(lo, hi, end) => Constructor::F16Range(*lo, *hi, *end), + Constructor::F32Range(lo, hi, end) => Constructor::F32Range(*lo, *hi, *end), + Constructor::F64Range(lo, hi, end) => Constructor::F64Range(*lo, *hi, *end), + Constructor::F128Range(lo, hi, end) => Constructor::F128Range(*lo, *hi, *end), Constructor::Str(value) => Constructor::Str(value.clone()), Constructor::Opaque(inner) => Constructor::Opaque(inner.clone()), Constructor::Or => Constructor::Or, |
