Devise mechanism for ensuring `tcx.short_string` is actually used
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
From https://github.com/rust-lang/rust/pull/144039#discussion_r2219627544
This probably illustrates a problem we have with the current system: we don't prevent if a short string was created but was never printed. I think there could be a mechanism (a drop guard for a custom short_string return newtype) in which we detect that. Could you open an issue?
One alternative is to completely migrate any diagnostic mentioning types to structured errors, as those already handle path shortening appropriately.
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 linked discussion in rust-lang/rust#144039 and inspect how short strings and structured errors currently handle diagnostic type paths. Done means establishing a mechanism that detects an unused short string or completing the proposed migration to structured errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100