Asuna
28733aa84b
Add TypeId::field method to get a field representing type for type_info
2026-05-21 21:18:33 +00:00
Asuna
b50aae66b8
Add TypeId::fields method to get number of fields for type_info
2026-05-20 20:46:03 +00:00
Asuna
d1ad6292d6
Add TypeId::variants method to get number of variants for type_info
2026-05-20 20:46:03 +00:00
Asuna
4fe8268ff9
Refactor Type::size field to TypeId::size method for type_info
2026-05-06 05:41:08 +00:00
jasper3108
7857058a6b
nix vtable_for intrinsic
2026-02-20 10:16:36 +01:00
jasper3108
01627b7441
Support getting TypeId's Trait and vtable
2026-02-20 10:16:36 +01:00
jasper3108
7287be9006
Implement reflection support for function pointer types and add tests
...
- Implement handling of FnPtr TypeKind in const-eval, including:
- Unsafety flag (safe vs unsafe fn)
- ABI variants (Rust, Named(C), Named(custom))
- Input and output types
- Variadic function pointers
- Add const-eval tests covering:
- Basic Rust fn() pointers
- Unsafe fn() pointers
- Extern C and custom ABI pointers
- Functions with multiple inputs and output types
- Variadic functions
- Use const TypeId checks to verify correctness of inputs, outputs, and payloads
2026-02-18 17:18:16 +01:00
Asuna
a575fe168f
Erase type lifetime before writing type ID
2026-02-10 14:08:11 +01:00
Asuna
98e0c34f7f
Support unions in type info reflection
2026-02-10 13:53:27 +01:00
Asuna
e9037882c1
Support enums in type info reflection
2026-02-10 13:53:26 +01:00
Asuna
870fd9070b
Add generics info for structs in type info
2026-02-10 13:45:09 +01:00
Asuna
b23d308853
Support structs in type info reflection
2026-02-10 13:45:07 +01:00
theiz
a1893d3187
Add support for trait object types in type_info reflection
2026-01-27 19:49:09 -04:00
BD103
a509588fa9
feat: support slices in reflection type info
2026-01-21 16:03:00 -06:00
BD103
976cea3a18
feat: support pointers in type info
2026-01-19 09:42:55 -06:00
Jacob Pratt
80db7158af
Rollup merge of #151235 - type-info-rename-bits, r=oli-obk
...
Change field `bit_width: usize` to `bits: u32` in type info
Follow-up https://github.com/rust-lang/rust/pull/151123#discussion_r2698418929 . Quotes:
@Skgland:
> > I'm not sure whether we should use `usize` or `u64` here to represent the bit width.
>
> My expectation would be `u32` matching the associated `{u,i}N::BITS`[^1][^2][^3] constant that already exists on the integer types.
>
> [^1]: https://doc.rust-lang.org/std/primitive.i8.html#associatedconstant.BITS
> [^2]: https://doc.rust-lang.org/std/primitive.i128.html#associatedconstant.BITS
> [^3]: https://doc.rust-lang.org/std/primitive.usize.html#associatedconstant.BITS
@SpriteOvO:
> I found some [previous discussions](https://github.com/rust-lang/rust/pull/76492#issuecomment-700516940 ) regarding the type of `::BITS` constant. And during the stabilization of `::BITS`, the choice of `u32` affected some ecosystem crates (#81654 ), but soon after, these crates all accepted the `u32` type.
>
> So I think it makes sense to keep the type consistent with `::BITS` here. Then I'd also like to change the name from `bit_width` to `bits`, also for consistency.
r? @oli-obk
2026-01-18 03:16:46 -05:00
Asuna
27b0279660
Change field bit_width: usize to bits: u32 in type info
2026-01-17 01:53:08 +01:00
Jamie Hill-Daniel
c7031e93c5
feat: Support references in reflection type info
2026-01-17 00:25:29 +00:00
Asuna
b2a7b18ec4
Merge type info variant Uint into Int
2026-01-15 23:04:40 +01:00
Asuna
79ec275e2d
Support primitives in type info reflection
...
Support {bool,char,int,uint,float,str} primitive types for feature
`type_info` reflection.
2026-01-14 19:15:39 +01:00
BD103
71f8ea99fe
refactor: move tuples type info ui test to coretest
2026-01-13 12:19:37 -05:00
BD103
e027ecdbb5
feat: support arrays in type reflection
2026-01-13 12:18:57 -05:00