mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-19 11:12:43 +00:00
parent
3da53ab3e7
commit
0e10e77a78
@ -115,7 +115,7 @@ fn value_parameter(p: &mut Parser, flavor: Flavor) {
|
||||
// type Foo = fn(Bar::Baz);
|
||||
// type Qux = fn(baz: Bar::Baz);
|
||||
Flavor::FnPointer => {
|
||||
if p.at(IDENT) && p.nth(1) == T![:] && !p.nth_at(1, T![::]) {
|
||||
if (p.at(IDENT) || p.at(UNDERSCORE)) && p.nth(1) == T![:] && !p.nth_at(1, T![::]) {
|
||||
patterns::pattern_single(p);
|
||||
types::ascription(p);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user