gccrs: builtins: Return empty list of tokens instead of nullptr
authorArthur Cohen <arthur.cohen@embecosm.com>
Wed, 15 Feb 2023 09:52:28 +0000 (10:52 +0100)
committerArthur Cohen <arthur.cohen@embecosm.com>
Thu, 6 Apr 2023 08:47:24 +0000 (10:47 +0200)
commit8b0ed2387a52201cd58a7f57e53ac20f5bbe6ddb
treea3ed5d6ce5df273b0eb027825bc209174024a027
parentecdce2bf17af6fb30823e900118e96a08887a748
gccrs: builtins: Return empty list of tokens instead of nullptr

gcc/rust/ChangeLog:

* expand/rust-macro-builtins.cc (MacroBuiltin::include_handler): Do not
return nullptr token in expansion of `include!()`

gcc/testsuite/ChangeLog:

* rust/compile/empty.in: New test.
* rust/compile/include_empty.rs: New test.
gcc/rust/expand/rust-macro-builtins.cc
gcc/testsuite/rust/compile/empty.in [new file with mode: 0644]
gcc/testsuite/rust/compile/include_empty.rs [new file with mode: 0644]