refactor: Rename and move const_arg_path
It wasn't testing the `const_arg` code path, it was actually hitting const_param's default value code path, so move it to the right place and rename it.
This commit is contained in:
@@ -99,9 +99,8 @@ pub(super) fn const_arg_expr(p: &mut Parser) {
|
||||
expressions::literal(p);
|
||||
lm.complete(p, PREFIX_EXPR);
|
||||
}
|
||||
// test const_arg_path
|
||||
// type T = S<u32::MAX>;
|
||||
_ => {
|
||||
// This shouldn't be hit by `const_arg`
|
||||
let lm = p.start();
|
||||
paths::use_path(p);
|
||||
lm.complete(p, PATH_EXPR);
|
||||
|
||||
@@ -85,6 +85,9 @@ fn const_param(p: &mut Parser, m: Marker) {
|
||||
|
||||
// test const_param_default_expression
|
||||
// struct A<const N: i32 = { 1 }>;
|
||||
|
||||
// test const_param_default_path
|
||||
// struct A<const N: i32 = i32::MAX>;
|
||||
generic_args::const_arg_expr(p);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user