22 Commits

Author SHA1 Message Date
Seiichi Uchida
3027c21371 Handle raw identifiers 2018-06-25 23:36:45 +09:00
Nick Cameron
87edd75ecf TODO -> FIXME
Or just delete

Closes #25
2018-06-22 14:42:27 +12:00
Nick Cameron
1ead31ae9d
Merge pull request #2795 from jechase/issue-2794
Add test and fix for #2794
2018-06-20 10:35:16 +12:00
Josh Chase
ee5ff2d9e8 Add flag to the ListFormatting struct for nested imports 2018-06-19 12:13:35 -04:00
Nick Cameron
488e6fda12 Remove some unnecessary pubs 2018-06-19 14:36:50 +12:00
topecongiro
0c5631e4c1 Use correct span for UseTree 2018-04-28 16:05:02 +09:00
Seiichi Uchida
ac8ae00625
Cargo update and clippy (#2643) 2018-04-25 07:21:23 +09:00
Nick Cameron
55dd8f1df0
Merge pull request #2603 from topecongiro/merge-nested-imports
Merge imports
2018-04-12 16:40:06 +12:00
Nick Cameron
305c640553 Review changes 2018-04-11 10:50:19 +12:00
Nick Cameron
1c17dbbf74 rebasing 2018-04-11 10:46:49 +12:00
Nick Cameron
911395a451 Squash the various 'reorder imports' option into one
cc #2185
2018-04-11 10:46:49 +12:00
Seiichi Uchida
1954513ace Merge imports with the same prefix into a single nested import 2018-04-10 12:36:57 +09:00
Nick Cameron
b7ba6f70b1
Merge pull request #2576 from topecongiro/merge-imports
Use normalized form to format use items
2018-04-05 17:39:22 +12:00
memoryleak47
d48cbedfe4 typo (#2598)
* typo

* more typos
2018-04-05 12:47:09 +09:00
Seiichi Uchida
78e09bd05c Cargo fmt 2018-03-31 14:47:50 +09:00
Seiichi Uchida
01311c63ec Format normalized use item
This commit implements `Rewrite` trait on `UseTree`, which is a normalized
form of `ast::UseTree` for rustfmt.
2018-03-31 14:23:36 +09:00
topecongiro
b58a113370 Use UseSegment::Slf or UseSegment::Super when appropriate
Currently we `UseSegment::Ident` for all of the segments except the last.
E.g. `use super::foo::bar::self;` will be
`[Ident("super"), Ident("foo"), Ident("bar"), Self(None)]`.
in the current implementation. I think that this should be
`[Super(None), Ident("foo"), Ident("bar"), Self(None)]`.
instead.

I noticed this because some tests failed after updating
`rustc-ap-syntax` to 73.0.0.
2018-03-22 15:56:51 +09:00
topecongiro
846f4f21db Fix libsyntax updates
`ast::UseTreeKind::Simple` now takes `Option<ast::Ident>`
instead of `ast::Ident`.
2018-03-22 15:55:14 +09:00
Nick Cameron
0cf80dcce7 Better handle comments and newlines around erased imports 2018-03-20 09:27:31 +13:00
Nick Cameron
4cfffbd0a8 Reimplement import reordering. 2018-03-20 09:27:31 +13:00
Seiichi Uchida
0bd77f2681 Do not reorder inline modules 2018-03-02 21:53:24 +09:00
Nick Cameron
39301ae5f2 Go back to a non-workspace structure
Kinda reverts https://github.com/rust-lang-nursery/rustfmt/pull/2419
2018-03-02 14:58:23 +13:00