Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions gcc/rust/ast/rust-ast.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3713,9 +3713,12 @@ AttributeParser::parse_path_meta_item ()
skip_token ();

std::unique_ptr<Expr> expr = parser->parse_expr ();
// stream_pos++;
/* shouldn't be required anymore due to parsing literal actually
* skipping the token */

// handle error
// parse_expr should already emit an error and return nullptr
if (!expr)
return nullptr;

return std::unique_ptr<MetaItemPathExpr> (
new MetaItemPathExpr (std::move (path), std::move (expr)));
}
Expand Down
Loading