Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
069cb06 to
0816e30
Compare
This comment has been minimized.
This comment has been minimized.
…them as arguments
0816e30 to
74ba4f6
Compare
|
Requested reviewer is already assigned to this pull request. Please choose another assignee. |
|
cc @rust-lang/rustfmt This PR changes rustc_public cc @oli-obk, @celinval, @ouz-a, @makai410 The parser was modified, potentially altering the grammar of (stable) Rust cc @fmease Changes to the size of AST and/or HIR nodes. cc @nnethercote HIR ty lowering was modified cc @fmease
cc @rust-lang/clippy |
| ref ty, | ||
| span, | ||
| default, | ||
| arg_pos: _, |
There was a problem hiding this comment.
What is arg_pos, and does rustfmt need to handle formatting it in some way?
Probably good to add a #![feature(function_arg_const_generics] test case to rustfmt to make sure things are getting formatted as expected.
This PR adds initial support for argument-position const generics behind the
function_arg_const_genericsfeature gate.It allows const generics to be declared directly in function arguments. The PR adds the basic plumbing across AST, HIR, and
ty, parses these parameters into the function's generics, lowers call arguments into consts. For now, we lower literals, negated literals, const parameters, const items, unit variants, and etc, This works for functions, methods and a couple of more cases.r? @BoxyUwU
cc: @khyperia