diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:13 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:13 +0000 |
commit | 218caa410aa38c29984be31a5229b9fa717560ee (patch) | |
tree | c54bd55eeb6e4c508940a30e94c0032fbd45d677 /compiler/rustc_builtin_macros/src/deriving/clone.rs | |
parent | Releasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-218caa410aa38c29984be31a5229b9fa717560ee.tar.xz rustc-218caa410aa38c29984be31a5229b9fa717560ee.zip |
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'compiler/rustc_builtin_macros/src/deriving/clone.rs')
-rw-r--r-- | compiler/rustc_builtin_macros/src/deriving/clone.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/compiler/rustc_builtin_macros/src/deriving/clone.rs b/compiler/rustc_builtin_macros/src/deriving/clone.rs index d59b3b8c8..ef5a75f42 100644 --- a/compiler/rustc_builtin_macros/src/deriving/clone.rs +++ b/compiler/rustc_builtin_macros/src/deriving/clone.rs @@ -20,7 +20,7 @@ pub fn expand_deriving_clone( // some additional `AssertParamIsClone` assertions. // // We can use the simple form if either of the following are true. - // - The type derives Copy and there are no generic parameters. (If we + // - The type derives Copy and there are no generic parameters. (If we // used the simple form with generics, we'd have to bound the generics // with Clone + Copy, and then there'd be no Clone impl at all if the // user fills in something that is Clone but not Copy. After @@ -82,7 +82,7 @@ pub fn expand_deriving_clone( nonself_args: Vec::new(), ret_ty: Self_, attributes: attrs, - unify_fieldless_variants: false, + fieldless_variants_strategy: FieldlessVariantsStrategy::Default, combine_substructure: substructure, }], associated_types: Vec::new(), @@ -177,7 +177,9 @@ fn cs_clone( all_fields = af; vdata = &variant.data; } - EnumTag(..) => cx.span_bug(trait_span, &format!("enum tags in `derive({})`", name,)), + EnumTag(..) | AllFieldlessEnum(..) => { + cx.span_bug(trait_span, &format!("enum tags in `derive({})`", name,)) + } StaticEnum(..) | StaticStruct(..) => { cx.span_bug(trait_span, &format!("associated function in `derive({})`", name)) } |