Skip to content

Commit

Permalink
Merge #596
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
bors[bot] and philberty authored Jul 26, 2021
2 parents f4dd243 + bb351c7 commit 5b3909d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gcc/rust/ast/rust-ast-full-test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3595,7 +3595,8 @@ ExternalFunctionItem::as_string () const
}

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

// where clause
str += "\n Where clause: ";
Expand Down

0 comments on commit 5b3909d

Please sign in to comment.