File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed
test_data/parser/inline/ok Expand file tree Collapse file tree 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) {
4040 name_ref ( p) ;
4141 opt_generic_arg_list ( p, false ) ;
4242 match p. current ( ) {
43- // test assoc_type_eq
44- // type T = StreamingIterator<Item<'a> = &'a T>;
4543 T ! [ =] => {
4644 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+ }
4856 m. complete ( p, ASSOC_TYPE_ARG ) ;
4957 }
5058 // 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