]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
HIR: remove obsole double borrow member
authorJakub Dupak <dev@jakubdupak.com>
Thu, 2 Nov 2023 12:42:48 +0000 (13:42 +0100)
committerPhilip Herron <philip.herron@embecosm.com>
Thu, 2 Nov 2023 13:41:31 +0000 (13:41 +0000)
gcc/rust/ChangeLog:

* hir/rust-hir-dump.cc (Dump::visit): Remove obsolete member.
* hir/tree/rust-hir-expr.h (class BorrowExpr): Remove obsolete member.
* hir/tree/rust-hir.cc (BorrowExpr::as_string): Remove obsolete member.

Signed-off-by: Jakub Dupak <dev@jakubdupak.com>
gcc/rust/hir/rust-hir-dump.cc
gcc/rust/hir/tree/rust-hir-expr.h
gcc/rust/hir/tree/rust-hir.cc

index 8e31f2774382f46357a80d7f915bb469420f5552..28d73edb6c5c5a32861c0aa4fccb8076874f90d3 100644 (file)
@@ -808,7 +808,6 @@ Dump::visit (BorrowExpr &e)
   begin ("BorrowExpr");
   do_operatorexpr (e);
 
-  put_field ("double_borrow", std::to_string (e.is_double_borrow ()));
   put_field ("mut", enum_to_str (e.get_mut ()));
 
   end ("BorrowExpr");
index c5abeaa23a05fe7ef2ed8395b6e236600f9396c3..a13a34e0a25d80639bab92773c1802bd0e4d2b84 100644 (file)
@@ -213,7 +213,6 @@ public:
 class BorrowExpr : public OperatorExpr
 {
   Mutability mut;
-  bool double_borrow;
 
 public:
   std::string as_string () const override;
@@ -232,8 +231,6 @@ public:
   Mutability get_mut () const { return mut; }
   bool is_mut () const { return mut == Mutability::Mut; }
 
-  bool is_double_borrow () const { return double_borrow; }
-
 protected:
   /* Use covariance to implement clone function as returning this object rather
    * than base */
index f27cad55bc02989803fa538ab65b40230b9dec13..5e5c4f6aba9409da7269d6e3a747e475e25551ad 100644 (file)
@@ -1182,11 +1182,6 @@ BorrowExpr::as_string () const
 {
   std::string str ("&");
 
-  if (double_borrow)
-    {
-      str += "&";
-    }
-
   if (is_mut ())
     {
       str += "mut ";