aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/ast/rust-item.h
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2022-11-15 11:01:12 +0000
committerGitHub <noreply@github.com>2022-11-15 11:01:12 +0000
commit815a57351a33491e534cc1b6c6ddfa17eaf2b500 (patch)
tree292bb3744e1908b39e0bfbfdb1e54aab3e2d2760 /gcc/rust/ast/rust-item.h
parent009337f5935882799fe520e98f0b233403254e41 (diff)
parent22977337faf0c1a80af36b00249aed30fa586f2d (diff)
downloadgcc-815a57351a33491e534cc1b6c6ddfa17eaf2b500.zip
gcc-815a57351a33491e534cc1b6c6ddfa17eaf2b500.tar.gz
gcc-815a57351a33491e534cc1b6c6ddfa17eaf2b500.tar.bz2
Merge #1631
1631: Ast dump where clause r=CohenArthur a=jdupak Adds dump of the where clause and recursively needed nodes. Adds visitor compatibility layer for general references except for unique pointers - needed for lifetimes. The enable is necessary to coexist with the unique_ptr overload. Depends on #1624 and will be rebased when it is merged. Co-authored-by: Jakub Dupak <dev@jakubdupak.com>
Diffstat (limited to 'gcc/rust/ast/rust-item.h')
-rw-r--r--gcc/rust/ast/rust-item.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/rust/ast/rust-item.h b/gcc/rust/ast/rust-item.h
index 20f1b93..09fad81 100644
--- a/gcc/rust/ast/rust-item.h
+++ b/gcc/rust/ast/rust-item.h
@@ -236,6 +236,8 @@ public:
// Returns whether the item has ForLifetimes
bool has_for_lifetimes () const { return !for_lifetimes.empty (); }
+ std::vector<LifetimeParam> &get_for_lifetimes () { return for_lifetimes; }
+
// Returns whether the item has type param bounds
bool has_type_param_bounds () const { return !type_param_bounds.empty (); }
@@ -901,6 +903,7 @@ public:
FunctionQualifiers get_qualifiers () { return qualifiers; }
+ Visibility &get_visibility () { return vis; }
const Visibility &get_visibility () const { return vis; }
protected:
@@ -1975,6 +1978,7 @@ public:
return field_type;
}
+ Visibility &get_visibility () { return visibility; }
const Visibility &get_visibility () const { return visibility; }
NodeId get_node_id () const { return node_id; }
@@ -2109,6 +2113,7 @@ public:
NodeId get_node_id () const { return node_id; }
+ Visibility &get_visibility () { return visibility; }
const Visibility &get_visibility () const { return visibility; }
Location get_locus () const { return locus; }
@@ -4150,6 +4155,7 @@ public:
Location get_locus () const { return locus; }
+ Visibility &get_visibility () { return visibility; }
const Visibility &get_visibility () const { return visibility; }
ExternalFunctionItem (