Skip to content

Commit 12b6c93

Browse files
committed
gccrs: Revert "gccrs: Remove the template parameter
This reverts commit a50fb38 as it breaks gcc5 bootstrap. gcc/rust/ChangeLog: * typecheck/rust-tyty.cc (VariantDef::clone): revert (VariantDef::monomorphized_clone): likewise Signed-off-by: Philip Herron <[email protected]>
1 parent a50fb38 commit 12b6c93

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

gcc/rust/typecheck/rust-tyty.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1661,7 +1661,8 @@ VariantDef::clone () const
16611661
cloned_fields.push_back ((StructFieldType *) f->clone ());
16621662

16631663
auto &&discriminant_opt = has_discriminant ()
1664-
? tl::optional (get_discriminant ().clone_expr ())
1664+
? tl::optional<std::unique_ptr<HIR::Expr>> (
1665+
get_discriminant ().clone_expr ())
16651666
: tl::nullopt;
16661667

16671668
return new VariantDef (id, defid, identifier, ident, type,
@@ -1676,7 +1677,8 @@ VariantDef::monomorphized_clone () const
16761677
cloned_fields.push_back ((StructFieldType *) f->monomorphized_clone ());
16771678

16781679
auto discriminant_opt = has_discriminant ()
1679-
? tl::optional (get_discriminant ().clone_expr ())
1680+
? tl::optional<std::unique_ptr<HIR::Expr>> (
1681+
get_discriminant ().clone_expr ())
16801682
: tl::nullopt;
16811683

16821684
return new VariantDef (id, defid, identifier, ident, type,

0 commit comments

Comments
 (0)