Landing: f7dd8c5f6430

Project / Subsystem

gcc / gccrs

Date

2026-05-29

Author

Pierre-Emmanuel Patry

Commit

f7dd8c5f64305cbfcc3b191c239323f95b720483

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
gccrs
patch_id
—
commit_hash
f7dd8c5f64305cbfcc3b191c239323f95b720483
source_type
github
headline
Use AST for metadata export instead of HIR.
tldr
Switches metadata export in gccrs from HIR to AST for better accuracy and code reuse.
author
Pierre-Emmanuel Patry
outcome
committed
performance_win
false
breaking_change
false
series_id
—
series_parts
[]
tags
  • • gccrs
  • • rust
  • • compiler internals
  • • metadata
discussion_id_link
—
bugzilla_pr
—
date
2026-05-29T00:00:00.000Z

This commit changes gccrs’ metadata export mechanism to use the Abstract Syntax Tree (AST) instead of the High-Level Intermediate Representation (HIR). The HIR lacked UseDeclaration nodes, which are crucial for resolving some metadata. By using the AST, which already accurately represents these declarations and is used by other systems like proc macro expansion, the compiler deduplicates dumper code and improves the accuracy of exported metadata.