Skip to content

Commit 8c3931b

Browse files
committed
Add support for new where clause location in associated types.
A recent Rust nightly changed it: rust-lang/rust#89122 This allows both the old and new location.
1 parent 356c507 commit 8c3931b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

crates/parser/src/grammar/items.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -290,12 +290,17 @@ fn type_alias(p: &mut Parser, m: Marker) {
290290
generic_params::bounds(p);
291291
}
292292

293-
// test type_item_where_clause
293+
// test type_item_where_clause_deprecated
294294
// type Foo where Foo: Copy = ();
295295
generic_params::opt_where_clause(p);
296296
if p.eat(T![=]) {
297297
types::type_(p);
298298
}
299+
300+
// test type_item_where_clause
301+
// type Foo = () where Foo: Copy;
302+
generic_params::opt_where_clause(p);
303+
299304
p.expect(T![;]);
300305
m.complete(p, TYPE_ALIAS);
301306
}

0 commit comments

Comments
 (0)