Skip to content

Conversation

@dotcarmen
Copy link
Contributor

@dotcarmen dotcarmen commented Nov 25, 2025

#23733 introduced a new type std.builtin.Type.Pointer.Attributes for usage with the new @Pointer builtin. however, there's not yet a convenient way to retrieve the information in this struct from a std.builtin.Type.Pointer.

this PR introduces a new of function to retrieve the pointer attributes from a std.builtin.Type.Pointer. this makes dynamic construction of pointer types simpler and mirrors usage of std.Alignment.of

@dotcarmen
Copy link
Contributor Author

dotcarmen commented Nov 25, 2025

a sensible alternative would be to make this attribute type a field of std.builtin.Type.Pointer, which I'd be happy to do with this PR (or open a new one) if it's preferable.

@mlugg
Copy link
Member

mlugg commented Nov 26, 2025

I considered this while working on the std migration for #23733, but I think we should hold off for now, because I suspect we'll want to change std.builtin.Type instead so that @typeInfo returns data in a more useful form.

@andrewrk
Copy link
Member

This pull request is not ready for review because:

  • It is not passing the CI tests.

Since we have moved development to Codeberg, please open your pull request there if you would like to continue these efforts.

@andrewrk andrewrk closed this Nov 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants