-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Labels
roadmap-tracking-issueTracks an item on our types team roadmap.Tracks an item on our types team roadmap.
Description
This is a tracking issue for the goal of creating a shared library that represents Rust types. This library should be used by rustc, chalk, and rust-analyzer, and would permit us to pass data and goals between rustc and chalk without any "bridging" cost. It will also permit one to write type-based analyses (like chalk itself!) that do not depend on rustc internals.
What follows is a list of steps to be taken. Those steps with open issues are actionable and ready to go. Those without open issues may be uncertain or maybe we just didn't write up any notes yet -- feel free to ping on Zulip to inquire after the status.
General work items
- Propose renaming "type fold" to "type map" (in both rustc/chalk)Propose renaming "type visitor" to "type folder" (in both rustc/chalk, although we don't have a trait like this in chalk yet)Complete comparison spreadsheet that describes names for things in rustc, chalk and what should go into shared libraryTo pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.
Rust work items
- Refactor code in rustc using
ty.kind
to use a methodty.kind(tcx)
(but see bikeshed point above)Extend rustc'sBinder
type to contain a list of "kinds" for the bound items (discussion)returnTyKind
by value (maybe) as proposed in Make TyKind Copy and change ty.kind() to return TyKind instead of &TyKind compiler-team#363Extend rustc's late-bound types to contain an indexStart to move types into library to figure out what is missingIntroduce custom derive forFold
traitExtend Rustc's folder trait to have aResult
associated typeExtend Rustc's visit trait to not hard-code a boolean result?Extend Rustc'sTyKind
variant to collapse the various scalars into oneTo pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.
Chalk work items
- Rename
TyData
toTyKind
in ChalkCount binders, not variablesExtendTypeName
with variants representing scalar types (e.g.,bool
,u32
,i32
) and other rust "application types" extend chalkTypeName
with builtin types chalk#368IntroduceInterner
associated type for all vectors that appear in chalk_ir types (e.g.,Vec<QuantifiedWhereClause>
,Vec<ParameterKind>
, etc) as well asArc
orBox
move remaining vectors, boxes in chalk-ir into associated types onInterner
chalk#369Introduce aVisit
trait in chalk introduce aVisit
trait to go withFold
chalk#333RefactorBinders
API to have private values field -- refactor Binders API to have a private value field chalk#375Add "flags" to theTy
type and friends and integrate some of those flags into folders add flags toInternedTy
andInternedRegion
types chalk#627- Add
- Integrate -- not really a blocker
To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.Optimize folding over slices to avoid "reinterning" them when not neededExperiment with removingApply
andTypeName
and inlining those as distinct variants in chalk's typeTo pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.
Things to explore
- Align on a single model of canonicalization -- what gets canonicalized? What about universe canonicalization?To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.
Metadata
Metadata
Assignees
Labels
roadmap-tracking-issueTracks an item on our types team roadmap.Tracks an item on our types team roadmap.
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
TypeName
with builtin types rust-lang/chalk#368rustc_ty
rust-lang/compiler-team#387TypeFolder::fold_*
returnResult
rust-lang/compiler-team#432Folder::Error
rust-lang/chalk#709Auto merge of #709 - LeSeulArtichaut:fallible-folder, r=jackh726
1 remaining item