diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-07-26 14:29:28 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-26 14:29:28 +0000 |
commit | 5b3909dd7487ddd41ffacf45150a4fff550e2fab (patch) | |
tree | 024e39a8fc201564e1176746e6a02e275886783d /gcc | |
parent | f4dd2434cf3db67f86accd41f7c0c511a33425c7 (diff) | |
parent | bb351c7a73c38e96fbc83032e23977e2926fa43e (diff) | |
download | gcc-5b3909dd7487ddd41ffacf45150a4fff550e2fab.zip gcc-5b3909dd7487ddd41ffacf45150a4fff550e2fab.tar.gz gcc-5b3909dd7487ddd41ffacf45150a4fff550e2fab.tar.bz2 |
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 <philip.herron@embecosm.com>
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/rust/ast/rust-ast-full-test.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/rust/ast/rust-ast-full-test.cc b/gcc/rust/ast/rust-ast-full-test.cc index dd55e1d..5d32139 100644 --- a/gcc/rust/ast/rust-ast-full-test.cc +++ b/gcc/rust/ast/rust-ast-full-test.cc @@ -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: "; |