rust-lang / rust-lang/rust

Tracking issue for `TypingMode` transition

Open
#132,279 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-type-system C-tracking-issue T-types
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

#131856 transitions the type system from separately tracking the Reveal in the ParamEnv, and intercrate and defining_opaque_types in the InferCtxt to tracking all of that state in a shared enum TypingMode as a field on the InferCtxt.

This is a necessary step towards correctly handling opaque types after type inference, but during analysis. This needs a separate typing mode where we reveal the opaque types defined by that body without accidentally trying to define them. It may also be used to properly support negative reasoning in coherence.

This issue is mostly used to get something to point to in FIXMEs.

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 by reading #131856 and the TypingMode transition described here, then inspect the const-evaluation query entry points and InferCtxt state. The checklist mentions raw const-eval queries, ParamEnv, PostAnalysis, and interning typing_mode; completion depends on resolving those tracked design tasks and updating the related FIXME references.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Refactor
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.