rust-lang / rust-lang/rustc_public

The reason not to hide `RustcInternal` and `Stable` traits

Open
#110 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
125
Forks
19
PR merge metrics
No merged PRs in 30d

Description

These two traits used to be public, while they are hidden in the doc.

The troubles are:

  • internal fn needs RustcInternal trait bound which doesn't have a direct definition to jump in.
  • RustcInternal becomes harder to search and understand:
    • Users will never be sure that types like DefId or Instance can be converted into the internal conterparts, unless they read the source code of RustcInternal and the implementations.
    • Being convertible to an internal item is an important property for these types, and should be reflected in the API doc of the types to help readers be aware of it.
  • The same troubles apply to the Stable case.

Contributor guide

No contributing guide indexed for this repository

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 rustc_public/unstable/mod.rs and the linked internal function documentation. Read the definitions and implementations of RustcInternal and Stable, then inspect how DefId and Instance expose their conversion-related API documentation. The issue needs a maintainer decision on visibility and documentation before a newcomer can determine what done looks like.

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
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.