aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend/rust-compile-resolve-path.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/rust/backend/rust-compile-resolve-path.cc')
-rw-r--r--gcc/rust/backend/rust-compile-resolve-path.cc6
1 files changed, 1 insertions, 5 deletions
diff --git a/gcc/rust/backend/rust-compile-resolve-path.cc b/gcc/rust/backend/rust-compile-resolve-path.cc
index cbe2f67..97cfe9c 100644
--- a/gcc/rust/backend/rust-compile-resolve-path.cc
+++ b/gcc/rust/backend/rust-compile-resolve-path.cc
@@ -65,12 +65,8 @@ ResolvePathRef::resolve (const HIR::PathIdentSegment &final_segment,
return error_mark_node;
TyTy::ADTType *adt = static_cast<TyTy::ADTType *> (lookup);
-
- // it might be a unit-struct
if (adt->is_unit ())
- {
- return ctx->get_backend ()->unit_expression ();
- }
+ return unit_expression (ctx, expr_locus);
if (!adt->is_enum ())
return error_mark_node;