File tree 2 files changed +14
-3
lines changed
test_data/parser/inline/ok
2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -40,11 +40,19 @@ fn generic_arg(p: &mut Parser) {
40
40
name_ref ( p) ;
41
41
opt_generic_arg_list ( p, false ) ;
42
42
match p. current ( ) {
43
- // test assoc_type_eq
44
- // type T = StreamingIterator<Item<'a> = &'a T>;
45
43
T ! [ =] => {
46
44
p. bump_any ( ) ;
47
- types:: type_ ( p) ;
45
+ if types:: TYPE_FIRST . contains ( p. current ( ) ) {
46
+ // test assoc_type_eq
47
+ // type T = StreamingIterator<Item<'a> = &'a T>;
48
+ types:: type_ ( p) ;
49
+ } else {
50
+ // test assoc_const_eq
51
+ // fn foo<F: Foo<N=3>>() {}
52
+ // const TEST: usize = 3
53
+ // fn bar<F: Foo<N={TEST}>>() {}
54
+ const_arg ( p) ;
55
+ }
48
56
m. complete ( p, ASSOC_TYPE_ARG ) ;
49
57
}
50
58
// test assoc_type_bound
Original file line number Diff line number Diff line change
1
+ fn foo < F : Foo < N =3 > > ( ) { }
2
+ const TEST : usize = 3
3
+ fn bar < F : Foo < N ={ TEST } > > ( ) { }
You can’t perform that action at this time.
0 commit comments