diff options
| author | Aleksey Kladov <aleksey.kladov@gmail.com> | 2019-08-31 16:03:54 +0300 |
|---|---|---|
| committer | Aleksey Kladov <aleksey.kladov@gmail.com> | 2019-09-06 22:04:36 +0300 |
| commit | 055d3798d40ca0eefa52fa152bf3c913240281af (patch) | |
| tree | a920e9be7d6f764e762b33acf98ee37094146474 | |
| parent | 4894123d21ed4b153a2e5c32c0870cb2d97f9b46 (diff) | |
| download | rust-055d3798d40ca0eefa52fa152bf3c913240281af.tar.gz rust-055d3798d40ca0eefa52fa152bf3c913240281af.zip | |
reduce visibility
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 22 | ||||
| -rw-r--r-- | src/libsyntax/util/parser.rs | 2 |
2 files changed, 12 insertions, 12 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 49b05551bae..ab5462baaf7 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -132,7 +132,7 @@ pub struct Parser<'a> { /// into modules, and sub-parsers have new values for this name. pub root_module_name: Option<String>, crate expected_tokens: Vec<TokenType>, - crate token_cursor: TokenCursor, + token_cursor: TokenCursor, desugar_doc_comments: bool, /// `true` we should configure out of line modules as we parse. pub cfg_mods: bool, @@ -161,19 +161,19 @@ impl<'a> Drop for Parser<'a> { } #[derive(Clone)] -crate struct TokenCursor { - crate frame: TokenCursorFrame, - crate stack: Vec<TokenCursorFrame>, +struct TokenCursor { + frame: TokenCursorFrame, + stack: Vec<TokenCursorFrame>, } #[derive(Clone)] -crate struct TokenCursorFrame { - crate delim: token::DelimToken, - crate span: DelimSpan, - crate open_delim: bool, - crate tree_cursor: tokenstream::Cursor, - crate close_delim: bool, - crate last_token: LastToken, +struct TokenCursorFrame { + delim: token::DelimToken, + span: DelimSpan, + open_delim: bool, + tree_cursor: tokenstream::Cursor, + close_delim: bool, + last_token: LastToken, } /// This is used in `TokenCursorFrame` above to track tokens that are consumed diff --git a/src/libsyntax/util/parser.rs b/src/libsyntax/util/parser.rs index a501541c959..fceaed360cd 100644 --- a/src/libsyntax/util/parser.rs +++ b/src/libsyntax/util/parser.rs @@ -69,7 +69,7 @@ pub enum Fixity { impl AssocOp { /// Creates a new AssocOP from a token - pub fn from_token(t: &Token) -> Option<AssocOp> { + crate fn from_token(t: &Token) -> Option<AssocOp> { use AssocOp::*; match t.kind { token::BinOpEq(k) => Some(AssignOp(k)), |
