Skip to content
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

API: Add impl From<*> for sem::TyKind and correct some names of semantic types #322

Merged
merged 5 commits into from
Nov 25, 2023

Conversation

xFrednet
Copy link
Member

This PR adds boilerplate code required for the implementation of #141. I've also changed all semantic type construction, to use the TypedBuilder instead of the old new() function.

This PR also includes some changes, visible to API consumers, probably best summarized by the changelog entires:

  • sem::TyKind now implements From<*> for all semantic types.
  • Renamed sem::TyKind::FnTy -> sem::TyKind::Fn
  • Renamed sem::TyKind::ClosureTy -> sem::TyKind::Closure

That's basically it. Some boring repetitive code changes, which will hopefully make it easier to expand semantic types in the future :D

@xFrednet xFrednet added C-enhancement Category: New feature or request A-api Area: Stable API D-rustc-driver Driver: Rustc Driver I-api-break Issue: This change will break the public API labels Nov 25, 2023
@xFrednet xFrednet added this to the v0.5.0 milestone Nov 25, 2023
@xFrednet
Copy link
Member Author

The semver-check in our CI only found the two expected enum variant renames, I guess this should be good to go :D

Some to think about #141

CHANGELOG.md Show resolved Hide resolved
marker_api/src/sem/ty/fn_ty.rs Outdated Show resolved Hide resolved
marker_api/src/sem/ty/fn_ty.rs Outdated Show resolved Hide resolved
marker_api/src/sem/ty.rs Show resolved Hide resolved
marker_api/src/sem/ty.rs Show resolved Hide resolved
@xFrednet xFrednet changed the title API: Add sem::CommonTyData API: Add impl From<*> for sem::TyKind and correct some names of semantic types Nov 25, 2023
@xFrednet xFrednet added this pull request to the merge queue Nov 25, 2023
Merged via the queue into rust-marker:master with commit e1dfde8 Nov 25, 2023
25 of 26 checks passed
@xFrednet xFrednet deleted the 141-impl-trait-boilerplate branch November 25, 2023 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-api Area: Stable API C-enhancement Category: New feature or request D-rustc-driver Driver: Rustc Driver I-api-break Issue: This change will break the public API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants