diff options
author | Arthur Cohen <arthur.cohen@embecosm.com> | 2022-09-14 10:23:46 +0200 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2023-01-31 14:16:51 +0100 |
commit | 3736647947b6b776c6d53eddde7538394886ebec (patch) | |
tree | 6ee2004af32a1e67581b5ffbb6f962803291a550 /gcc/rust/backend/rust-tree.cc | |
parent | 739d0509ed55aa650f197618a0902c6e0553b639 (diff) | |
download | gcc-3736647947b6b776c6d53eddde7538394886ebec.zip gcc-3736647947b6b776c6d53eddde7538394886ebec.tar.gz gcc-3736647947b6b776c6d53eddde7538394886ebec.tar.bz2 |
gccrs: module lowering: Do not append null pointers as items
Some module items do not need to get lowered to HIR such as `macro_rules!` definitions. Hence, module lowering should act the same as crate lowering: Only emplace back the lowered item if it is a valid pointer
gcc/rust/ChangeLog:
* hir/rust-ast-lower-item.cc (ASTLoweringItem::visit): Do not lower
null items within modules.
gcc/testsuite/ChangeLog:
* rust/compile/macro44.rs: New test.
Diffstat (limited to 'gcc/rust/backend/rust-tree.cc')
0 files changed, 0 insertions, 0 deletions