rust/tests/source
Gaëtan Cassiers 9f98f725cb Detect when comments disappear
When the reformatted code doesn't contain the same quantity of comments
as the original code, use the original code instead of the reformatted
code.
This is done for all expressions and `let` statements.

This should be used at the finest grained level possible, to avoid that
a small disappearing comment prevents a big chunk of code to be
reformatted.

Kind of fixes (avoid disappearing comments, but prevents a good
formatting is such case) #285 #225 #563 #743
2016-01-10 15:20:58 +01:00
..
nested_skipped test ignored out of line modules 2015-12-24 00:15:29 +03: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 Option to disable line breaking in comments 2015-11-10 08:03:01 +13:00
chains-block-indented-base.rs Deal with floating links in chains 2015-10-22 22:30:01 +02:00
chains-indent-inherit.rs new config 'chain_indent' 2015-11-14 21:50:40 +01:00
chains-indent-tabbed.rs new config 'chain_indent' 2015-11-14 21:50:40 +01:00
chains-indent-visual.rs new config 'chain_indent' 2015-11-14 21:50:40 +01:00
chains-no-overflow.rs General cleanup after rebase 2015-09-11 00:53:21 +02:00
chains.rs Fix span issue with generic method calls 2015-11-13 14:53:34 +01:00
closure.rs Prevent generation of bogus comment in some function calls 2015-09-12 14:31:51 +02:00
comment2.rs Option to disable line breaking in comments 2015-11-10 08:03:01 +13:00
comment3.rs Option to disable line breaking in comments 2015-11-10 08:03:01 +13:00
comment4.rs Add normalise_comments option. 2015-12-10 09:29:03 +13:00
comment_crlf_newline.rs Avoid adding an extra newline after block comments 2015-11-20 23:31:05 +01:00
comment.rs Add normalise_comments option. 2015-12-10 09:29:03 +13: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-no_trailing_comma.rs Honor "enum_trailing_comma" option. Fixes #556 2015-11-03 23:57:31 +01:00
enum.rs Option to disable line breaking in comments 2015-11-10 08:03:01 +13:00
expr-no-hints.rs Refine chain breaking heuristics 2015-09-11 00:53:01 +02:00
expr.rs Option to disable line breaking in comments 2015-11-10 08:03:01 +13: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 Break function headers earlier 2015-12-01 22:09:37 +01:00
fn-single-line.rs Implement Rewrite for ast::Stmt 2015-11-19 14:23:56 -06:00
hard-tabs.rs Option to disable line breaking in comments 2015-11-10 08:03:01 +13:00
hello2.rs implement framework for system tests 2015-06-05 17:50:22 +02:00
hello.rs implement framework for system tests 2015-06-05 17:50:22 +02:00
impls.rs Make fn argument formatting more resilient for complex self types 2015-12-27 14:25:37 +01: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
item-brace-style-always-next-line.rs Properly follow the brace styles. 2015-11-18 22:34:14 -08:00
item-brace-style-prefer-same-line.rs Properly follow the brace styles. 2015-11-18 22:34:14 -08:00
item-brace-style-same-line-where.rs Properly follow the brace styles. 2015-11-18 22:34:14 -08:00
long_field_access.rs Fix long field accesses not being broken onto separate lines 2015-11-21 01:05:31 +01: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-block-trailing-comma.rs Update trailing comma match logic, add tests 2015-12-01 20:10:57 +13:00
match-nowrap-trailing-comma.rs Update trailing comma match logic, add tests 2015-12-01 20:10:57 +13:00
match-nowrap.rs Add option to disable (un)wrapping of match arms 2015-11-20 21:50:25 +01:00
match-wildcard-trailing-comma.rs Trailing commas for wildcard arms 2016-01-06 11:02:01 +09:00
match.rs Add commas after skipped arms when needed 2016-01-08 22:15:54 +09:00
mod_skip_child.rs test ignored out of line modules 2015-12-24 00:15:29 +03:00
mod-1.rs Rewrite module declarations 2015-11-21 21:06:29 +01:00
mod-2.rs Rewrite module declarations 2015-11-21 21:06:29 +01:00
multiple.rs Take rustfmt_skip attribute into account on modules 2015-11-23 09:20:53 +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 Detect when comments disappear 2016-01-10 15:20:58 +01: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_punctuation.rs Added punctuation preference 2015-10-02 08:37:21 -05:00
string-lit.rs Prevent incorrect backslash removal in strings 2015-12-25 18:50:40 +01:00
struct_lits_multiline.rs Comments in structs use appropriate style 2015-11-17 11:57:49 +13:00
struct_lits_visual_multiline.rs Option to disable line breaking in comments 2015-11-10 08:03:01 +13:00
struct_lits_visual.rs Fix last comment for visually formatted struct lits 2015-11-22 17:41:54 +01:00
struct_lits.rs Use tactic instead of config 2015-11-20 10:37:00 +13:00
structs.rs Merge pull request #678 from marcusklaas/length-one-tuplez 2015-12-07 09:01:38 +13:00
trait.rs Add regression test for overlong trait methods 2015-12-02 21:08:09 +01:00
type_alias.rs Don't remove where clauses in type aliases 2015-12-02 20:11:17 +01:00
type.rs Format some patterns 2015-10-19 20:15:36 +02:00
where-clause.rs Fix where clauses not taking the width of the line into account 2015-11-27 09:27:41 +01:00