public inbox for gcc-rust@gcc.gnu.org
 help / color / mirror / Atom feed
From: Mark Wielaard <mark@klomp.org>
To: gcc-rust@gcc.gnu.org
Cc: Mark Wielaard <mark@klomp.org>
Subject: [PATCH 1/2] Remove unused default_ty_param from TypeResolveGenericParam::visit
Date: Wed, 30 Jun 2021 00:11:34 +0200	[thread overview]
Message-ID: <20210629221135.309981-1-mark@klomp.org> (raw)

The default_ty_param was set, but not used. We do need to call TypeCheckType::Resolve
on the default param, but don't need the result.
---
 gcc/rust/typecheck/rust-hir-type-check-type.h | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/gcc/rust/typecheck/rust-hir-type-check-type.h b/gcc/rust/typecheck/rust-hir-type-check-type.h
index b4baccf4299..6081ec549ce 100644
--- a/gcc/rust/typecheck/rust-hir-type-check-type.h
+++ b/gcc/rust/typecheck/rust-hir-type-check-type.h
@@ -255,11 +255,9 @@ public:
 
   void visit (HIR::TypeParam &param) override
   {
-    TyTy::BaseType *default_ty_param = nullptr;
     if (param.has_type ())
-      {
-	default_ty_param = TypeCheckType::Resolve (param.get_type ().get ());
-      }
+      TypeCheckType::Resolve (param.get_type ().get ());
+
     resolved = new TyTy::ParamType (param.get_type_representation (),
 				    param.get_mappings ().get_hirid (), param);
   }
-- 
2.32.0


             reply	other threads:[~2021-06-29 22:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-29 22:11 Mark Wielaard [this message]
2021-06-29 22:11 ` [PATCH 2/2] Remove unused have_more_segments from TypeCheckExpr::resolve_root_path Mark Wielaard
2021-06-30  6:54   ` Marc

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210629221135.309981-1-mark@klomp.org \
    --to=mark@klomp.org \
    --cc=gcc-rust@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).