aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/ast/rust-pattern.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/rust/ast/rust-pattern.h')
-rw-r--r--gcc/rust/ast/rust-pattern.h32
1 files changed, 16 insertions, 16 deletions
diff --git a/gcc/rust/ast/rust-pattern.h b/gcc/rust/ast/rust-pattern.h
index abf6de6a043..eb80c730a9e 100644
--- a/gcc/rust/ast/rust-pattern.h
+++ b/gcc/rust/ast/rust-pattern.h
@@ -36,13 +36,13 @@ public:
// Constructor for a literal pattern
LiteralPattern (Literal lit, location_t locus)
: lit (std::move (lit)), locus (locus),
- node_id (Analysis::Mappings::get ()->get_next_node_id ())
+ node_id (Analysis::Mappings::get ().get_next_node_id ())
{}
LiteralPattern (std::string val, Literal::LitType type, location_t locus,
PrimitiveCoreType type_hint)
: lit (Literal (std::move (val), type, type_hint)), locus (locus),
- node_id (Analysis::Mappings::get ()->get_next_node_id ())
+ node_id (Analysis::Mappings::get ().get_next_node_id ())
{}
location_t get_locus () const override final { return locus; }
@@ -90,7 +90,7 @@ public:
std::unique_ptr<Pattern> to_bind = nullptr)
: Pattern (), variable_ident (std::move (ident)), is_ref (is_ref),
is_mut (is_mut), to_bind (std::move (to_bind)), locus (locus),
- node_id (Analysis::Mappings::get ()->get_next_node_id ())
+ node_id (Analysis::Mappings::get ().get_next_node_id ())
{}
IdentifierPattern (NodeId node_id, Identifier ident, location_t locus,
@@ -175,7 +175,7 @@ public:
std::string as_string () const override { return std::string (1, '_'); }
WildcardPattern (location_t locus)
- : locus (locus), node_id (Analysis::Mappings::get ()->get_next_node_id ())
+ : locus (locus), node_id (Analysis::Mappings::get ().get_next_node_id ())
{}
location_t get_locus () const override final { return locus; }
@@ -204,7 +204,7 @@ public:
std::string as_string () const override { return ".."; }
RestPattern (location_t locus)
- : locus (locus), node_id (Analysis::Mappings::get ()->get_next_node_id ())
+ : locus (locus), node_id (Analysis::Mappings::get ().get_next_node_id ())
{}
location_t get_locus () const override final { return locus; }
@@ -390,7 +390,7 @@ public:
bool has_ellipsis_syntax = false)
: lower (std::move (lower)), upper (std::move (upper)),
has_ellipsis_syntax (has_ellipsis_syntax), locus (locus),
- node_id (Analysis::Mappings::get ()->get_next_node_id ())
+ node_id (Analysis::Mappings::get ().get_next_node_id ())
{}
// Copy constructor with clone
@@ -469,7 +469,7 @@ public:
bool ref_has_two_amps, location_t locus)
: has_two_amps (ref_has_two_amps), is_mut (is_mut_reference),
pattern (std::move (pattern)), locus (locus),
- node_id (Analysis::Mappings::get ()->get_next_node_id ())
+ node_id (Analysis::Mappings::get ().get_next_node_id ())
{}
// Copy constructor requires clone
@@ -612,7 +612,7 @@ public:
std::vector<Attribute> outer_attribs,
location_t locus)
: StructPatternField (std::move (outer_attribs), locus,
- Analysis::Mappings::get ()->get_next_node_id ()),
+ Analysis::Mappings::get ().get_next_node_id ()),
index (index), tuple_pattern (std::move (tuple_pattern))
{}
@@ -692,7 +692,7 @@ public:
std::vector<Attribute> outer_attrs,
location_t locus)
: StructPatternField (std::move (outer_attrs), locus,
- Analysis::Mappings::get ()->get_next_node_id ()),
+ Analysis::Mappings::get ().get_next_node_id ()),
ident (std::move (ident)), ident_pattern (std::move (ident_pattern))
{}
@@ -771,7 +771,7 @@ public:
StructPatternFieldIdent (Identifier ident, bool is_ref, bool is_mut,
std::vector<Attribute> outer_attrs, location_t locus)
: StructPatternField (std::move (outer_attrs), locus,
- Analysis::Mappings::get ()->get_next_node_id ()),
+ Analysis::Mappings::get ().get_next_node_id ()),
has_ref (is_ref), has_mut (is_mut), ident (std::move (ident))
{}
@@ -926,7 +926,7 @@ public:
StructPatternElements elems
= StructPatternElements::create_empty ())
: path (std::move (struct_path)), elems (std::move (elems)),
- node_id (Analysis::Mappings::get ()->get_next_node_id ()), locus (locus)
+ node_id (Analysis::Mappings::get ().get_next_node_id ()), locus (locus)
{}
/* TODO: constructor to construct via elements included in
@@ -1146,7 +1146,7 @@ public:
TupleStructPattern (PathInExpression tuple_struct_path,
std::unique_ptr<TupleStructItems> items)
: path (std::move (tuple_struct_path)), items (std::move (items)),
- node_id (Analysis::Mappings::get ()->get_next_node_id ())
+ node_id (Analysis::Mappings::get ().get_next_node_id ())
{
rust_assert (this->items != nullptr);
}
@@ -1395,7 +1395,7 @@ public:
TuplePattern (std::unique_ptr<TuplePatternItems> items, location_t locus)
: items (std::move (items)), locus (locus),
- node_id (Analysis::Mappings::get ()->get_next_node_id ())
+ node_id (Analysis::Mappings::get ().get_next_node_id ())
{
rust_assert (this->items != nullptr);
}
@@ -1462,7 +1462,7 @@ public:
GroupedPattern (std::unique_ptr<Pattern> pattern_in_parens, location_t locus)
: pattern_in_parens (std::move (pattern_in_parens)), locus (locus),
- node_id (Analysis::Mappings::get ()->get_next_node_id ())
+ node_id (Analysis::Mappings::get ().get_next_node_id ())
{}
// Copy constructor uses clone
@@ -1521,7 +1521,7 @@ public:
SlicePattern (std::vector<std::unique_ptr<Pattern>> items, location_t locus)
: items (std::move (items)), locus (locus),
- node_id (Analysis::Mappings::get ()->get_next_node_id ())
+ node_id (Analysis::Mappings::get ().get_next_node_id ())
{}
// Copy constructor with vector clone
@@ -1588,7 +1588,7 @@ public:
AltPattern (std::vector<std::unique_ptr<Pattern>> alts, location_t locus)
: alts (std::move (alts)), locus (locus),
- node_id (Analysis::Mappings::get ()->get_next_node_id ())
+ node_id (Analysis::Mappings::get ().get_next_node_id ())
{}
// Copy constructor with vector clone