aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJakub Dupak <dev@jakubdupak.com>2023-11-02 13:42:48 +0100
committerArthur Cohen <arthur.cohen@embecosm.com>2024-01-16 19:09:35 +0100
commit80bdb1a85ac6275eb7cdb963b257ba65168c8eb9 (patch)
treea0fc086a8467e25f8d9fc68b02b94d159c937d0b /gcc
parentf61184ee8cbee30392f43a2ffd7a3dca56282162 (diff)
downloadgcc-80bdb1a85ac6275eb7cdb963b257ba65168c8eb9.zip
gcc-80bdb1a85ac6275eb7cdb963b257ba65168c8eb9.tar.gz
gcc-80bdb1a85ac6275eb7cdb963b257ba65168c8eb9.tar.bz2
gccrs: HIR: remove obsole double borrow member
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>
Diffstat (limited to 'gcc')
-rw-r--r--gcc/rust/hir/rust-hir-dump.cc1
-rw-r--r--gcc/rust/hir/tree/rust-hir-expr.h3
-rw-r--r--gcc/rust/hir/tree/rust-hir.cc5
3 files changed, 0 insertions, 9 deletions
diff --git a/gcc/rust/hir/rust-hir-dump.cc b/gcc/rust/hir/rust-hir-dump.cc
index 4ce8f33..2fdf769 100644
--- a/gcc/rust/hir/rust-hir-dump.cc
+++ b/gcc/rust/hir/rust-hir-dump.cc
@@ -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");
diff --git a/gcc/rust/hir/tree/rust-hir-expr.h b/gcc/rust/hir/tree/rust-hir-expr.h
index 4c49d94..0e3e909 100644
--- a/gcc/rust/hir/tree/rust-hir-expr.h
+++ b/gcc/rust/hir/tree/rust-hir-expr.h
@@ -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 */
diff --git a/gcc/rust/hir/tree/rust-hir.cc b/gcc/rust/hir/tree/rust-hir.cc
index a3d6e1e..66f626b 100644
--- a/gcc/rust/hir/tree/rust-hir.cc
+++ b/gcc/rust/hir/tree/rust-hir.cc
@@ -1182,11 +1182,6 @@ BorrowExpr::as_string () const
{
std::string str ("&");
- if (double_borrow)
- {
- str += "&";
- }
-
if (is_mut ())
{
str += "mut ";