rust-lang / rust-lang/rust

clarify local_crate_exports_generics

Open
#126,218 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-docs T-compiler
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

Location

https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/context/struct.TyCtxt.html#method.local_crate_exports_generics

Summary

it seems like it would be obvious what this does from the verbose name, but it actually checks if the local crate is allowed to export generics, based on its crate type. a completely empty rlib crate that doesn't export anything will still return true.

it's also completely undocumented in general.

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 at the TyCtxt::local_crate_exports_generics entry point linked in the issue and read the surrounding implementation and existing rustc_middle documentation. Clarify that the method reports whether the local crate type is allowed to export generics, not whether it actually exports any, and document the empty-rlib behavior. Done means the method's semantics are clear from its documentation.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.