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/3] Replace HIRItem::get_impl_locus with HirItem::get_locus
Date: Sun, 29 Aug 2021 03:02:06 +0200	[thread overview]
Message-ID: <20210829010206.409300-3-mark@klomp.org> (raw)
In-Reply-To: <20210829010206.409300-1-mark@klomp.org>

HIRItem::get_impl_locus wasn't used and all subclasses already
implement get_locus.
---
 gcc/rust/hir/tree/rust-hir-item.h | 6 ------
 gcc/rust/hir/tree/rust-hir.h      | 2 +-
 2 files changed, 1 insertion(+), 7 deletions(-)

diff --git a/gcc/rust/hir/tree/rust-hir-item.h b/gcc/rust/hir/tree/rust-hir-item.h
index 99fc91de117..7a2c2676825 100644
--- a/gcc/rust/hir/tree/rust-hir-item.h
+++ b/gcc/rust/hir/tree/rust-hir-item.h
@@ -1126,8 +1126,6 @@ public:
 
   Location get_locus () const override final { return locus; }
 
-  Location get_impl_locus () const final { return get_locus (); }
-
   void accept_vis (HIRVisitor &vis) override;
 
   Analysis::NodeMapping get_impl_mappings () const override
@@ -1268,8 +1266,6 @@ public:
 
   Location get_locus () const override final { return locus; }
 
-  Location get_impl_locus () const final { return get_locus (); }
-
   void accept_vis (HIRVisitor &vis) override;
 
   std::vector<std::unique_ptr<GenericParam> > &get_generic_params ()
@@ -2017,8 +2013,6 @@ public:
 
   Location get_locus () const override final { return locus; }
 
-  Location get_impl_locus () const final { return get_locus (); }
-
   void accept_vis (HIRVisitor &vis) override;
 
   Type *get_type () { return type.get (); }
diff --git a/gcc/rust/hir/tree/rust-hir.h b/gcc/rust/hir/tree/rust-hir.h
index b994d063452..8ba6308fdea 100644
--- a/gcc/rust/hir/tree/rust-hir.h
+++ b/gcc/rust/hir/tree/rust-hir.h
@@ -663,7 +663,7 @@ public:
 
   virtual Analysis::NodeMapping get_impl_mappings () const = 0;
 
-  virtual Location get_impl_locus () const = 0;
+  virtual Location get_locus () const = 0;
 };
 
 // A crate HIR object - holds all the data for a single compilation unit
-- 
2.32.0


  parent reply	other threads:[~2021-08-29  1:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-29  1:02 A few more location patches Mark Wielaard
2021-08-29  1:02 ` [PATCH 1/3] Use location when lowering TupleField Mark Wielaard
2021-08-29  1:02 ` Mark Wielaard [this message]
2021-08-29  1:02 ` [PATCH 3/3] Remove GetLocusFromImplItem visitor Mark Wielaard

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=20210829010206.409300-3-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).