Skip to content

Commit

Permalink
Handle async qualifier inside trait
Browse files Browse the repository at this point in the history
Fixes Rust-GCC#2778

gcc/rust/ChangeLog:

	* parse/rust-parse-impl.h (Parser::parse_trait_impl_item):
	Handled `async` items

Signed-off-by: Kushal Pal <[email protected]>
  • Loading branch information
braw-lee committed Dec 27, 2023
1 parent d8c5cf1 commit 84ba175
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions gcc/rust/parse/rust-parse-impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -5784,6 +5784,8 @@ Parser<ManagedTokenSource>::parse_trait_impl_item ()
// function or method
return parse_trait_impl_function_or_method (visibility,
std::move (outer_attrs));
case ASYNC:
return parse_async_item (visibility, std::move (outer_attrs));
case CONST:
// lookahead to resolve production - could be function/method or const
// item
Expand All @@ -5794,6 +5796,7 @@ Parser<ManagedTokenSource>::parse_trait_impl_item ()
case IDENTIFIER:
case UNDERSCORE:
return parse_const_item (visibility, std::move (outer_attrs));

case UNSAFE:
case EXTERN_KW:
case FN_KW:
Expand Down

0 comments on commit 84ba175

Please sign in to comment.