]> git.ipfire.org Git - thirdparty/gcc.git/commit
expansion: Desugar doc comments into attributes before expansion
authorArthur Cohen <arthur.cohen@embecosm.com>
Tue, 8 Apr 2025 14:20:18 +0000 (16:20 +0200)
committerCohenArthur <arthur.cohen@embecosm.com>
Mon, 14 Apr 2025 08:03:49 +0000 (08:03 +0000)
commit486ca997e9924ad52bee8e4c4a6028fcab5f25b5
tree57eb3cd0d65a46d0a5a91025073892806373665f
parent780ebba8a9152598e0fde0528c2fc63d9f474fcd
expansion: Desugar doc comments into attributes before expansion

gcc/rust/ChangeLog:

* expand/rust-macro-expand.cc (MacroExpander::expand_decl_macro): Call into
TokenTreeDesugar.
* expand/rust-token-tree-desugar.cc: New file.
* expand/rust-token-tree-desugar.h: New file.
* Make-lang.in: Compile them.

gcc/testsuite/ChangeLog:

* rust/compile/macros/mbe/macro-issue3709-1.rs: New test.
* rust/compile/macros/mbe/macro-issue3709-2.rs: New test.
gcc/rust/Make-lang.in
gcc/rust/expand/rust-macro-expand.cc
gcc/rust/expand/rust-token-tree-desugar.cc [new file with mode: 0644]
gcc/rust/expand/rust-token-tree-desugar.h [new file with mode: 0644]
gcc/testsuite/rust/compile/macros/mbe/macro-issue3693.rs [new file with mode: 0644]
gcc/testsuite/rust/compile/macros/mbe/macro-issue3709-1.rs [new file with mode: 0644]
gcc/testsuite/rust/compile/macros/mbe/macro-issue3709-2.rs [new file with mode: 0644]