-
-
Notifications
You must be signed in to change notification settings - Fork 14.5k
Reflection TypeKind::FnPtr #152173
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
base: main
Are you sure you want to change the base?
Reflection TypeKind::FnPtr #152173
Conversation
08ac92d to
1a4e30c
Compare
|
r? @nnethercote rustbot has assigned @nnethercote. Use |
1a4e30c to
0983ccc
Compare
This comment has been minimized.
This comment has been minimized.
|
Reminder, once the PR becomes ready for a review, use |
0983ccc to
d04a5a6
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
75c316b to
98d51b4
Compare
|
@rustbot ready |
This comment has been minimized.
This comment has been minimized.
98d51b4 to
f158958
Compare
f158958 to
66dfcf2
Compare
This comment has been minimized.
This comment has been minimized.
|
Now it suggests "did you mean Abi::C" whenever there is a unknown type C... I don't like that. |
|
To the best of my knowledge this won't happen on stable, as the enum variant is obivously unstable, and the import suggestions respect that |
|
|
- 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
66dfcf2 to
56233f0
Compare
|
☔ The latest upstream changes (presumably #152506) made this pull request unmergeable. Please resolve the merge conflicts. |
This is for #146922.
Const-eval currently lacks full support for function pointer (fn) types. We should implement handling of FnPtr TypeKind, covering safe and unsafe functions, Rust and custom ABIs, input and output types, higher-ranked lifetimes, and variadic functions.