Skip to content

Commit 5b3909d

Browse files
bors[bot]philberty
andauthored
Merge #596
596: Fix crash when extern function item has no return type r=philberty a=philberty Addresses #421 Fixes #595 Co-authored-by: Philip Herron <[email protected]>
2 parents f4dd243 + bb351c7 commit 5b3909d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

gcc/rust/ast/rust-ast-full-test.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3595,7 +3595,8 @@ ExternalFunctionItem::as_string () const
35953595
}
35963596

35973597
// add type on new line
3598-
str += "\n (return) Type: " + return_type->as_string ();
3598+
str += "\n (return) Type: "
3599+
+ (has_return_type () ? return_type->as_string () : "()");
35993600

36003601
// where clause
36013602
str += "\n Where clause: ";

0 commit comments

Comments
 (0)