Landing: f593db0d5f38

Project / Subsystem

gcc / gccrs

Date

2025-12-03

Author

Arthur Cohen

Commit

f593db0d5f387aa522b85490c3a44c121b62a2be

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
gccrs
patch_id
—
commit_hash
f593db0d5f387aa522b85490c3a44c121b62a2be
source_type
github
headline
gccrs: Detect whether we are compiling core or any other crate
tldr
Enables gccrs to distinguish between compiling the 'core' crate and other crates for correct path generation.
author
Arthur Cohen
outcome
committed
performance_win
false
breaking_change
false
series_id
—
series_parts
[]
tags
  • • gccrs
  • • rust
  • • macro
  • • compiler internals
discussion_id_link
—
bugzilla_pr
—
date
2025-12-03T00:00:00.000Z

This commit enhances gccrs’s ability to differentiate between compiling the standard library’s ‘core’ crate and other user crates. This distinction is crucial for generating correct canonical paths, particularly during macro expansion and trait derivation. For instance, when deriving traits in a regular crate, paths should refer to core::marker::Copy, but when compiling core itself, paths must correctly point to crate::marker::Copy.