-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tracking issue for shared type library #16
Labels
roadmap-tracking-issue
Tracks an item on our types team roadmap.
Comments
bors
added a commit
to rust-lang-ci/rust
that referenced
this issue
Sep 4, 2020
Refractor ty.kind -> ty.kind() and ty.flags -> ty.flags() First step for the ["shared library to represent Rust types"](https://rust-lang.github.io/compiler-team/minutes/design-meeting/2020-03-12-shared-library-for-types/) work (rust-lang/types-team#16). This PR makes the `TyS::kind` field private and adds a `kind()` method to access it. As noted [on Zulip](https://rust-lang.zulipchat.com/#narrow/stream/144729-wg-traits/topic/Looking.20to.20contribute/near/205185412), this refractoring might require a MCP. I am perfectly fine with having to wait until MCP is accepted and resolving the conflicts that pop up afterwards. r? @nikomatsakis
18 tasks
This was referenced Oct 30, 2020
3 tasks
This was referenced May 17, 2021
6 tasks
bors
added a commit
to rust-lang/chalk
that referenced
this issue
Nov 28, 2021
Introduce `Folder::Error` Equivalent to rust-lang/rust#85469, cc rust-lang/compiler-team#432 rust-lang/types-team#16. This compiles, but there are implementations of `Folder` that still use `Fallible<T>` instead of `Result<T, Self::Error>`. I can make that change if it is deemed beneficial. r? `@jackh726`
jackh726
added
the
roadmap-tracking-issue
Tracks an item on our types team roadmap.
label
Feb 6, 2023
Michael has made many PRs towards this effort!: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Rust work items
ty.kind
to use a methodty.kind(tcx)
(but see bikeshed point above)Binder
type to contain a list of "kinds" for the bound items (discussion)TyKind
by value (maybe) as proposed in Make TyKind Copy and change ty.kind() to return TyKind instead of &TyKind compiler-team#363Fold
traitResult
associated typeTyKind
variant to collapse the various scalars into oneChalk work items
TyData
toTyKind
in ChalkTypeName
with variants representing scalar types (e.g.,bool
,u32
,i32
) and other rust "application types" extend chalkTypeName
with builtin types chalk#368Interner
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#369parameters
field ofFn
type to useSubstitution
instead of aVec
Visit
trait in chalk introduce aVisit
trait to go withFold
chalk#333Binders
API to have private values field -- refactor Binders API to have a private value field chalk#375Ty
type and friends and integrate some of those flags into folders add flags toInternedTy
andInternedRegion
types chalk#627Apply
andTypeName
and inlining those as distinct variants in chalk's typeThings to explore
XXX hackmd where sketched a plan, need to incorporate above
The text was updated successfully, but these errors were encountered: