]> git.lizzy.rs Git - rust.git/log
rust.git
7 years agoImprove comment rewriting with normalize_comments == false
est31 [Sat, 17 Sep 2016 01:20:00 +0000 (03:20 +0200)]
Improve comment rewriting with normalize_comments == false

Only change multiline comments of the form

```rust
/*
 * Text
 */
```

while not affecting comments of the form

```rust
/*
Text
*/
```

when normalize_comments is off. In the first case,
we have a known character we can align against, while
we don't have one in the second case.

Before, we have converted the second form into the first,
but this is against the spirit of normalize_comments being
turned off.

Fixes #956

7 years agoAdd three new options for spaces
est31 [Fri, 16 Sep 2016 23:44:51 +0000 (01:44 +0200)]
Add three new options for spaces

7 years agoUpdate to latest Syntex
Nick Cameron [Fri, 16 Sep 2016 03:19:18 +0000 (15:19 +1200)]
Update to latest Syntex

+ Cargo update
+ 0.6.2 release

7 years agoMerge pull request #1151 from sinkuu/issue1021
Nick Cameron [Tue, 13 Sep 2016 22:32:03 +0000 (15:32 -0700)]
Merge pull request #1151 from sinkuu/issue1021

Fix #1021: Handle `..` in tuple / tuple struct patterns

7 years agoFix #1021: Handle `..` in tuple / tuple struct patterns
sinkuu [Tue, 6 Sep 2016 09:03:47 +0000 (18:03 +0900)]
Fix #1021: Handle `..` in tuple / tuple struct patterns

7 years agoSplit impl at 'for' if a line break is needed (#1148)
dawirstejeck [Tue, 6 Sep 2016 05:11:56 +0000 (07:11 +0200)]
Split impl at 'for' if a line break is needed (#1148)

* Split impl at 'for' if a line break is needed

* Fix formatting

* Improve comments

* Skip second try if there is no 'for'

* Restore intentional trailing whitespace

* Change test source to be incorrectly formatted

* Restore more missing trailing whitespace

* Remove too much whitespace...

Really should learn how to use git revert.

7 years agoMerge pull request #1147 from brettcannon/patch-1
Nick Cameron [Mon, 5 Sep 2016 04:05:58 +0000 (16:05 +1200)]
Merge pull request #1147 from brettcannon/patch-1

Put rustfmt on PATH so `cargo fmt` works on Travis

7 years agoPut rustfmt on PATH so `cargo fmt` works on Travis
Brett Cannon [Sun, 4 Sep 2016 00:30:02 +0000 (17:30 -0700)]
Put rustfmt on PATH so `cargo fmt` works on Travis

Closes #1143

7 years agoMerge pull request #1135 from sinkuu/clippy
Nick Cameron [Mon, 29 Aug 2016 03:01:48 +0000 (15:01 +1200)]
Merge pull request #1135 from sinkuu/clippy

Run clippy

7 years agoRun clippy
sinkuu [Tue, 23 Aug 2016 14:14:45 +0000 (23:14 +0900)]
Run clippy

7 years agoMerge pull request #1134 from sinkuu/issue977
Nick Cameron [Sun, 28 Aug 2016 19:07:48 +0000 (07:07 +1200)]
Merge pull request #1134 from sinkuu/issue977

Fix #977

7 years agoFix #977
sinkuu [Tue, 23 Aug 2016 12:00:43 +0000 (21:00 +0900)]
Fix #977

7 years agoMerge pull request #1142 from kamalmarhubi/fix-1140
Nick Cameron [Sun, 28 Aug 2016 05:48:31 +0000 (17:48 +1200)]
Merge pull request #1142 from kamalmarhubi/fix-1140

Check term supports colour before printing fancy diffs

7 years agoCheck term supports colour before printing fancy diffs
Kamal Marhubi [Fri, 26 Aug 2016 21:08:47 +0000 (17:08 -0400)]
Check term supports colour before printing fancy diffs

For a terminal like DUMB, we were still attempting to print colourful
diffs, which failed with a `NotSupported` error.

Fixes #1140

7 years agoMerge pull request #1138 from johannhof/travis-docs
Nick Cameron [Thu, 25 Aug 2016 05:30:03 +0000 (17:30 +1200)]
Merge pull request #1138 from johannhof/travis-docs

Add instructions on how to run rustfmt on Travis

7 years agoAdd instructions on how to run rustfmt on Travis
Johann Hofmann [Wed, 24 Aug 2016 19:25:31 +0000 (21:25 +0200)]
Add instructions on how to run rustfmt on Travis

This adds very simplistic instructions on how to run rustfmt on CI.

I also wrote a blog post for more details: http://johannh.me/blog/rustfmt-ci.html

7 years agoFix issue 1124 - detect start of output rather than start of input file when writing...
Stuart Dootson [Wed, 24 Aug 2016 20:32:04 +0000 (21:32 +0100)]
Fix issue 1124 - detect start of output rather than start of input file when writing output source file (#1133)

* Change required to prevent a trailing space at the end of a separate module being propagated

* Detect the start of the output file rather than the start of the input file when deciding whether to output preceding snippets - this stops unnecessary whitespace and blank lines from being inserted when spans and statements are output in an order other than that from the input file.

* Add code to prevent space from being added with the prefix snippet if a) the snippet is entirely horizontal whitespace, or b) the snippet contains whitespace  followed by a newline. This prevents trailing spaces at the end of a line from being added.

* Tests for this issue

* Tidy up `match` statements

* Add test with blank lines between `use` statements

7 years agov0.6.0
Nick Cameron [Wed, 10 Aug 2016 21:53:58 +0000 (09:53 +1200)]
v0.6.0

7 years agoMerge pull request #1123 from juicejitsu/807
Nick Cameron [Wed, 10 Aug 2016 09:52:46 +0000 (21:52 +1200)]
Merge pull request #1123 from juicejitsu/807

Don't emit filename in diff mode, add filename to diff metadata

7 years agoFix #1120 - rework how the use list prefix is determined. (#1121)
Stuart Dootson [Wed, 10 Aug 2016 06:13:27 +0000 (08:13 +0200)]
Fix #1120 - rework how the use list prefix is determined. (#1121)

* Fix #1120 - rework how the use list prefix is determined.

* Added test commentary & another test case

7 years agoMerge pull request #1122 from studoot/add-test-for-1111
Nick Cameron [Wed, 10 Aug 2016 06:12:16 +0000 (18:12 +1200)]
Merge pull request #1122 from studoot/add-test-for-1111

Add test case for issue #1111

7 years agoDon't emit filename in diff mode, add filename to diff metadata
juicejitsu [Wed, 10 Aug 2016 01:21:04 +0000 (18:21 -0700)]
Don't emit filename in diff mode, add filename to diff metadata

7 years agoAdd commentary
Stuart Dootson [Tue, 9 Aug 2016 20:11:27 +0000 (22:11 +0200)]
Add commentary

7 years agoReformat the source to actually pass the tests!
Stuart Dootson [Tue, 9 Aug 2016 20:10:48 +0000 (22:10 +0200)]
Reformat the source to actually pass the tests!

7 years agoAdd test case for issue #1111, by adding another route by which a test file's config...
Stuart Dootson [Mon, 8 Aug 2016 21:13:45 +0000 (23:13 +0200)]
Add test case for issue #1111, by adding another route by which a test file's config can be located

7 years agoMerge pull request #1119 from HighCommander4/issue1109b
Nick Cameron [Fri, 5 Aug 2016 06:03:34 +0000 (18:03 +1200)]
Merge pull request #1119 from HighCommander4/issue1109b

Apply space_before_type_annotation to struct ctors (#1109)

7 years agoApply space_before_type_annotation to struct ctors (#1109)
Nathan Ridge [Thu, 4 Aug 2016 04:17:47 +0000 (00:17 -0400)]
Apply space_before_type_annotation to struct ctors (#1109)

7 years agoMerge pull request #1117 from pepyakin/issue-1116
Nick Cameron [Fri, 5 Aug 2016 04:29:41 +0000 (16:29 +1200)]
Merge pull request #1117 from pepyakin/issue-1116

Fix underflow in format_imports

7 years agoFix issue-1116
Sergey Pepyakin [Tue, 2 Aug 2016 22:25:54 +0000 (01:25 +0300)]
Fix issue-1116

7 years agoMerge pull request #1110 from HighCommander4/issue1109a
Nick Cameron [Wed, 3 Aug 2016 22:58:32 +0000 (10:58 +1200)]
Merge pull request #1110 from HighCommander4/issue1109a

Add two new whitespace options (#1109)

7 years agoMerge pull request #1118 from julienXX/change-multirust-to-rustup-in-readme
Nick Cameron [Wed, 3 Aug 2016 22:11:24 +0000 (10:11 +1200)]
Merge pull request #1118 from julienXX/change-multirust-to-rustup-in-readme

Update README with Rustup.rs instead of multirust

7 years agoUpdate README with Rustup.rs instead of multirust
Julien Blanchard [Wed, 3 Aug 2016 09:49:09 +0000 (11:49 +0200)]
Update README with Rustup.rs instead of multirust

7 years agoAdd two new whitespace options (#1109)
Nathan Ridge [Wed, 3 Aug 2016 01:07:56 +0000 (21:07 -0400)]
Add two new whitespace options (#1109)

* An option to leave a space before the colon in a type annotation

* An option to leave a space before the colon in a trait or lifetime bound

7 years agoMerge pull request #1052 from julienXX/fix-imports-with-absolute-paths
Nick Cameron [Mon, 1 Aug 2016 21:25:25 +0000 (09:25 +1200)]
Merge pull request #1052 from julienXX/fix-imports-with-absolute-paths

Fix imports with absolute paths

7 years agoFix imports with absolute paths
Julien Blanchard [Wed, 8 Jun 2016 11:00:11 +0000 (13:00 +0200)]
Fix imports with absolute paths

7 years agoFix overlong function signature (#1089)
dawirstejeck [Mon, 1 Aug 2016 04:25:00 +0000 (06:25 +0200)]
Fix overlong function signature (#1089)

* Fix issue-1049

* Add testcase suggested by pepyakin

* Fix last commit

* Handle special case

* Remove debugging println

* Fix grammar in comment

* Change word in comment

* Add test for long func without ret type

* Add one more test

7 years agoMultiple config file names feature (#1101)
Daniel Campoverde [Sun, 31 Jul 2016 21:32:35 +0000 (16:32 -0500)]
Multiple config file names feature (#1101)

* Add multiple configuration file names feature

* Add '.rustfmt.toml' in README file

* Clean up configuration file code

* Make config file names constant

* Use only one blank line

8 years agoFix overlong impl (#1091)
dawirstejeck [Tue, 26 Jul 2016 05:34:11 +0000 (07:34 +0200)]
Fix overlong impl (#1091)

* Fix issue-1048

* Take possible where-clause into account

* Move test to existing test set

* Fix wrong variable name

8 years agoAdd `use` declaration re-ordering (#1104)
Stuart Dootson [Tue, 26 Jul 2016 05:20:01 +0000 (06:20 +0100)]
Add `use` declaration re-ordering (#1104)

* Add config options for combinations of lines and items

* Reordering of import lines implemented.

* Changed nested matches to tuple pattern matching

* Added ordering of path list items to the ordering of use declarations

* Move `format_imports` and `format_import` methods to `imports.rs`

* Add comment to explain how `use` declarations are split off while walking through a module

* Change `ImportReordering` config option to separate boolean options

8 years agoCanonicalize file paths within the map of file line ranges (#1098)
Stuart Dootson [Mon, 18 Jul 2016 21:05:01 +0000 (22:05 +0100)]
Canonicalize file paths within the map of file line ranges (#1098)

* Canonicalize file paths within the map of file line ranges

* Forgot to run the tests - and of course, the formatting of the canonicalization change was off, but it's fixed now!

* Move imports to the top of the file, as per @nrc.

* Change `canonicalize_path_string` to return `Option<String>`, `None` indicating an error rather than an empty string

* `format!` is better than string concatenation...

* Change `canonicalize_path_string` to return `Result` rather than `Option`

8 years agoMerge pull request #1100 from studoot/add-appveyor-support
Nick Cameron [Sun, 17 Jul 2016 20:04:23 +0000 (08:04 +1200)]
Merge pull request #1100 from studoot/add-appveyor-support

Add Appveyor CI support

8 years agoAdd appveyor CI support
Stuart Dootson [Fri, 15 Jul 2016 09:37:23 +0000 (10:37 +0100)]
Add appveyor CI support

8 years agoMerge pull request #1088 from sinkuu/issue_1086
Nick Cameron [Sun, 10 Jul 2016 22:24:53 +0000 (10:24 +1200)]
Merge pull request #1088 from sinkuu/issue_1086

Fix formatting empty block comments (`/**/`)

8 years agoFix formatting empty block comments (`/**/`)
sinkuu [Sat, 9 Jul 2016 13:41:28 +0000 (22:41 +0900)]
Fix formatting empty block comments (`/**/`)

issue #1086

8 years agoMerge pull request #1084 from johannhof/rustfmt-not-found
Nick Cameron [Mon, 4 Jul 2016 09:30:52 +0000 (21:30 +1200)]
Merge pull request #1084 from johannhof/rustfmt-not-found

Show more helpful error if rustfmt is not in PATH.

8 years agoShow more helpful error if rustfmt is not in PATH.
Johann Hofmann [Sat, 2 Jul 2016 20:19:04 +0000 (22:19 +0200)]
Show more helpful error if rustfmt is not in PATH.

This fixes #1071.

8 years agoMerge pull request #1083 from KaivoAnastetiks/fix/easy-issue-repo
Nick Cameron [Mon, 4 Jul 2016 03:57:00 +0000 (15:57 +1200)]
Merge pull request #1083 from KaivoAnastetiks/fix/easy-issue-repo

Links to the rust-lang-nursery/rustfmt issue list.

8 years agorustup
Nick Cameron [Mon, 4 Jul 2016 03:46:58 +0000 (15:46 +1200)]
rustup

8 years agoLinks to the rust-lang-nursery/rustfmt issue list.
Kaivo Anastetiks [Sat, 2 Jul 2016 15:34:48 +0000 (11:34 -0400)]
Links to the rust-lang-nursery/rustfmt issue list.

8 years agoMerge pull request #1075 from johannhof/diff-exit
Nick Cameron [Wed, 22 Jun 2016 22:24:19 +0000 (10:24 +1200)]
Merge pull request #1075 from johannhof/diff-exit

Return failure exit code on found diffs (fix #906)

8 years agoReturn failure exit code on found diffs (fix #906)
Johann Hofmann [Mon, 20 Jun 2016 18:42:29 +0000 (20:42 +0200)]
Return failure exit code on found diffs (fix #906)

This changes rustfmt to return exit code 4
when run with write mode diff and differences between
the formatted code and the original code are found.

Useful for CI to make sure your contributors actually ran rustfmt.

8 years agoMerge pull request #1064 from dato/patch-2
Nick Cameron [Thu, 16 Jun 2016 08:35:00 +0000 (10:35 +0200)]
Merge pull request #1064 from dato/patch-2

Fix typo in path: ~/cargo/bin → ~/.cargo/bin

8 years agoFix typo in path: ~/cargo/bin → ~/.cargo/bin
Dato Simó [Wed, 15 Jun 2016 03:48:58 +0000 (00:48 -0300)]
Fix typo in path: ~/cargo/bin → ~/.cargo/bin

8 years agoMerge pull request #1054 from sanxiyn/loop-width
Nick Cameron [Tue, 14 Jun 2016 06:32:02 +0000 (08:32 +0200)]
Merge pull request #1054 from sanxiyn/loop-width

Fix width computation in Loop::rewrite

8 years agoFix width computation in Loop::rewrite
Seo Sanghyeon [Wed, 8 Jun 2016 15:43:08 +0000 (00:43 +0900)]
Fix width computation in Loop::rewrite

8 years agoInclude git commit and worktree status in version output (#1060)
Kamal Marhubi [Sun, 12 Jun 2016 08:38:03 +0000 (10:38 +0200)]
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.

8 years agoMerge pull request #1061 from marcusklaas/fix-subtract2
Nick Cameron [Fri, 10 Jun 2016 15:23:40 +0000 (17:23 +0200)]
Merge pull request #1061 from marcusklaas/fix-subtract2

Fix integer underflow in extra_offset

8 years agoFix integer underflow in extra_offset
Marcus Klaas [Fri, 10 Jun 2016 14:16:14 +0000 (16:16 +0200)]
Fix integer underflow in extra_offset

8 years agoMerge pull request #1059 from marcusklaas/fix-subtract
Nick Cameron [Fri, 10 Jun 2016 14:00:46 +0000 (16:00 +0200)]
Merge pull request #1059 from marcusklaas/fix-subtract

Fix integer underflow

8 years agoFix integer underflow
Marcus Klaas [Fri, 10 Jun 2016 13:09:27 +0000 (15:09 +0200)]
Fix integer underflow

8 years agoMerge pull request #1042 from imjacobclark/1014-refactoring-vector-string-to-join
Marcus Klaas de Vries [Tue, 7 Jun 2016 18:21:54 +0000 (20:21 +0200)]
Merge pull request #1042 from imjacobclark/1014-refactoring-vector-string-to-join

Refactor string collects to itertools join

8 years agoRefactoring exsisting filter_maps to maps
Jacob Clark [Mon, 6 Jun 2016 23:03:25 +0000 (00:03 +0100)]
Refactoring exsisting filter_maps to maps

8 years agoRefactor string collects to itertools join
Jacob Clark [Mon, 6 Jun 2016 21:30:40 +0000 (22:30 +0100)]
Refactor string collects to itertools join

8 years agoMerge pull request #1033 from marcusklaas/assignment-break
Nick Cameron [Sun, 5 Jun 2016 17:06:08 +0000 (18:06 +0100)]
Merge pull request #1033 from marcusklaas/assignment-break

Add test for general assignment breaks

8 years agoMerge pull request #1032 from marcusklaas/else-if-let-overflow
Nick Cameron [Sun, 5 Jun 2016 17:05:19 +0000 (18:05 +0100)]
Merge pull request #1032 from marcusklaas/else-if-let-overflow

Fix constraints on pattern formatting of else arms

8 years agoAdd test for general assignment breaks
Marcus Klaas [Sat, 4 Jun 2016 09:00:01 +0000 (11:00 +0200)]
Add test for general assignment breaks

8 years agoFix constraints on pattern formatting of else arms
Marcus Klaas [Fri, 3 Jun 2016 21:18:19 +0000 (23:18 +0200)]
Fix constraints on pattern formatting of else arms

8 years agoMerge pull request #1030 from nokaa/master
Nick Cameron [Fri, 3 Jun 2016 09:06:56 +0000 (10:06 +0100)]
Merge pull request #1030 from nokaa/master

Update Vim integration instructions

8 years agoUpdate Vim integration instructions
nokaa [Fri, 3 Jun 2016 07:52:48 +0000 (02:52 -0500)]
Update Vim integration instructions

8 years agoMerge pull request #1016 from rust-lang-nursery/try-double-indent
Nick Cameron [Wed, 1 Jun 2016 11:28:36 +0000 (12:28 +0100)]
Merge pull request #1016 from rust-lang-nursery/try-double-indent

Treat chains with just expr? specially.

8 years agoAdd support for the `default` keyword (#1025)
lqd [Tue, 31 May 2016 17:48:49 +0000 (19:48 +0200)]
Add support for the `default` keyword (#1025)

Adds support for Defaultness on impl methods.
Fixes #945

8 years agoMerge pull request #1023 from kamalmarhubi/diff-color-fix
Nick Cameron [Tue, 31 May 2016 14:27:11 +0000 (15:27 +0100)]
Merge pull request #1023 from kamalmarhubi/diff-color-fix

print_diff: Don't print color codes if output is not a tty

8 years agoprint_diff: Don't print color codes if output is not a tty
Kamal Marhubi [Tue, 31 May 2016 13:15:33 +0000 (15:15 +0200)]
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.

8 years agoMerge pull request #1007 from kamalmarhubi/basic-line-ranges-v2
Nick Cameron [Tue, 31 May 2016 07:45:45 +0000 (08:45 +0100)]
Merge pull request #1007 from kamalmarhubi/basic-line-ranges-v2

Add infrastructure for formatting specific line ranges

8 years agoREADME: Explain that --file-lines ranges are 1-based
Kamal Marhubi [Mon, 30 May 2016 22:42:14 +0000 (00:42 +0200)]
README: Explain that --file-lines ranges are 1-based

8 years agoExplain that FileLines cannot be given in rustfmt.toml
Kamal Marhubi [Mon, 30 May 2016 14:41:43 +0000 (16:41 +0200)]
Explain that FileLines cannot be given in rustfmt.toml

This adds a note to both the `--config-help` output for `file_lines`,
and to the panic message on attempting to deserialize a `FileLines`
struct.

8 years agocodemap: Add module description
Kamal Marhubi [Mon, 30 May 2016 14:10:26 +0000 (16:10 +0200)]
codemap: Add module description

8 years agoAdd copyright notices to added files
Kamal Marhubi [Mon, 30 May 2016 14:10:12 +0000 (16:10 +0200)]
Add copyright notices to added files

8 years agorustfmt: Add option to specify line ranges for formatting
Kamal Marhubi [Sun, 10 Apr 2016 17:03:54 +0000 (13:03 -0400)]
rustfmt: Add option to specify line ranges for formatting

This commit adds the `--experimental-file-lines` option to rustfmt. This
allows specifying line ranges to format from the command line.

Refs #434

8 years agovisitor: Handle specified line ranges in visit_stmt
Kamal Marhubi [Sat, 12 Mar 2016 00:19:16 +0000 (19:19 -0500)]
visitor: Handle specified line ranges in visit_stmt

This commit adds a very rough implementation of handling the specified
line ranges in `config.file_lines_map` for statements. It reformats a
statement if its span is fully contained in the set of lines specified
for the file.

The implementation here is intended as a proof of concept, and
demonstration that the machinery added in the preceding commits is
functional. A final implementation would likely hook in via the
`Rewrite` trait.

Refs #434

8 years agoAdd type to represent collection of lines in files
Kamal Marhubi [Thu, 26 May 2016 12:17:20 +0000 (14:17 +0200)]
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

8 years agocodemap: Add utilities for looking up line ranges of spans
Kamal Marhubi [Thu, 26 May 2016 11:49:19 +0000 (13:49 +0200)]
codemap: Add utilities for looking up line ranges of spans

This commit adds extension methods to `Codemap` to allow looking up line
ranges for spans.

Refs #434

8 years agoutils: Move codemap related utilities to a dedicated module
Kamal Marhubi [Wed, 25 May 2016 18:41:26 +0000 (20:41 +0200)]
utils: Move codemap related utilities to a dedicated module

This commit adds a `codemap` module, and moves the `CodemapSpanUtils`
added in #857 to it. This is preparation for adding more `Codemap`
specific utilities.

Refs #434

8 years agovisitor: Add debug log for FmtVisitor::visit_stmt()
Kamal Marhubi [Wed, 25 May 2016 18:41:26 +0000 (20:41 +0200)]
visitor: Add debug log for FmtVisitor::visit_stmt()

8 years agoDerive Debug for the Input enum
Kamal Marhubi [Wed, 25 May 2016 18:41:26 +0000 (20:41 +0200)]
Derive Debug for the Input enum

8 years agoMerge pull request #1017 from marcusklaas/tweak-if-else
Nick Cameron [Mon, 30 May 2016 13:57:29 +0000 (01:57 +1200)]
Merge pull request #1017 from marcusklaas/tweak-if-else

Format non-statement if-else expressions on a single line

8 years agoMerge pull request #1022 from kamalmarhubi/update-syntex-syntax
Nick Cameron [Mon, 30 May 2016 13:25:09 +0000 (01:25 +1200)]
Merge pull request #1022 from kamalmarhubi/update-syntex-syntax

deps: Update syntex_syntax to 0.33

8 years agoMerge pull request #1015 from srinivasreddy/readme
Nick Cameron [Mon, 30 May 2016 13:24:07 +0000 (01:24 +1200)]
Merge pull request #1015 from srinivasreddy/readme

Add section - Installing from source

8 years agodeps: Update syntex_syntax to 0.33
Kamal Marhubi [Mon, 30 May 2016 12:53:04 +0000 (14:53 +0200)]
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

8 years agoFormat non-statement if-else expressions on a single line
Marcus Klaas [Sun, 29 May 2016 15:58:38 +0000 (17:58 +0200)]
Format non-statement if-else expressions on a single line

8 years agoTreat chains with just expr? specially.
Nick Cameron [Sat, 28 May 2016 20:50:25 +0000 (21:50 +0100)]
Treat chains with just expr? specially.

Fixes #1004

8 years agoAdd section - Installing from source
Srinivas Reddy Thatiparthy [Sat, 28 May 2016 15:38:33 +0000 (21:08 +0530)]
Add section - Installing from source

8 years agoHandle pub(restricted) (#1013)
Kamal Marhubi [Fri, 27 May 2016 22:58:25 +0000 (00:58 +0200)]
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.

8 years agoMerge pull request #1008 from rust-lang-nursery/hrtb
Nick Cameron [Fri, 27 May 2016 22:08:00 +0000 (10:08 +1200)]
Merge pull request #1008 from rust-lang-nursery/hrtb

Don't ignore universal quantification in function types

8 years agoDon't ignore universal quantification in function types
Nick Cameron [Thu, 26 May 2016 22:39:28 +0000 (10:39 +1200)]
Don't ignore universal quantification in function types

Fixes #1006

8 years agoMerge pull request #1009 from rust-lang-nursery/fn-args-1
Nick Cameron [Fri, 27 May 2016 22:04:04 +0000 (10:04 +1200)]
Merge pull request #1009 from rust-lang-nursery/fn-args-1

Fix off by 2 error in function sigs

8 years agoFix off by 2 error in function sigs
Nick Cameron [Thu, 26 May 2016 23:49:26 +0000 (11:49 +1200)]
Fix off by 2 error in function sigs

Fixes #1000

This is a little conservative in some cases, but better than being wrong in others.

8 years agoDon't put a newline before `?` when it is the second sub-expression in a chain (...
Nick Cameron [Fri, 27 May 2016 08:33:19 +0000 (20:33 +1200)]
Don't put a newline before `?` when it is the second sub-expression in a chain (#1012)

Fixes #1003

8 years agoOptionally put short struct variants on one line (#997)
Nick Cameron [Wed, 18 May 2016 20:38:49 +0000 (08:38 +1200)]
Optionally put short struct variants on one line (#997)

Closes #418

8 years agoFormat inline attributes on out-of-line modules (#996)
Nick Cameron [Wed, 18 May 2016 20:36:59 +0000 (08:36 +1200)]
Format inline attributes on out-of-line modules (#996)

Fixes #838