Allow true and false keywords in const generics
This commit is contained in:
@@ -26,7 +26,7 @@ pub(super) fn opt_generic_arg_list(p: &mut Parser, colon_colon_required: bool) {
|
||||
}
|
||||
|
||||
// test type_arg
|
||||
// type A = B<'static, i32, 1, { 2 }, Item=u64>;
|
||||
// type A = B<'static, i32, 1, { 2 }, Item=u64, true, false>;
|
||||
fn generic_arg(p: &mut Parser) {
|
||||
let m = p.start();
|
||||
match p.current() {
|
||||
@@ -55,6 +55,10 @@ fn generic_arg(p: &mut Parser) {
|
||||
expressions::literal(p);
|
||||
m.complete(p, CONST_ARG);
|
||||
}
|
||||
TRUE_KW | FALSE_KW => {
|
||||
expressions::literal(p);
|
||||
m.complete(p, CONST_ARG);
|
||||
}
|
||||
_ => {
|
||||
types::type_(p);
|
||||
m.complete(p, TYPE_ARG);
|
||||
|
||||
Reference in New Issue
Block a user