rust-lang / rust-lang/rust

Properly match on debuginfo kind rather than assuming `!self.sess().target.is_like_msvc` equivalence

Open
#162,675 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-debuginfo C-cleanup T-compiler
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.