-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Replace #[rustc_args_required_const(n)]
with per-argument attr
#69282
Comments
[triagebot] 👍 EDIT: I'm not attached to the mentioned naming. |
I would be willing to take this up. Are there any mentors out there who could be available if I have questions? @rustbot claim |
@jakevossen5 Are you still working on this? Or can I take it up? |
@LeSeulArtichaut , Apologies, I have gotten a bit busy in the past week. I am still working on this and hopefully have a PR up sometime next week. |
Ironically, the benefit from this is pretty minor, and it'd be trickier to implement than today, because the param attributes aren't kept cross-crate, so they need to be encoded some other way. Probably a decent way would be to add a rust/src/librustc_metadata/rmeta/mod.rs Lines 327 to 331 in c6b172f
|
@eddyb Do you mean a new element of the struct, like |
I think we should resolve #70271 first before touching |
Sounds good. I will watch that thread and when it it closed circle back to here. |
|
RFC 2565, which was recently stabilized, allows individual function parameters to have attributes. One of the motivating examples for that RFC was the ugliness of
#[rustc_args_required_const]
, which specifies the const argument(s) by index. We should transition away from#[rustc_args_required_const]
to a per-argument attribute.@petrochenkov has proposed
#[rustc_required_const]
. These attributes are perma-unstable so there are no backwards compatibility concerns.The text was updated successfully, but these errors were encountered: