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 2/2] Remove unused have_more_segments from TypeCheckExpr::resolve_root_path
Date: Wed, 30 Jun 2021 00:11:35 +0200	[thread overview]
Message-ID: <20210629221135.309981-2-mark@klomp.org> (raw)
In-Reply-To: <20210629221135.309981-1-mark@klomp.org>

It isn't necessary to know whether there are more segments while
iteration through the expression segements.
---
 gcc/rust/typecheck/rust-hir-type-check-expr.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/gcc/rust/typecheck/rust-hir-type-check-expr.h b/gcc/rust/typecheck/rust-hir-type-check-expr.h
index e06b10d358a..327a9a06df7 100644
--- a/gcc/rust/typecheck/rust-hir-type-check-expr.h
+++ b/gcc/rust/typecheck/rust-hir-type-check-expr.h
@@ -1121,7 +1121,6 @@ private:
     for (size_t i = 0; i < expr.get_num_segments (); i++)
       {
 	HIR::PathExprSegment &seg = expr.get_segments ().at (i);
-	bool have_more_segments = i < expr.get_num_segments ();
 	bool is_root = *offset == 0;
 	NodeId ast_node_id = seg.get_mappings ().get_nodeid ();
 
-- 
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 [PATCH 1/2] Remove unused default_ty_param from TypeResolveGenericParam::visit Mark Wielaard
2021-06-29 22:11 ` Mark Wielaard [this message]
2021-06-30  6:54   ` [PATCH 2/2] Remove unused have_more_segments from TypeCheckExpr::resolve_root_path 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-2-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).