Skip to content

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

Merged
xFrednet merged 5 commits intorust-marker:masterfrom
xFrednet:141-impl-trait-boilerplate
Nov 25, 2023
Merged

API: Add impl From<*> for sem::TyKind and correct some names of semantic types#322
xFrednet merged 5 commits intorust-marker:masterfrom
xFrednet:141-impl-trait-boilerplate

Conversation

@xFrednet
Copy link
Copy Markdown
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
Copy Markdown
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

Comment thread CHANGELOG.md
Comment thread marker_api/src/sem/ty/fn_ty.rs Outdated
Comment thread marker_api/src/sem/ty/fn_ty.rs Outdated
Comment thread marker_api/src/sem/ty.rs
Comment thread marker_api/src/sem/ty.rs
@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
@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