-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
API: Add impl
From<*>
for sem::TyKind
and correct some names of s…
…emantic types (#322) * API: Add `sem::CommonTyData` * API: Rename `sem::TyKind::FnTy` -> `sem::TyKind::Fn` * Doc: Track changes * PR Review 1 * PR Review 2
- Loading branch information
Showing
15 changed files
with
360 additions
and
237 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,12 @@ | ||
use std::marker::PhantomData; | ||
use super::CommonTyData; | ||
|
||
/// The placeholder type, signalling that the semantic type is still unstable | ||
/// and therefor not represented as part of the API. | ||
#[repr(C)] | ||
#[derive(Debug)] | ||
#[cfg_attr(feature = "driver-api", derive(typed_builder::TypedBuilder))] | ||
pub struct UnstableTy<'ast> { | ||
_lt: PhantomData<&'ast ()>, | ||
data: CommonTyData<'ast>, | ||
} | ||
|
||
#[cfg(feature = "driver-api")] | ||
impl<'ast> UnstableTy<'ast> { | ||
pub fn new() -> Self { | ||
Self { _lt: PhantomData } | ||
} | ||
} | ||
super::impl_ty_data!(UnstableTy<'ast>, Unstable); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.