diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2022-03-17 16:04:23 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-17 16:04:23 +0000 |
commit | 1bb9a29688ab4ddfec7f8d36ca2cee63c5f258d2 (patch) | |
tree | 7fb389c42bf54536a486bd5713ef64f9623a2d82 /gcc/rust/parse/rust-parse-impl.h | |
parent | 1a14348afefc62313e38156fde768744378f9ebf (diff) | |
parent | a7ef6f98be0e25187ad1690428aafc17e19b5751 (diff) | |
download | gcc-1bb9a29688ab4ddfec7f8d36ca2cee63c5f258d2.zip gcc-1bb9a29688ab4ddfec7f8d36ca2cee63c5f258d2.tar.gz gcc-1bb9a29688ab4ddfec7f8d36ca2cee63c5f258d2.tar.bz2 |
Merge #1029
1029: Macro in trait impl r=CohenArthur a=CohenArthur
Needs #1028
You can just review the last commit to avoid reviewing twice. Sorry about that!
Co-authored-by: Arthur Cohen <arthur.cohen@embecosm.com>
Diffstat (limited to 'gcc/rust/parse/rust-parse-impl.h')
-rw-r--r-- | gcc/rust/parse/rust-parse-impl.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/rust/parse/rust-parse-impl.h b/gcc/rust/parse/rust-parse-impl.h index 0bbd8fb..82e7e24 100644 --- a/gcc/rust/parse/rust-parse-impl.h +++ b/gcc/rust/parse/rust-parse-impl.h @@ -5251,12 +5251,11 @@ Parser<ManagedTokenSource>::parse_inherent_impl_item () switch (t->get_id ()) { case IDENTIFIER: + // FIXME: Arthur: Do we need to some lookahead here? + return parse_macro_invocation_semi (outer_attrs); case SUPER: case SELF: case CRATE: - case DOLLAR_SIGN: - // these seem to be SimplePath tokens, so this is a macro invocation semi - return parse_macro_invocation_semi (std::move (outer_attrs)); case PUB: { // visibility, so not a macro invocation semi - must be constant, // function, or method @@ -5813,6 +5812,8 @@ Parser<ManagedTokenSource>::parse_external_item () const_TokenPtr t = lexer.peek_token (); switch (t->get_id ()) { + case IDENTIFIER: + return parse_macro_invocation_semi (outer_attrs); case STATIC_TOK: { // parse extern static item lexer.skip_token (); |