Commit Graph

31 Commits

Author SHA1 Message Date
topecongiro
f81b94c7c1 Add a test for duplicated attributes on use items 2018-05-06 17:00:51 +09:00
csmoe
8c8676cd30 fix merge_mix 2018-05-03 10:26:53 +08:00
Nick Cameron
9f3f48c85c Fix broken test 2018-04-30 13:21:17 +12:00
Nick Cameron
e554d8617d
Merge branch 'master' into imports_indent 2018-04-30 11:50:53 +12:00
csmoe
ce5efaf16f update tests 2018-04-29 21:03:49 +08:00
topecongiro
23cdfdef38 Add tests for #2645 2018-04-28 16:03:26 +09:00
Seiichi Uchida
13964b739e Update tests
1. snake_case < CamelCase < UPPER_SNAKE_CASE
2. Use vertical layout for list with nested imports.
2018-03-31 13:16:36 +09:00
topecongiro
d7c7991ed1 Update a test 2018-03-22 16:01:41 +09:00
Nick Cameron
0cf80dcce7 Better handle comments and newlines around erased imports 2018-03-20 09:27:31 +13:00
Nick Cameron
fa75ef4663 fixup tests 2018-03-20 09:27:31 +13:00
Nick Cameron
50c95a074a cargo fmt 2018-03-20 09:27:31 +13:00
Nick Cameron
a76d9b529a format code and tests 2018-03-20 09:27:31 +13:00
Nick Cameron
4f522794ae Tidy up and pass tests 2018-03-02 15:07:13 +13:00
topecongiro
4af2aa3a9e Create rustfmt_core crate 2018-02-07 22:48:05 +09:00
Seiichi Uchida
d4a569848e Add tests for nested imports 2017-12-09 16:45:20 +09:00
Caleb Jones
fa242a5cd6 Fix #1858 - "Don't erase a use with attributes attached"
This prevents code like

    #[cfg(unix)]
    pub use self::unix::{};

from becoming

    #[cfg(unix)]

which would cause the attribute to be attached to the next item.
2017-08-06 19:53:57 -04:00
topecongiro
3bf66436e7 Update tests 2017-07-13 18:43:35 +09:00
Andy Russell
320f18345b
add test for root glob imports
Fixes #1472.
2017-07-12 12:53:02 -04:00
Nick Cameron
e7489356c6 Format glob imports
Fixes #1356
2017-03-08 10:12:42 +13:00
Sebastian Blunt
235f33b230
Make tests fail if rustfmt encounters an error
Previously tests would not fail if they encountered an error such as
LineOverflow or TrailingWhitespace. Making the tests error out will fix
this mismatch between running rustfmt for real and running the tests.

This also modifies all tests that previously contained errors so that
they no longer contain errors (in almost all of the tests this is
accomplished by setting error_on_line_overflow = false).
2017-02-19 19:57:02 +01:00
Nick Cameron
6572874965 Update to latest Syntex
As a side-effect of the Path changes, we are now a bit more aggressive about normalising paths.
2017-01-20 08:20:49 +13:00
Nick Cameron
846d7ad387 make rustfmt-normalize_comments false by default 2017-01-16 14:50:27 +13:00
Nick Cameron
21c085261b Remove self from use foo::bar::self;
Also adds the `normalize_imports` config option.

Fixes #1252
2017-01-06 17:02:56 +13:00
Julien Blanchard
b4e49ddbf5 Fix imports with absolute paths 2016-08-01 10:10:04 +02:00
Marcus Klaas
4b4dd170d8 Correct doc comment indentation for struct fields
Fix https://github.com/rust-lang-nursery/rustfmt/issues/572.
2015-11-22 22:55:57 +01:00
Nick Cameron
b2e7da0aa0 Format imports with aliases.
Closes #366
2015-09-26 18:12:25 +12:00
Marcus Klaas
d05a41c773 Add failure mode to write_list 2015-09-07 20:35:25 +02:00
Marcus Klaas
397d0d3d72 Format simple imports 2015-07-25 23:17:56 +02:00
Gaëtan Cassiers
30b16bc474 Move 'use' to Rewrite
Implements Rewrite for ViewPath

Behavior change: always use max_width instead of ideal_width for use
list rewrite. I think it looks better, was also suggested by @nrc in
https://github.com/nrc/rustfmt/issues/82#issuecomment-105314265
2015-07-25 19:00:38 +02:00
Marcus Klaas
482f200b0b Update import list formatting
Include comments and sort items alphabetically.
2015-06-26 03:43:12 +02:00
Marcus Klaas
98c9c6e9ef implement framework for system tests 2015-06-05 17:50:22 +02:00