diff options
Diffstat (limited to 'gcc/rust/ast/rust-ast-builder.cc')
-rw-r--r-- | gcc/rust/ast/rust-ast-builder.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/gcc/rust/ast/rust-ast-builder.cc b/gcc/rust/ast/rust-ast-builder.cc index 86290e1..08c52b1 100644 --- a/gcc/rust/ast/rust-ast-builder.cc +++ b/gcc/rust/ast/rust-ast-builder.cc @@ -17,6 +17,7 @@ // <http://www.gnu.org/licenses/>. #include "rust-ast-builder.h" +#include "optional.h" #include "rust-ast-builder-type.h" #include "rust-ast.h" #include "rust-common.h" @@ -136,7 +137,7 @@ Builder::tuple (std::vector<std::unique_ptr<Expr>> &&values) const std::unique_ptr<Param> Builder::self_ref_param (bool mutability) const { - return std::make_unique<SelfParam> (Lifetime::error (), mutability, loc); + return std::make_unique<SelfParam> (tl::nullopt, mutability, loc); } std::unique_ptr<Param> @@ -334,9 +335,9 @@ std::unique_ptr<BlockExpr> Builder::block (std::vector<std::unique_ptr<Stmt>> &&stmts, std::unique_ptr<Expr> &&tail_expr) const { - return std::unique_ptr<BlockExpr> ( - new BlockExpr (std::move (stmts), std::move (tail_expr), {}, {}, - LoopLabel::error (), loc, loc)); + return std::unique_ptr<BlockExpr> (new BlockExpr (std::move (stmts), + std::move (tail_expr), {}, + {}, tl::nullopt, loc, loc)); } std::unique_ptr<Expr> @@ -352,7 +353,7 @@ Builder::let (std::unique_ptr<Pattern> &&pattern, std::unique_ptr<Type> &&type, { return std::unique_ptr<Stmt> (new LetStmt (std::move (pattern), std::move (init), std::move (type), - {}, loc)); + tl::nullopt, {}, loc)); } std::unique_ptr<Expr> |