https://gcc.gnu.org/g:ba25725820427726945410d1025c972d10a345cb
commit r16-7764-gba25725820427726945410d1025c972d10a345cb Author: Philip Herron <[email protected]> Date: Wed Sep 3 12:43:22 2025 +0100 gccrs: Remove the template parameter so clang format stops barfing on this Change this formatting, so clang format stops formatting this wierd for me. gcc/rust/ChangeLog: * typecheck/rust-tyty.cc (VariantDef::clone): remove template param (VariantDef::monomorphized_clone): likewise Signed-off-by: Philip Herron <[email protected]> Diff: --- gcc/rust/typecheck/rust-tyty.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/gcc/rust/typecheck/rust-tyty.cc b/gcc/rust/typecheck/rust-tyty.cc index 161c15e78960..c2e1bf438f7b 100644 --- a/gcc/rust/typecheck/rust-tyty.cc +++ b/gcc/rust/typecheck/rust-tyty.cc @@ -1698,8 +1698,7 @@ VariantDef::clone () const cloned_fields.push_back ((StructFieldType *) f->clone ()); auto &&discriminant_opt = has_discriminant () - ? tl::optional<std::unique_ptr<HIR::Expr>> ( - get_discriminant ().clone_expr ()) + ? tl::optional (get_discriminant ().clone_expr ()) : tl::nullopt; return new VariantDef (id, defid, identifier, ident, type, @@ -1714,8 +1713,7 @@ VariantDef::monomorphized_clone () const cloned_fields.push_back ((StructFieldType *) f->monomorphized_clone ()); auto discriminant_opt = has_discriminant () - ? tl::optional<std::unique_ptr<HIR::Expr>> ( - get_discriminant ().clone_expr ()) + ? tl::optional (get_discriminant ().clone_expr ()) : tl::nullopt; return new VariantDef (id, defid, identifier, ident, type,
