diff options
Diffstat (limited to 'compiler/rustc_builtin_macros/src/deriving/clone.rs')
| -rw-r--r-- | compiler/rustc_builtin_macros/src/deriving/clone.rs | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/compiler/rustc_builtin_macros/src/deriving/clone.rs b/compiler/rustc_builtin_macros/src/deriving/clone.rs index 78f50ba8d29..c3656e8244f 100644 --- a/compiler/rustc_builtin_macros/src/deriving/clone.rs +++ b/compiler/rustc_builtin_macros/src/deriving/clone.rs @@ -114,10 +114,13 @@ fn cs_clone_simple( // type parameters. } else { // let _: AssertParamIsClone<FieldTy>; - super::assert_ty_bounds(cx, &mut stmts, field.ty.clone(), field.span, &[ - sym::clone, - sym::AssertParamIsClone, - ]); + super::assert_ty_bounds( + cx, + &mut stmts, + field.ty.clone(), + field.span, + &[sym::clone, sym::AssertParamIsClone], + ); } } }; @@ -126,10 +129,13 @@ fn cs_clone_simple( // Just a single assertion for unions, that the union impls `Copy`. // let _: AssertParamIsCopy<Self>; let self_ty = cx.ty_path(cx.path_ident(trait_span, Ident::with_dummy_span(kw::SelfUpper))); - super::assert_ty_bounds(cx, &mut stmts, self_ty, trait_span, &[ - sym::clone, - sym::AssertParamIsCopy, - ]); + super::assert_ty_bounds( + cx, + &mut stmts, + self_ty, + trait_span, + &[sym::clone, sym::AssertParamIsCopy], + ); } else { match *substr.fields { StaticStruct(vdata, ..) => { |
