Commit Graph

78 Commits

Author SHA1 Message Date
Nick Cameron
ed90489871 cargo update 2017-07-10 16:18:41 +12:00
Nick Cameron
818ff7a602 nightly-0.1.8 2017-07-05 15:59:24 +12:00
Nick Cameron
f028cbe760 nightly-0.1.7 2017-06-23 17:03:47 +12:00
Nick Cameron
c9d53e13d7 nightly-0.1.6 2017-06-23 16:30:19 +12:00
Nick Cameron
fbc95385d3 nightly-0.1.5 2017-06-20 17:00:01 +12:00
Nick Cameron
cd6092ebf9 nightly-0.1.4 2017-06-19 13:22:42 +12:00
Nick Cameron
34fa428471 make file_lines::Range public 2017-06-19 12:58:29 +12:00
Nick Cameron
562d218ce9 Update README for running the nightly version 2017-06-16 12:00:43 +12:00
Nick Cameron
5f1bab26c4 Move to Libsyntax 2017-06-14 14:01:56 +12:00
Nick Cameron
1f512948a0 Reformat source code using new defaults 2017-06-13 14:41:49 +12:00
Nick Cameron
67e26970c3 v0.8.5 + cargo update 2017-06-12 15:44:56 +12:00
est31
727963afe4 Update syntex_syntax
Bases on commit to switch to libsyntax by @nrc
2017-06-06 07:31:47 +02:00
Nick Cameron
a7b8dcc60d Simplify --version info 2017-05-25 16:39:44 +12:00
Nick Cameron
393ba27311 Remove dependency on Itertools 2017-05-25 16:23:07 +12:00
Nick Cameron
80f3b3c9c4 Remove multimap dep 2017-05-25 15:59:06 +12:00
Nick Cameron
219822ba3f Bump version of strings.rs and cargo update 2017-05-18 07:59:09 +12:00
Nick Cameron
18070f4041 bump version (0.8.4) and cargo update 2017-05-10 10:43:34 +12:00
est31
78d4ef1992 Drop rustc-serialize, use serde, update toml dependency 2017-05-03 10:23:50 +02:00
Nick Cameron
89f6aa2996 cargo update 2017-05-03 18:02:48 +12:00
Sheng Hau
0653b8413e Show exit codes' meanings with the rustfmt help message 2017-04-19 00:25:48 +08:00
Nick Cameron
fa732ede8b v0.8.2 2017-04-06 21:22:29 +12:00
Nick Cameron
7377dfc38c release v8.1 2017-03-28 13:19:59 +13:00
Nick Cameron
4ed5a3bac7 Bump version to 0.8 and cargo update 2017-03-08 10:18:10 +13:00
Nick Cameron
c9ac348759 Fix failing test 2017-03-02 15:03:32 +13:00
Nick Cameron
2261947f6e Catch attributes before comments
Closes #1280
Closes #1284
2017-01-26 15:10:47 +13: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
923423fa32 v0.7.0 and cargo update 2017-01-17 13:12:08 +13:00
Nick Cameron
32cb839855 Macros in types are possible
Fixes #1234
2017-01-06 16:06:09 +13:00
Erick Tryzelaar
836682eef4 Version bump for toml, unicode-segmentation, itertools, and walkdir 2016-12-23 11:26:23 -08:00
Erick Tryzelaar
e67ffcfb21 Update to the latest syntex module
One notable feature is this this adds support for the experimental
`let x = loop { ... break $expr; }` syntax. This also includes a
test for formatting all the break and continue variations.
2016-12-23 11:20:07 -08:00
Nick Cameron
d3eba76e4d update Serde, etc.
Lots of changes to how closures work
2016-11-21 11:02:18 +13:00
Nick Cameron
61ab06a92e v0.6.3 2016-11-20 10:37:34 +13:00
Nick Cameron
f1df5c1aa9 cargo update 2016-10-07 12:58:18 +13:00
Nick Cameron
4418fab4f2 Update to latest Syntex
+ Cargo update
+ 0.6.2 release
2016-09-16 15:28:02 +12:00
Nick Cameron
d022f05f34 v0.6.0 2016-08-11 10:08:59 +12:00
Nick Cameron
ddda46d265 rustup 2016-07-04 15:46:58 +12:00
Kamal Marhubi
5361f61110 Include git commit and worktree status in version output (#1060)
This will help in debugging issues as rustfmt gets more users.

If the working tree is clean, output looks like

    $ target/debug/rustfmt -V
    0.5.0 (9f5ed3b)

If the working tree is dirty, output looks like

    $ target/debug/rustfmt -V
    0.5.0 (9f5ed3b worktree dirty)

If git is unavailable, output looks like

    $ target/debug/rustfmt -V
    0.5.0 (git commit unavailable)

To avoid rebuilds on changing tests, the build script will only rerun if
files under src/ are changed. This means the actual git status may show
changed files and this would not show up in the version. This should not
be an issue as files not in src/ should not affect the build output.
2016-06-12 10:38:03 +02:00
Kamal Marhubi
9759068e62 print_diff: Don't print color codes if output is not a tty
On unix, `term::stdout()` just reads the `TERM` environment variable to
decide what features are available. It does not check if the output file
descriptor is in fact a tty. This resulted in printing escape codes when
redirecting output.
2016-05-31 15:15:33 +02:00
Kamal Marhubi
c311b30cac Add type to represent collection of lines in files
This commit adds a type to represent lines in files, and adds it to the
`Config` struct. It will be used for restricting formatting to specific
lines.

Refs #434
2016-05-31 01:24:38 +02:00
Kamal Marhubi
120e1a0b51 deps: Update syntex_syntax to 0.33
This bump brings syntex_syntax support for `..` in tuple and tuple
struct patterns, which come from RFC 1492:
  https://github.com/rust-lang/rfcs/blob/master/text/1492-dotdot-in-patterns.md

These new patterns are not properly handled in this PR; instead #1021
tracks supporting them.

Refs #1021
2016-05-30 14:53:04 +02:00
Kamal Marhubi
66cac1f3e9 Handle pub(restricted) (#1013)
* Handle pub(restricted)

This commit properly handles pub(restricted) as introduced in RFC 1422
[0]. The syntax support was added in #971, but they were not correctly
formatted.

[0] https://github.com/rust-lang/rfcs/blob/master/text/1422-pub-restricted.md

Fixes #970

* Drop #[inline] attribute on format_visibility

* Make newly non-failing functions return String

The change to `format_visibiilty` means that `format_header` and
`format_unit_struct` can no longer fail. Their return type is updated to
reflect that.
2016-05-28 00:58:25 +02:00
Nick Cameron
0fae34dfa1 Don't ignore universal quantification in function types
Fixes #1006
2016-05-27 15:09:04 -07:00
Nick Cameron
9b05461666 Write each file as it is formatted (#991)
The old behaviour stored everything in memory until we were finished. Now we write as soon as we can.

This gives better behaviour when formatting large programs, since there is some progress indication. It also opens the door to optimising memory use by not storing everything in memory unless it is required (which it still might be). That is left as future work though.
2016-05-15 11:41:05 +02:00
Kamal Marhubi
8309d1a74c deps: Update syntex_syntax to 0.32.0 2016-05-05 16:39:34 -04:00
Kamal Marhubi
fd38acb86f deps: Update syntex_syntax to 0.31.0
Most of the churn on this bump comes from the `Visibility` enum changing
from

    pub enum Visibility {
        Public,
        Inherited,
    }

to

    pub enum Visibility {
        Public,
        Crate,
        Restricted { path: P<Path>, id: NodeId },
        Inherited,
    }

which require taking `Visibility` by reference in most places. The new
variants are not handled at this point.

Refs #970
2016-05-01 23:06:58 -04:00
Nick Cameron
19849fea15 Update the world 2016-04-08 15:51:06 +12:00
Nick Cameron
5b11d2e80f Merge pull request #892 from marcusklaas/closed-ranges
Format closed ranges
2016-03-31 13:47:09 +13:00
Nick Cameron
19768da5c9 Version bump - v0.4
closes #870
2016-03-30 15:19:46 +13:00
Marcus Klaas
9eee93306a Format closed ranges 2016-03-29 23:58:45 +02:00
Kamal Marhubi
f2b5931c6d deps: Update syntex_syntax to 0.30.0
This bump includes ability to parse inclusive ranges (`a...b`) and the
question mark operator.

Refs #867, #890
2016-03-29 00:04:44 -04:00