diff options
Diffstat (limited to 'gcc/rust/ast/rust-ast-full-test.cc')
-rw-r--r-- | gcc/rust/ast/rust-ast-full-test.cc | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/rust/ast/rust-ast-full-test.cc b/gcc/rust/ast/rust-ast-full-test.cc index 92325f1..d2940dd 100644 --- a/gcc/rust/ast/rust-ast-full-test.cc +++ b/gcc/rust/ast/rust-ast-full-test.cc @@ -18,6 +18,7 @@ along with GCC; see the file COPYING3. If not see <http://www.gnu.org/licenses/>. */ // FIXME: This does not work on Windows +#include <string> #include <unistd.h> #include "rust-ast-full.h" @@ -2357,6 +2358,18 @@ LifetimeParam::as_string () const } std::string +ConstGenericParam::as_string () const +{ + std::string str ("ConstGenericParam: "); + str += "const " + name + ": " + type->as_string (); + + if (default_value) + str += " = " + default_value->as_string (); + + return str; +} + +std::string MacroMatchFragment::as_string () const { return "$" + ident + ": " + frag_spec.as_string (); @@ -4879,6 +4892,12 @@ LifetimeParam::accept_vis (ASTVisitor &vis) } void +ConstGenericParam::accept_vis (ASTVisitor &vis) +{ + vis.visit (*this); +} + +void PathInExpression::accept_vis (ASTVisitor &vis) { vis.visit (*this); |