]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gccrs: Add getter for non const lifetime object
authorRyutaro Okada <1015ryu88@gmail.com>
Tue, 24 Jun 2025 05:28:59 +0000 (22:28 -0700)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 5 Aug 2025 14:36:51 +0000 (16:36 +0200)
gcc/rust/ChangeLog:

* hir/tree/rust-hir-item.h (SelfParam::get_lifetime): Add getter
for non const lifetime object

Signed-off-by: Ryutaro Okada <1015ryu88@gmail.com>
gcc/rust/hir/tree/rust-hir-item.h

index 0f25b379dfa8c45271d4bbdec70d2380b9e7699c..8cedfe8647dce66de38cb2da40fcd417436841e6 100644 (file)
@@ -402,6 +402,8 @@ public:
 
   const Lifetime &get_lifetime () const { return lifetime.value (); }
 
+  Lifetime &get_lifetime () { return lifetime.value (); }
+
   std::string as_string () const;
 
   location_t get_locus () const { return locus; }