Skip to content

Commit 8622e4c

Browse files
committed
Add example of old trait object syntax
1 parent 879693e commit 8622e4c

File tree

3 files changed

+39
-1
lines changed

3 files changed

+39
-1
lines changed

crates/ra_parser/src/grammar/types.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@ pub(super) fn for_binder(p: &mut Parser) {
217217
// test for_type
218218
// type A = for<'a> fn() -> ();
219219
// type B = for<'a> unsafe extern "C" fn(&'a ()) -> ();
220+
// type Obj = for<'a> PartialEq<&'a i32>;
220221
pub(super) fn for_type(p: &mut Parser) {
221222
assert!(p.at(T![for]));
222223
let m = p.start();

crates/ra_syntax/test_data/parser/inline/ok/0081_for_type.rast

Lines changed: 37 additions & 1 deletion
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
type A = for<'a> fn() -> ();
22
type B = for<'a> unsafe extern "C" fn(&'a ()) -> ();
3+
type Obj = for<'a> PartialEq<&'a i32>;

0 commit comments

Comments
 (0)