diff options
author | Owen Avery <powerboat9.gamer@gmail.com> | 2023-07-03 13:48:45 -0400 |
---|---|---|
committer | CohenArthur <arthur.cohen@embecosm.com> | 2023-07-10 08:31:35 +0000 |
commit | 1fe255e4928dd3a6d1ab574f92d472b1eea894c2 (patch) | |
tree | ad74dd82065268be9b53193414eb0ff7308aeb86 /gcc/rust/parse/rust-parse.h | |
parent | a06cec181de6398231e0662c1ed83d905ad6d1d9 (diff) | |
download | gcc-1fe255e4928dd3a6d1ab574f92d472b1eea894c2.zip gcc-1fe255e4928dd3a6d1ab574f92d472b1eea894c2.tar.gz gcc-1fe255e4928dd3a6d1ab574f92d472b1eea894c2.tar.bz2 |
Replace Linemap::unknown_location with UNKNOWN_LOCATION
gcc/rust/ChangeLog:
* rust-linemap.h (Linemap::unknown_location): Remove.
* ast/rust-ast.cc:
Replace Linemap::unknown_location with UNKNOWN_LOCATION.
* ast/rust-path.cc: Likewise.
* hir/tree/rust-hir.cc: Likewise.
* metadata/rust-imports.cc: Likewise.
* parse/rust-parse-impl.h: Likewise.
* parse/rust-parse.h: Likewise.
* rust-backend.h: Likewise.
* rust-diagnostics.cc: Likewise.
* rust-session-manager.cc: Likewise.
* typecheck/rust-tyty.cc: Likewise.
Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
Diffstat (limited to 'gcc/rust/parse/rust-parse.h')
-rw-r--r-- | gcc/rust/parse/rust-parse.h | 35 |
1 files changed, 15 insertions, 20 deletions
diff --git a/gcc/rust/parse/rust-parse.h b/gcc/rust/parse/rust-parse.h index 1d49c95..21540a3 100644 --- a/gcc/rust/parse/rust-parse.h +++ b/gcc/rust/parse/rust-parse.h @@ -139,7 +139,7 @@ public: std::unique_ptr<AST::BlockExpr> parse_block_expr (AST::AttrVec outer_attrs = AST::AttrVec (), - Location pratt_parsed_loc = Linemap::unknown_location ()); + Location pratt_parsed_loc = UNKNOWN_LOCATION); std::unique_ptr<AST::Item> parse_item (bool called_from_statement); std::unique_ptr<AST::Pattern> parse_pattern (); @@ -211,10 +211,9 @@ private: // first token parsed in the expression (the parsing of that first // token should be skipped). parse_qualified_path_in_expression (Location pratt_parsed_loc - = Linemap::unknown_location ()); - AST::QualifiedPathType - parse_qualified_path_type (Location pratt_parsed_loc - = Linemap::unknown_location ()); + = UNKNOWN_LOCATION); + AST::QualifiedPathType parse_qualified_path_type (Location pratt_parsed_loc + = UNKNOWN_LOCATION); AST::QualifiedPathInType parse_qualified_path_in_type (); // Token tree or macro related @@ -566,19 +565,18 @@ private: // token should be skipped). std::unique_ptr<AST::IfExpr> parse_if_expr (AST::AttrVec outer_attrs = AST::AttrVec (), - Location pratt_parsed_loc = Linemap::unknown_location ()); + Location pratt_parsed_loc = UNKNOWN_LOCATION); std::unique_ptr<AST::IfLetExpr> parse_if_let_expr (AST::AttrVec outer_attrs = AST::AttrVec (), - Location pratt_parsed_loc = Linemap::unknown_location ()); + Location pratt_parsed_loc = UNKNOWN_LOCATION); std::unique_ptr<AST::LoopExpr> parse_loop_expr (AST::AttrVec outer_attrs = AST::AttrVec (), AST::LoopLabel label = AST::LoopLabel::error (), - Location pratt_parsed_loc = Linemap::unknown_location ()); + Location pratt_parsed_loc = UNKNOWN_LOCATION); std::unique_ptr<AST::WhileLoopExpr> parse_while_loop_expr (AST::AttrVec outer_attrs = AST::AttrVec (), AST::LoopLabel label = AST::LoopLabel::error (), - Location pratt_parsed_loc - = Linemap::unknown_location ()); + Location pratt_parsed_loc = UNKNOWN_LOCATION); std::unique_ptr<AST::WhileLetLoopExpr> parse_while_let_loop_expr (AST::AttrVec outer_attrs = AST::AttrVec (), AST::LoopLabel label = AST::LoopLabel::error ()); @@ -587,7 +585,7 @@ private: AST::LoopLabel label = AST::LoopLabel::error ()); std::unique_ptr<AST::MatchExpr> parse_match_expr (AST::AttrVec outer_attrs = AST::AttrVec (), - Location pratt_parsed_loc = Linemap::unknown_location ()); + Location pratt_parsed_loc = UNKNOWN_LOCATION); AST::MatchArm parse_match_arm (); std::vector<std::unique_ptr<AST::Pattern> > parse_match_arm_patterns (TokenId end_token_id); @@ -608,25 +606,22 @@ private: // token should be skipped). std::unique_ptr<AST::ReturnExpr> parse_return_expr (AST::AttrVec outer_attrs = AST::AttrVec (), - Location pratt_parsed_loc = Linemap::unknown_location ()); + Location pratt_parsed_loc = UNKNOWN_LOCATION); std::unique_ptr<AST::BreakExpr> parse_break_expr (AST::AttrVec outer_attrs = AST::AttrVec (), - Location pratt_parsed_loc = Linemap::unknown_location ()); + Location pratt_parsed_loc = UNKNOWN_LOCATION); std::unique_ptr<AST::ContinueExpr> parse_continue_expr (AST::AttrVec outer_attrs = AST::AttrVec (), - Location pratt_parsed_loc - = Linemap::unknown_location ()); + Location pratt_parsed_loc = UNKNOWN_LOCATION); std::unique_ptr<AST::UnsafeBlockExpr> parse_unsafe_block_expr (AST::AttrVec outer_attrs = AST::AttrVec (), - Location pratt_parsed_loc - = Linemap::unknown_location ()); + Location pratt_parsed_loc = UNKNOWN_LOCATION); std::unique_ptr<AST::ArrayExpr> parse_array_expr (AST::AttrVec outer_attrs = AST::AttrVec (), - Location pratt_parsed_loc = Linemap::unknown_location ()); + Location pratt_parsed_loc = UNKNOWN_LOCATION); std::unique_ptr<AST::ExprWithoutBlock> parse_grouped_or_tuple_expr (AST::AttrVec outer_attrs = AST::AttrVec (), - Location pratt_parsed_loc - = Linemap::unknown_location ()); + Location pratt_parsed_loc = UNKNOWN_LOCATION); std::unique_ptr<AST::StructExprField> parse_struct_expr_field (); bool will_be_expr_with_block (); |