aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend/rust-compile-expr.cc
diff options
context:
space:
mode:
authorOwen Avery <powerboat9.gamer@gmail.com>2024-04-25 12:19:51 -0400
committerArthur Cohen <arthur.cohen@embecosm.com>2025-03-17 16:35:22 +0100
commit40b40970e648bd5f9a2edd2d8273544685176848 (patch)
tree5242ca4a5483c9b5e1493fcb8a8e1164fb00f433 /gcc/rust/backend/rust-compile-expr.cc
parentfd788dd543017cd801657b82bf80bb78e03479ed (diff)
downloadgcc-40b40970e648bd5f9a2edd2d8273544685176848.zip
gcc-40b40970e648bd5f9a2edd2d8273544685176848.tar.gz
gcc-40b40970e648bd5f9a2edd2d8273544685176848.tar.bz2
gccrs: Remove unused Context parameter for some backend methods
gcc/rust/ChangeLog: * backend/rust-compile-base.cc (HIRCompileBase::compile_function_body): Adjust unit_expression calls. (HIRCompileBase::unit_expression): Remove unused Context parameter. * backend/rust-compile-base.h (HIRCompileBase::unit_expression): Likewise. * backend/rust-compile-block.cc (CompileBlock::visit): Adjust unit_expression calls. * backend/rust-compile-expr.cc (CompileExpr::visit): Likewise. * backend/rust-compile-pattern.cc (CompilePatternLet::visit): Likewise. * backend/rust-compile-resolve-path.cc (ResolvePathRef::attempt_constructor_expression_lookup): Likewise. * backend/rust-compile-type.cc (TyTyResolveCompile::get_implicit_enumeral_node_type): Remove unused Context parameter. (TyTyResolveCompile::get_unit_type): Likewise. (TyTyResolveCompile::visit): Adjust get_implicit_enumeral_node_type and get_unit_type calls. * backend/rust-compile-type.h (TyTyResolveCompile::get_implicit_enumeral_node_type): Remove unused Context parameter. (TyTyResolveCompile::get_unit_type): Likewise. Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
Diffstat (limited to 'gcc/rust/backend/rust-compile-expr.cc')
-rw-r--r--gcc/rust/backend/rust-compile-expr.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/rust/backend/rust-compile-expr.cc b/gcc/rust/backend/rust-compile-expr.cc
index 0980e6c..4d43a44 100644
--- a/gcc/rust/backend/rust-compile-expr.cc
+++ b/gcc/rust/backend/rust-compile-expr.cc
@@ -76,7 +76,7 @@ CompileExpr::visit (HIR::TupleExpr &expr)
{
if (expr.is_unit ())
{
- translated = unit_expression (ctx, expr.get_locus ());
+ translated = unit_expression (expr.get_locus ());
return;
}
@@ -111,7 +111,7 @@ CompileExpr::visit (HIR::ReturnExpr &expr)
tree return_value = expr.has_return_expr ()
? CompileExpr::Compile (expr.return_expr.get (), ctx)
- : unit_expression (ctx, expr.get_locus ());
+ : unit_expression (expr.get_locus ());
if (expr.has_return_expr ())
{
@@ -401,7 +401,7 @@ CompileExpr::visit (HIR::StructExprStruct &struct_expr)
}
rust_assert (tyty->is_unit ());
- translated = unit_expression (ctx, struct_expr.get_locus ());
+ translated = unit_expression (struct_expr.get_locus ());
}
void