diff options
| author | Alexander Regueiro <alexreg@me.com> | 2019-09-06 03:56:45 +0100 |
|---|---|---|
| committer | Alexander Regueiro <alexreg@me.com> | 2019-09-07 16:29:04 +0100 |
| commit | 49d2fd1725510fd3bf6f2937e178b1aa055ddb02 (patch) | |
| tree | a04455dea49b29d2c981573bd920116f0418024b /src/libsyntax/parse/tests.rs | |
| parent | ef54f57c5b9d894a38179d09b00610c1b337b086 (diff) | |
| download | rust-49d2fd1725510fd3bf6f2937e178b1aa055ddb02.tar.gz rust-49d2fd1725510fd3bf6f2937e178b1aa055ddb02.zip | |
Aggregation of cosmetic changes made during work on REPL PRs: libsyntax
Diffstat (limited to 'src/libsyntax/parse/tests.rs')
| -rw-r--r-- | src/libsyntax/parse/tests.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libsyntax/parse/tests.rs b/src/libsyntax/parse/tests.rs index 6a789ef99d6..5cb59b3f827 100644 --- a/src/libsyntax/parse/tests.rs +++ b/src/libsyntax/parse/tests.rs @@ -25,12 +25,12 @@ fn parse_item_from_source_str(name: FileName, source: String, sess: &ParseSess) new_parser_from_source_str(sess, name, source).parse_item() } -// produce a syntax_pos::span +// Produces a `syntax_pos::span`. fn sp(a: u32, b: u32) -> Span { Span::with_root_ctxt(BytePos(a), BytePos(b)) } -/// Parse a string, return an expr +/// Parses a string, return an expression. fn string_to_expr(source_str : String) -> P<ast::Expr> { let ps = ParseSess::new(FilePathMapping::empty()); with_error_checking_parse(source_str, &ps, |p| { @@ -38,7 +38,7 @@ fn string_to_expr(source_str : String) -> P<ast::Expr> { }) } -/// Parse a string, return an item +/// Parses a string, returns an item. fn string_to_item(source_str : String) -> Option<P<ast::Item>> { let ps = ParseSess::new(FilePathMapping::empty()); with_error_checking_parse(source_str, &ps, |p| { @@ -53,7 +53,7 @@ fn string_to_item(source_str : String) -> Option<P<ast::Item>> { }) } -// check the token-tree-ization of macros +// Checks the token-tree-ization of macros. #[test] fn string_to_tts_macro () { with_default_globals(|| { |
