[gcc r14-7401] gccrs: Remove commented out TuplePatternItemsSingle

Arthur Cohen cohenarthur@gcc.gnu.org
Tue Jan 16 17:31:32 GMT 2024


https://gcc.gnu.org/g:aca5857334577456dd3d614743d35249c8f942c2

commit r14-7401-gaca5857334577456dd3d614743d35249c8f942c2
Author: Owen Avery <powerboat9.gamer@gmail.com>
Date:   Tue Feb 28 00:28:55 2023 -0500

    gccrs: Remove commented out TuplePatternItemsSingle
    
    gcc/rust/ChangeLog:
    
            * ast/rust-pattern.h: Remove commented out code.
    
    Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>

Diff:
---
 gcc/rust/ast/rust-pattern.h | 35 -----------------------------------
 1 file changed, 35 deletions(-)

diff --git a/gcc/rust/ast/rust-pattern.h b/gcc/rust/ast/rust-pattern.h
index d77dae25528..37df6ee869a 100644
--- a/gcc/rust/ast/rust-pattern.h
+++ b/gcc/rust/ast/rust-pattern.h
@@ -1222,41 +1222,6 @@ protected:
   virtual TuplePatternItems *clone_tuple_pattern_items_impl () const = 0;
 };
 
-// Class representing TuplePattern patterns where there is only a single pattern
-/*class TuplePatternItemsSingle : public TuplePatternItems {
-    // Pattern pattern;
-    std::unique_ptr<Pattern> pattern;
-
-  public:
-    TuplePatternItemsSingle(Pattern* pattern) : pattern(pattern) {}
-
-    // Copy constructor uses clone
-    TuplePatternItemsSingle(TuplePatternItemsSingle const& other) :
-      pattern(other.pattern->clone_pattern()) {}
-
-    // Destructor - define here if required
-
-    // Overload assignment operator to clone
-    TuplePatternItemsSingle& operator=(TuplePatternItemsSingle const& other) {
-	pattern = other.pattern->clone_pattern();
-
-	return *this;
-    }
-
-    // move constructors
-    TuplePatternItemsSingle(TuplePatternItemsSingle&& other) = default;
-    TuplePatternItemsSingle& operator=(TuplePatternItemsSingle&& other) =
-default;
-
-  protected:
-    // Use covariance to implement clone function as returning this object
-rather than base virtual TuplePatternItemsSingle*
-clone_tuple_pattern_items_impl() const override { return new
-TuplePatternItemsSingle(*this);
-    }
-};*/
-// removed in favour of single-element TuplePatternItemsMultiple
-
 // Class representing TuplePattern patterns where there are multiple patterns
 class TuplePatternItemsMultiple : public TuplePatternItems
 {


More information about the Gcc-cvs mailing list