]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_type_ir/src/sty.rs
Auto merge of #104334 - compiler-errors:ufcs-sugg-wrong-def-id, r=estebank
[rust.git] / compiler / rustc_type_ir / src / sty.rs
index e9ffbca96280d85503651104987002c0d733310e..f30ae82d7cdd2b4fd4d596c0e207f016efa4aada 100644 (file)
@@ -250,9 +250,9 @@ fn clone(&self) -> Self {
         match self {
             Bool => Bool,
             Char => Char,
-            Int(i) => Int(i.clone()),
-            Uint(u) => Uint(u.clone()),
-            Float(f) => Float(f.clone()),
+            Int(i) => Int(*i),
+            Uint(u) => Uint(*u),
+            Float(f) => Float(*f),
             Adt(d, s) => Adt(d.clone(), s.clone()),
             Foreign(d) => Foreign(d.clone()),
             Str => Str,
@@ -262,7 +262,7 @@ fn clone(&self) -> Self {
             Ref(r, t, m) => Ref(r.clone(), t.clone(), m.clone()),
             FnDef(d, s) => FnDef(d.clone(), s.clone()),
             FnPtr(s) => FnPtr(s.clone()),
-            Dynamic(p, r, repr) => Dynamic(p.clone(), r.clone(), repr.clone()),
+            Dynamic(p, r, repr) => Dynamic(p.clone(), r.clone(), *repr),
             Closure(d, s) => Closure(d.clone(), s.clone()),
             Generator(d, s, m) => Generator(d.clone(), s.clone(), m.clone()),
             GeneratorWitness(g) => GeneratorWitness(g.clone()),
@@ -270,7 +270,7 @@ fn clone(&self) -> Self {
             Tuple(t) => Tuple(t.clone()),
             Alias(k, p) => Alias(*k, p.clone()),
             Param(p) => Param(p.clone()),
-            Bound(d, b) => Bound(d.clone(), b.clone()),
+            Bound(d, b) => Bound(*d, b.clone()),
             Placeholder(p) => Placeholder(p.clone()),
             Infer(t) => Infer(t.clone()),
             Error(e) => Error(e.clone()),
@@ -936,7 +936,7 @@ impl<I: Interner> Clone for RegionKind<I> {
     fn clone(&self) -> Self {
         match self {
             ReEarlyBound(r) => ReEarlyBound(r.clone()),
-            ReLateBound(d, r) => ReLateBound(d.clone(), r.clone()),
+            ReLateBound(d, r) => ReLateBound(*d, r.clone()),
             ReFree(r) => ReFree(r.clone()),
             ReStatic => ReStatic,
             ReVar(r) => ReVar(r.clone()),