diff options
| author | Daniel Keep <daniel.keep@gmail.com> | 2016-04-25 02:04:01 +1000 |
|---|---|---|
| committer | Alex Burka <alex@alexburka.com> | 2017-04-15 19:06:19 +0000 |
| commit | a2489495d909c43cfbefaeb79db6a77b13908257 (patch) | |
| tree | dbd1690433ffb36b6bad7a56c3923e9313f0529a /src/libsyntax/print | |
| parent | ae23e65eb8f207d0c9be82e7f2043d98a32d4f57 (diff) | |
| download | rust-a2489495d909c43cfbefaeb79db6a77b13908257.tar.gz rust-a2489495d909c43cfbefaeb79db6a77b13908257.zip | |
Implementation of the `vis` macro matcher.
Diffstat (limited to 'src/libsyntax/print')
| -rw-r--r-- | src/libsyntax/print/pprust.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs index 433ba3d3693..2494af2c161 100644 --- a/src/libsyntax/print/pprust.rs +++ b/src/libsyntax/print/pprust.rs @@ -293,6 +293,7 @@ pub fn token_to_string(tok: &Token) -> String { token::NtGenerics(ref e) => generics_to_string(&e), token::NtWhereClause(ref e) => where_clause_to_string(&e), token::NtArg(ref e) => arg_to_string(&e), + token::NtVis(ref e) => vis_to_string(&e), } } } @@ -373,6 +374,10 @@ pub fn ident_to_string(id: ast::Ident) -> String { to_string(|s| s.print_ident(id)) } +pub fn vis_to_string(v: &ast::Visibility) -> String { + to_string(|s| s.print_visibility(v)) +} + pub fn fun_to_string(decl: &ast::FnDecl, unsafety: ast::Unsafety, constness: ast::Constness, |
