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.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/rust/backend/rust-compile-resolve-path.cc b/gcc/rust/backend/rust-compile-resolve-path.cc
index 58d9e8e..5f6ba7c 100644
--- a/gcc/rust/backend/rust-compile-resolve-path.cc
+++ b/gcc/rust/backend/rust-compile-resolve-path.cc
@@ -81,7 +81,7 @@ ResolvePathRef::attempt_constructor_expression_lookup (
tree compiled_adt_type = TyTyResolveCompile::compile (ctx, adt);
// make the ctor for the union
- HIR::Expr *discrim_expr = variant->get_discriminant ();
+ HIR::Expr &discrim_expr = variant->get_discriminant ();
tree discrim_expr_node = CompileExpr::Compile (discrim_expr, ctx);
tree folded_discrim_expr = fold_expr (discrim_expr_node);
tree qualifier = folded_discrim_expr;
@@ -301,7 +301,7 @@ HIRCompileBase::query_compile (HirId ref, TyTy::BaseType *lookup,
TyTy::BaseType *self = nullptr;
bool ok = ctx->get_tyctx ()->lookup_type (
- impl->get_type ()->get_mappings ().get_hirid (), &self);
+ impl->get_type ().get_mappings ().get_hirid (), &self);
rust_assert (ok);
if (!lookup->has_substitutions_defined ())