mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
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:
parent
356c507357
commit
49d1207775
5 changed files with 47 additions and 8 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue