Properly match on debuginfo kind rather than assuming `!self.sess().target.is_like_msvc` equivalence
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
See https://github.com/rust-lang/rust/pull/128627#discussion_r1722557157
The
!self.sess().target.is_like_msvc
patterns for meaning "is DWARF" is very fragile, since this likely won't forever hold true. Consider introducing an explicit is_dwarf() helper / explicitly match on debuginfo kind instead.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the discussion in PR 128627 and search the compiler for !self.sess().target.is_like_msvc patterns used to mean DWARF. Trace those call sites and inspect the debuginfo kind representation before replacing the fragile equivalence with explicit matching or an is_dwarf() helper. Run the affected compiler tests and confirm behavior remains correct for each debuginfo kind.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100