rust-lang / rust-lang/rustc_public

Expose IndexedVal trait in rustc_public

Open Beginner friendly
#116 0 comments 2 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

IndexedVal is declared in rustc_public_bridge crate, while can be also seen on rustc_public types like VariantIdx.

It's necessary to convert between the wrapper type and index/usize using that trait. But currently the only way is to import it from rustc_public_bridge:

extern crate rustc_public_bridge;
use rustc_public_bridge::IndexedVal;

It would be great if the trait can be directly accessible from rustc_public:

use rustc_public::ty::IndexedVal;

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 by locating the public exports for the rustc_public and rustc_public_bridge crates, then inspect the IndexedVal trait and its existing implementations for rustc_public types such as VariantIdx. Done means callers can import IndexedVal from rustc_public::ty and use it for wrapper-to-index or usize conversions without importing rustc_public_bridge.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.