-
-
Notifications
You must be signed in to change notification settings - Fork 15.5k
Remove fields from TypeKind: Bool, Char, Float and Int #161401
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -90,13 +90,13 @@ pub enum TypeKind { | |
| /// Unions. | ||
| Union, | ||
| /// Primitive boolean type. | ||
| Bool(Bool), | ||
| Bool, | ||
| /// Primitive character type. | ||
| Char(Char), | ||
| Char, | ||
| /// Primitive signed and unsigned integer type. | ||
| Int(Int), | ||
| Int, | ||
|
oli-obk marked this conversation as resolved.
|
||
| /// Primitive floating-point type. | ||
| Float(Float), | ||
| Float, | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And the float format? (IEEE 754 f16 vs something like bf16 for example)
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think there might be a misunderstanding here (I neglected to provide the context for this work as Oli has that). Nothing new is being introduced for reflection. We are simply moving from an enum with fields to members on
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yea this wasn't available before, but we can def add it if/when necessary |
||
| /// String slice type. | ||
| Str(Str), | ||
| /// References. | ||
|
|
@@ -199,42 +199,6 @@ pub struct Const { | |
| pub ty: TypeId, | ||
| } | ||
|
|
||
| /// Compile-time type information about `bool`. | ||
| #[derive(Debug)] | ||
| #[non_exhaustive] | ||
| #[unstable(feature = "type_info", issue = "146922")] | ||
| pub struct Bool { | ||
| // No additional information to provide for now. | ||
| } | ||
|
|
||
| /// Compile-time type information about `char`. | ||
| #[derive(Debug)] | ||
| #[non_exhaustive] | ||
| #[unstable(feature = "type_info", issue = "146922")] | ||
| pub struct Char { | ||
| // No additional information to provide for now. | ||
| } | ||
|
|
||
| /// Compile-time type information about signed and unsigned integer types. | ||
| #[derive(Debug)] | ||
| #[non_exhaustive] | ||
| #[unstable(feature = "type_info", issue = "146922")] | ||
| pub struct Int { | ||
| /// The bit width of the signed integer type. | ||
| pub bits: u32, | ||
| /// Whether the integer type is signed. | ||
| pub signed: bool, | ||
| } | ||
|
|
||
| /// Compile-time type information about floating-point types. | ||
| #[derive(Debug)] | ||
| #[non_exhaustive] | ||
| #[unstable(feature = "type_info", issue = "146922")] | ||
| pub struct Float { | ||
| /// The bit width of the floating-point type. | ||
| pub bits: u32, | ||
| } | ||
|
|
||
| /// Compile-time type information about string slice types. | ||
| #[derive(Debug)] | ||
| #[non_exhaustive] | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.