aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend
diff options
context:
space:
mode:
authorArthur Cohen <arthur.cohen@embecosm.com>2025-02-24 13:09:17 +0100
committerCohenArthur <arthur.cohen@embecosm.com>2025-03-06 15:44:14 +0000
commitf88af6176e24e62670f33f3d119db02850c11af2 (patch)
tree510f16e233618fa414528254692bf3f04b5048ab /gcc/rust/backend
parent912ebb6b74936e6e69bba116af7e45caab3c414c (diff)
downloadgcc-f88af6176e24e62670f33f3d119db02850c11af2.zip
gcc-f88af6176e24e62670f33f3d119db02850c11af2.tar.gz
gcc-f88af6176e24e62670f33f3d119db02850c11af2.tar.bz2
expansion: Correctly expand $crate metavar
gcc/rust/ChangeLog: * expand/rust-macro-expand.cc: Use new SubstituteCtx API. * expand/rust-macro-expand.h: Likewise. * expand/rust-macro-substitute-ctx.cc: Implement proper expansion of $crate. * expand/rust-macro-substitute-ctx.h: Adapt APIs to take macro definition when substituting. * util/rust-hir-map.cc (Mappings::insert_macro_def): Store crate information when inserting macro definition in mappings. (Mappings::lookup_macro_def_crate): New. * util/rust-hir-map.h: Adapt mappings to store crate in which macros were defined. gcc/testsuite/ChangeLog: * rust/execute/crate-metavar1.rs: New test. * rust/compile/crate-metavar1.rs: New test.
Diffstat (limited to 'gcc/rust/backend')
0 files changed, 0 insertions, 0 deletions