Add support for new where clause location in associated types.
A recent Rust nightly changed it: https://github.com/rust-lang/rust/issues/89122 This allows both the old and new location.
This commit is contained in:
@@ -290,12 +290,17 @@ fn type_alias(p: &mut Parser, m: Marker) {
|
||||
generic_params::bounds(p);
|
||||
}
|
||||
|
||||
// test type_item_where_clause
|
||||
// test type_item_where_clause_deprecated
|
||||
// type Foo where Foo: Copy = ();
|
||||
generic_params::opt_where_clause(p);
|
||||
if p.eat(T![=]) {
|
||||
types::type_(p);
|
||||
}
|
||||
|
||||
// test type_item_where_clause
|
||||
// type Foo = () where Foo: Copy;
|
||||
generic_params::opt_where_clause(p);
|
||||
|
||||
p.expect(T![;]);
|
||||
m.complete(p, TYPE_ALIAS);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user