diff options
author | Jakub Dupak <dev@jakubdupak.com> | 2023-11-02 13:42:48 +0100 |
---|---|---|
committer | Philip Herron <philip.herron@embecosm.com> | 2023-11-02 13:41:31 +0000 |
commit | 0a2f8fc8f28066f05517a57bfa43551e238f01ac (patch) | |
tree | bfe4d8481fcd5417c6cc68682a702c42f4cb2447 /gcc | |
parent | 16182dc0509c5081aed3648b82aa9aaed9cadf21 (diff) | |
download | gcc-0a2f8fc8f28066f05517a57bfa43551e238f01ac.zip gcc-0a2f8fc8f28066f05517a57bfa43551e238f01ac.tar.gz gcc-0a2f8fc8f28066f05517a57bfa43551e238f01ac.tar.bz2 |
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.cc | 1 | ||||
-rw-r--r-- | gcc/rust/hir/tree/rust-hir-expr.h | 3 | ||||
-rw-r--r-- | gcc/rust/hir/tree/rust-hir.cc | 5 |
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 8e31f27..28d73ed 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 c5abeaa..a13a34e 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 f27cad5..5e5c4f6 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 "; |