]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gccrs: HIR: remove obsole double borrow member
authorJakub Dupak <dev@jakubdupak.com>
Thu, 2 Nov 2023 12:42:48 +0000 (13:42 +0100)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 16 Jan 2024 18:09:35 +0000 (19:09 +0100)
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 4ce8f334b0940ab51094e9559f1d44565e6a333a..2fdf769c0de2dbfccc40368e0fc764b1f8679548 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 4c49d943317b6acb9a3d1a2a81432b3782b49081..0e3e909e15ce3d3991e3b8aad96df6dfcee9af31 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 a3d6e1ee27638d9c12dd14cd10140ada3a5a07e6..66f626ba84565220fcbdcdd4e1b1e125ad199817 100644 (file)
@@ -1182,11 +1182,6 @@ BorrowExpr::as_string () const
 {
   std::string str ("&");
 
-  if (double_borrow)
-    {
-      str += "&";
-    }
-
   if (is_mut ())
     {
       str += "mut ";