rust/tests/source
Eli Friedman 1c235de97d Fix crash speculatively parsing macro arguments as expressions.
The problem is essentially that if we try to parse a token tree using a
CodeMap different from the one the tree was originally parsed with,
spans become nonsense. Since CodeMaps can't be cloned, we're basically
forced to use the original ParseSess for additional parsing.

Ideally, rustfmt would be a bit more clever and figure out how to parse
macro arguments based on the definition of the macro itself, rather than
just guessing that a particular token sequence looks like an expression,
but this is good enough for now.

Fixes #538.
2015-10-27 23:41:32 -07:00
..
nestedmod Separate modules and files listing of reformatting 2015-08-02 13:07:27 +02:00
assignment.rs Format assignment 2015-08-25 21:43:13 +02:00
attrib.rs Implement Rewrite for [ast::Attribute] 2015-08-27 22:29:07 +02:00
chains-block-indented-base.rs Deal with floating links in chains 2015-10-22 22:30:01 +02:00
chains-no-overflow.rs General cleanup after rebase 2015-09-11 00:53:21 +02:00
chains.rs Restore idempotence for chain formatting 2015-10-23 20:37:45 +02:00
closure.rs Prevent generation of bogus comment in some function calls 2015-09-12 14:31:51 +02:00
comment.rs Fix large block comments 2015-10-19 23:06:36 +02:00
comment2.rs Fix doc comment regression and add tests. 2015-10-20 02:13:14 -07:00
comment3.rs Fix doc comment regression and add tests. 2015-10-20 02:13:14 -07:00
doc.rs Add a terrible, but useful, test which I used locally 2015-06-11 14:36:31 +12:00
empty_file.rs Add unittest for #115 2015-08-28 22:59:36 +02:00
enum.rs Refactor enum formatting 2015-10-19 21:28:05 +02:00
expr-no-hints.rs Refine chain breaking heuristics 2015-09-11 00:53:01 +02:00
expr.rs Force semicolons after break/continue/return. Remove after blocks. 2015-10-15 19:55:42 +02:00
extern.rs Properly indent pub fns in extern blocks 2015-10-16 23:05:11 +02:00
fn-custom-2.rs Support where predicates on the same line 2015-09-01 18:53:16 +12:00
fn-custom-3.rs Support where predicates on the same line 2015-09-01 18:53:16 +12:00
fn-custom-4.rs Support where clauses on the same line as the function decl where it all fits on one line. 2015-09-02 07:59:54 +12:00
fn-custom-5.rs Support where clause predicates at different indentations 2015-09-01 19:04:41 +12:00
fn-custom-6.rs Support struct-like layouts for fn args 2015-09-02 09:41:08 +12:00
fn-custom.rs Rename fn_args_layout to fn_args_density 2015-09-02 08:56:37 +12:00
fn-simple.rs Fix indentation for function arguments 2015-10-18 22:22:41 +02:00
hard-tabs.rs Indent uncontinued chains to block level 2015-10-14 19:41:29 +02:00
hello.rs implement framework for system tests 2015-06-05 17:50:22 +02:00
hello2.rs implement framework for system tests 2015-06-05 17:50:22 +02:00
imports-reorder.rs Add option to override single configuration lines for tests 2015-08-19 21:51:03 +02:00
imports.rs Format imports with aliases. 2015-09-26 18:12:25 +12:00
issue-510.rs Address some issues with multiline patterns in let statements 2015-10-24 13:13:15 +02:00
loop.rs Handle span error with continue 2015-08-20 08:11:14 +12:00
macro_not_expr.rs Add test for a macro not containing an exprssion 2015-10-23 13:46:14 -07:00
macros.rs Fix crash speculatively parsing macro arguments as expressions. 2015-10-27 23:41:32 -07:00
match.rs Bump match inner block indent a level 2015-10-23 21:39:26 +02:00
mod-1.rs Properly indent pub fns in extern blocks 2015-10-16 23:05:11 +02:00
mod-2.rs Fix #190 for submodules 2015-08-24 22:01:01 +02:00
multiple.rs Handle multi-line return types and multi-line tuples 2015-10-10 14:55:31 +13:00
no_new_line_beginning.rs Fix #190 for submodules 2015-08-24 22:01:01 +02:00
other.rs Add a terrible, but useful, test which I used locally 2015-06-11 14:36:31 +12:00
paths.rs Add failure mode to write_list 2015-09-07 20:35:25 +02:00
pattern.rs Fix indentation for enum-style patterns 2015-10-23 20:44:46 +02:00
single-line-if-else.rs Prevent nested if-else from being put on a single line. 2015-08-25 22:52:33 +02:00
static.rs Format visibility for statics and consts 2015-10-19 20:08:03 +02:00
string-lit.rs General cleanup after rebase 2015-09-11 00:53:21 +02:00
string_punctuation.rs Added punctuation preference 2015-10-02 08:37:21 -05:00
struct_lits.rs Fix tests 2015-09-26 18:35:17 +12:00
struct_lits_multiline.rs Implements struct_lit_force_multiline 2015-09-08 01:25:44 +02:00
struct_lits_visual.rs Fix tests 2015-09-26 18:35:17 +12:00
struct_lits_visual_multiline.rs Implements struct_lit_force_multiline 2015-09-08 01:25:44 +02:00
structs.rs Refactor enum formatting 2015-10-19 21:28:05 +02:00
trait.rs Don't use visit::walk_*. Instead, recurse by hand. 2015-10-21 13:46:13 -07:00
type.rs Format some patterns 2015-10-19 20:15:36 +02:00