diff options
| author | Donato Sciarra <sciarp@gmail.com> | 2018-08-18 12:14:31 +0200 |
|---|---|---|
| committer | Donato Sciarra <sciarp@gmail.com> | 2018-08-19 23:01:01 +0200 |
| commit | 6138c82803a77a44e0a56cd8999299fa7f214afe (patch) | |
| tree | 7624fb64e14b12e4727175160e9704b5a8557e29 /src/libsyntax/parse | |
| parent | a2ff845f3a4ed88037b43d73ced372fd15e98ce5 (diff) | |
| download | rust-6138c82803a77a44e0a56cd8999299fa7f214afe.tar.gz rust-6138c82803a77a44e0a56cd8999299fa7f214afe.zip | |
fix tidy errors
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/lexer/mod.rs | 12 | ||||
| -rw-r--r-- | src/libsyntax/parse/mod.rs | 5 |
2 files changed, 9 insertions, 8 deletions
diff --git a/src/libsyntax/parse/lexer/mod.rs b/src/libsyntax/parse/lexer/mod.rs index 434548ffd9d..448ff9676c9 100644 --- a/src/libsyntax/parse/lexer/mod.rs +++ b/src/libsyntax/parse/lexer/mod.rs @@ -180,9 +180,9 @@ impl<'a> StringReader<'a> { } /// For comments.rs, which hackily pokes into next_pos and ch - fn new_raw(sess: &'a ParseSess, source_file: Lrc<syntax_pos::SourceFile>, override_span: Option<Span>) - -> Self - { + fn new_raw(sess: &'a ParseSess, + source_file: Lrc<syntax_pos::SourceFile>, + override_span: Option<Span>) -> Self { let mut sr = StringReader::new_raw_internal(sess, source_file, override_span); sr.bump(); @@ -221,9 +221,9 @@ impl<'a> StringReader<'a> { } } - pub fn new(sess: &'a ParseSess, source_file: Lrc<syntax_pos::SourceFile>, override_span: Option<Span>) - -> Self - { + pub fn new(sess: &'a ParseSess, + source_file: Lrc<syntax_pos::SourceFile>, + override_span: Option<Span>) -> Self { let mut sr = StringReader::new_raw(sess, source_file, override_span); if sr.advance_token().is_err() { sr.emit_fatal_errors(); diff --git a/src/libsyntax/parse/mod.rs b/src/libsyntax/parse/mod.rs index e3a2c83e4c2..adf01197c6d 100644 --- a/src/libsyntax/parse/mod.rs +++ b/src/libsyntax/parse/mod.rs @@ -240,8 +240,9 @@ fn file_to_source_file(sess: &ParseSess, path: &Path, spanopt: Option<Span>) } /// Given a source_file, produce a sequence of token-trees -pub fn source_file_to_stream(sess: &ParseSess, source_file: Lrc<SourceFile>, override_span: Option<Span>) - -> TokenStream { +pub fn source_file_to_stream(sess: &ParseSess, + source_file: Lrc<SourceFile>, + override_span: Option<Span>) -> TokenStream { let mut srdr = lexer::StringReader::new(sess, source_file, override_span); srdr.real_token(); panictry!(srdr.parse_all_token_trees()) |
