]> git.lizzy.rs Git - rust.git/log
rust.git
5 years agoFix parsing '#'-hiding of rustdoc
Seiichi Uchida [Sat, 4 Aug 2018 10:27:34 +0000 (19:27 +0900)]
Fix parsing '#'-hiding of rustdoc

5 years agoMerge pull request #2894 from gnzlbg/packed_simd
Seiichi Uchida [Sat, 4 Aug 2018 23:43:59 +0000 (08:43 +0900)]
Merge pull request #2894 from gnzlbg/packed_simd

add integration test rust-lang-nursery/packed_simd

5 years agoadd integration test rust-lang-nursery/packed_simd
gnzlbg [Sat, 4 Aug 2018 09:33:01 +0000 (11:33 +0200)]
add integration test rust-lang-nursery/packed_simd

5 years ago0.99.1
Nick Cameron [Fri, 3 Aug 2018 23:41:48 +0000 (11:41 +1200)]
0.99.1

5 years agoMerge pull request #2889 from topecongiro/issue-2888
Nick Cameron [Fri, 3 Aug 2018 23:26:09 +0000 (11:26 +1200)]
Merge pull request #2889 from topecongiro/issue-2888

Handle imports with items whose name contains digits

5 years agoRegard digits as an upper case character
Seiichi Uchida [Fri, 3 Aug 2018 11:06:36 +0000 (20:06 +0900)]
Regard digits as an upper case character

5 years agoAdd a test for #2888
Seiichi Uchida [Fri, 3 Aug 2018 11:06:29 +0000 (20:06 +0900)]
Add a test for #2888

5 years ago0.99.0 (1.0 RC)
Nick Cameron [Fri, 3 Aug 2018 08:42:00 +0000 (20:42 +1200)]
0.99.0 (1.0 RC)

5 years agoTiny clarification in README.md
Nick Cameron [Thu, 2 Aug 2018 09:09:52 +0000 (21:09 +1200)]
Tiny clarification in README.md

5 years agoMerge pull request #2881 from nrc/integration-failure
Nick Cameron [Wed, 1 Aug 2018 00:27:08 +0000 (12:27 +1200)]
Merge pull request #2881 from nrc/integration-failure

Fix the Failure integration test

5 years agoFix the Failure integration test
Nick Cameron [Wed, 1 Aug 2018 00:01:39 +0000 (12:01 +1200)]
Fix the Failure integration test

Fixes #2858

5 years agoAdd some tests I forgot about earlier
Nick Cameron [Tue, 31 Jul 2018 22:41:16 +0000 (10:41 +1200)]
Add some tests I forgot about earlier

5 years agoUpdate rustc-ap-syntax
Nick Cameron [Tue, 31 Jul 2018 22:39:45 +0000 (10:39 +1200)]
Update rustc-ap-syntax

5 years agoMerge pull request #2879 from RReverser/master
Nick Cameron [Tue, 31 Jul 2018 22:28:49 +0000 (10:28 +1200)]
Merge pull request #2879 from RReverser/master

Fix check for unstable features

5 years agoMerge pull request #2873 from aloucks/auto-detect-newline-style
Nick Cameron [Tue, 31 Jul 2018 22:06:31 +0000 (10:06 +1200)]
Merge pull request #2873 from aloucks/auto-detect-newline-style

Auto-detect newline style by default

5 years agoUse is_nightly helper instead of duplicate code
Ingvar Stepanyan [Tue, 31 Jul 2018 10:53:22 +0000 (11:53 +0100)]
Use is_nightly helper instead of duplicate code

5 years agoFix check for unstable features
Ingvar Stepanyan [Tue, 31 Jul 2018 10:50:09 +0000 (11:50 +0100)]
Fix check for unstable features

These features are registered only on Nightly and so matches.opt_present panics when it's called without the is_nightly guard.

5 years agoIncrease capacity for newline conversion buffer
Aaron Loucks [Tue, 31 Jul 2018 03:19:46 +0000 (23:19 -0400)]
Increase capacity for newline conversion buffer

5 years agoEmit 0 exit code for --version and similar operations
Nick Cameron [Tue, 31 Jul 2018 01:41:49 +0000 (13:41 +1200)]
Emit 0 exit code for --version and similar operations

Fixes #2878

5 years agoWarn the user if using an unstable option without `--unstable-options`
Nick Cameron [Mon, 30 Jul 2018 22:02:32 +0000 (10:02 +1200)]
Warn the user if using an unstable option without `--unstable-options`

Fixes #2796

5 years agoMerge pull request #2874 from cavedweller/master
Nick Cameron [Mon, 30 Jul 2018 20:52:07 +0000 (08:52 +1200)]
Merge pull request #2874 from cavedweller/master

Format Async block and async fn

5 years agofix nits
Benjamin Brittain [Mon, 30 Jul 2018 00:20:11 +0000 (17:20 -0700)]
fix nits

5 years agoUpdating newline_style documentation
Aaron Loucks [Sun, 29 Jul 2018 21:02:32 +0000 (17:02 -0400)]
Updating newline_style documentation

5 years agoMerge pull request #2872 from aaudiber/raw-ident-struct-expr
Nick Cameron [Sun, 29 Jul 2018 20:29:45 +0000 (08:29 +1200)]
Merge pull request #2872 from aaudiber/raw-ident-struct-expr

Support raw identifiers in struct expressions

5 years agoMerge pull request #2870 from dcarosone/edition-readme
Nick Cameron [Sun, 29 Jul 2018 20:25:02 +0000 (08:25 +1200)]
Merge pull request #2870 from dcarosone/edition-readme

call out edition config in Readme: Quick start (#2837)

5 years agoAdd tests for async & async move
Ben Brittain [Sun, 29 Jul 2018 15:45:31 +0000 (08:45 -0700)]
Add tests for async & async move

5 years agoFormat Async block and async fn
Ben Brittain [Sun, 29 Jul 2018 14:37:24 +0000 (07:37 -0700)]
Format Async block and async fn

5 years agoAuto-detect newline style by default
Aaron Loucks [Sat, 28 Jul 2018 20:18:58 +0000 (16:18 -0400)]
Auto-detect newline style by default

5 years agoSupport raw identifiers in struct expressions
Andrew Audibert [Sun, 29 Jul 2018 02:38:14 +0000 (19:38 -0700)]
Support raw identifiers in struct expressions

5 years agocall out edition config in Quick start (#2837)
Daniel Carosone [Sat, 28 Jul 2018 08:04:55 +0000 (18:04 +1000)]
call out edition config in Quick start (#2837)

5 years agoMerge pull request #2864 from topecongiro/issue-2863
Nick Cameron [Fri, 27 Jul 2018 04:24:46 +0000 (16:24 +1200)]
Merge pull request #2864 from topecongiro/issue-2863

Modify the rule for reordering impl items

5 years agoMerge pull request #2862 from topecongiro/issue-2852
Nick Cameron [Fri, 27 Jul 2018 04:24:11 +0000 (16:24 +1200)]
Merge pull request #2862 from topecongiro/issue-2852

Preserve parens in trait bounds

5 years agoMerge pull request #2865 from rust-lang-nursery/update-libsyntax-to-209
Nick Cameron [Fri, 27 Jul 2018 03:22:51 +0000 (15:22 +1200)]
Merge pull request #2865 from rust-lang-nursery/update-libsyntax-to-209

Update rustc-ap-syntax to 209.0.0.

5 years agoUpdate rustc-ap-syntax to 209.0.0.
kennytm [Thu, 26 Jul 2018 21:49:44 +0000 (05:49 +0800)]
Update rustc-ap-syntax to 209.0.0.

This should fix the breakage caused by rust-lang/rust#51587.

5 years agoModify the rule for reordering impl items
Seiichi Uchida [Thu, 26 Jul 2018 12:35:56 +0000 (21:35 +0900)]
Modify the rule for reordering impl items

1. If two items have the same kind, then reorder them based on its ident.
2. Handle existential type.

5 years agoAdd a test for #2863
Seiichi Uchida [Thu, 26 Jul 2018 12:35:48 +0000 (21:35 +0900)]
Add a test for #2863

5 years agoPreserve parens in trait bounds
Seiichi Uchida [Wed, 25 Jul 2018 09:27:25 +0000 (18:27 +0900)]
Preserve parens in trait bounds

5 years agoAdd and update tests for trait with paren
Seiichi Uchida [Wed, 25 Jul 2018 09:27:02 +0000 (18:27 +0900)]
Add and update tests for trait with paren

5 years agoMerge pull request #2861 from topecongiro/issue-2859
Nick Cameron [Wed, 25 Jul 2018 09:22:25 +0000 (21:22 +1200)]
Merge pull request #2861 from topecongiro/issue-2859

Put lifetimes after trait when they gets orphaned

5 years agoMerge pull request #2834 from topecongiro/issue-2830
Nick Cameron [Wed, 25 Jul 2018 09:21:30 +0000 (21:21 +1200)]
Merge pull request #2834 from topecongiro/issue-2830

Keep the context that we are inside macro in nested macro

5 years agoRename test files
Seiichi Uchida [Wed, 25 Jul 2018 09:16:10 +0000 (18:16 +0900)]
Rename test files

5 years agoVeto converting delimiters inside nested macro
Seiichi Uchida [Tue, 24 Jul 2018 22:16:43 +0000 (07:16 +0900)]
Veto converting delimiters inside nested macro

5 years agoPut lifetimes after trait when they gets orphaned
Seiichi Uchida [Tue, 24 Jul 2018 23:34:43 +0000 (08:34 +0900)]
Put lifetimes after trait when they gets orphaned

5 years agoAdd a test for #2859
Seiichi Uchida [Tue, 24 Jul 2018 23:33:41 +0000 (08:33 +0900)]
Add a test for #2859

5 years agoKeep the inside macro context in nested macro call
Seiichi Uchida [Tue, 24 Jul 2018 22:15:33 +0000 (07:15 +0900)]
Keep the inside macro context in nested macro call

5 years agoAdd tests for #2830 and #2857
Seiichi Uchida [Tue, 24 Jul 2018 22:13:51 +0000 (07:13 +0900)]
Add tests for #2830 and #2857

5 years agoMerge pull request #2860 from topecongiro/rustc-ap-syntax
Nick Cameron [Tue, 24 Jul 2018 19:22:08 +0000 (07:22 +1200)]
Merge pull request #2860 from topecongiro/rustc-ap-syntax

Format existetenial type

5 years agoAdd a test for associated existential type
Seiichi Uchida [Tue, 24 Jul 2018 15:42:19 +0000 (00:42 +0900)]
Add a test for associated existential type

5 years agoRemove span from rewrite_generics's parameter
Seiichi Uchida [Tue, 24 Jul 2018 15:34:46 +0000 (00:34 +0900)]
Remove span from rewrite_generics's parameter

We can just use the span from ast::Generics.

5 years agoFormat exitential type
Seiichi Uchida [Tue, 24 Jul 2018 15:30:01 +0000 (00:30 +0900)]
Format exitential type

5 years agoAdd a simple test for exitential type
Seiichi Uchida [Tue, 24 Jul 2018 15:29:45 +0000 (00:29 +0900)]
Add a simple test for exitential type

5 years agoCargo update
Seiichi Uchida [Tue, 24 Jul 2018 15:22:27 +0000 (00:22 +0900)]
Cargo update

Update `rustc-ap-*` to "206.0.0".

5 years agoRemove `Summary`
Nick Cameron [Tue, 24 Jul 2018 09:41:49 +0000 (21:41 +1200)]
Remove `Summary`

5 years agoMerge pull request #2838 from nrc/chains
Nick Cameron [Tue, 24 Jul 2018 03:50:49 +0000 (15:50 +1200)]
Merge pull request #2838 from nrc/chains

Refactor chain formatting and fix some bugs

5 years agoReformatting after rebase
Nick Cameron [Tue, 24 Jul 2018 03:48:23 +0000 (15:48 +1200)]
Reformatting after rebase

5 years agoAdd tests
Nick Cameron [Thu, 12 Jul 2018 02:08:16 +0000 (14:08 +1200)]
Add tests

Closes #2773
Closes #2786

5 years agofixup tests
Nick Cameron [Thu, 12 Jul 2018 02:05:50 +0000 (14:05 +1200)]
fixup tests

5 years agochains: fix visual indent chain layout
Nick Cameron [Wed, 11 Jul 2018 22:44:06 +0000 (10:44 +1200)]
chains: fix visual indent chain layout

5 years agochains: treat some string lits as blocks
Nick Cameron [Wed, 11 Jul 2018 10:06:30 +0000 (22:06 +1200)]
chains: treat some string lits as blocks

5 years agoformatting
Nick Cameron [Wed, 11 Jul 2018 09:35:10 +0000 (21:35 +1200)]
formatting

5 years agochains: prefer to use the next line for an expression, if using the same line would...
Nick Cameron [Wed, 11 Jul 2018 09:01:40 +0000 (21:01 +1200)]
chains: prefer to use the next line for an expression, if using the same line would introduce an open block or similar

This problem came to light due to the chains changes, but effects other code too. It only happens rarely, e.g.,

before this fix:
```
    match foo {
        MacroArgKind::Delimited(ref delim_tok, ref args) => rewrite_delimited_inner(
            delim_tok,
            args,
        ).map(|(lhs, inner, rhs)| format!("{}{}{}", lhs, inner, rhs)),
    };

```

after:
```
    match foo {
        MacroArgKind::Delimited(ref delim_tok, ref args) => {
            rewrite_delimited_inner(delim_tok, args)
                .map(|(lhs, inner, rhs)| format!("{}{}{}", lhs, inner, rhs))
        }
    }

```

5 years agochains: minor fixups
Nick Cameron [Wed, 11 Jul 2018 02:56:26 +0000 (14:56 +1200)]
chains: minor fixups

* remove unnecessary clone
* comment formatting
* fix bug with `?` collection
* respect the heuristic if the root is more than just the parent

5 years agochains: share code between block and visual formatters
Nick Cameron [Wed, 11 Jul 2018 02:50:42 +0000 (14:50 +1200)]
chains: share code between block and visual formatters

5 years agochains: refactor formatting of chain items
Nick Cameron [Wed, 11 Jul 2018 01:39:35 +0000 (13:39 +1200)]
chains: refactor formatting of chain items

5 years agochains: factor into objects
Nick Cameron [Wed, 11 Jul 2018 00:01:39 +0000 (12:01 +1200)]
chains: factor into objects

5 years agochains: more refactoring of visual formatting
Nick Cameron [Tue, 10 Jul 2018 03:14:44 +0000 (15:14 +1200)]
chains: more refactoring of visual formatting

5 years agochains: refactor block formatting
Nick Cameron [Tue, 10 Jul 2018 00:24:45 +0000 (12:24 +1200)]
chains: refactor block formatting

5 years agochains: further simplification
Nick Cameron [Mon, 9 Jul 2018 09:09:25 +0000 (21:09 +1200)]
chains: further simplification

5 years agochains: refactoring
Nick Cameron [Mon, 9 Jul 2018 08:45:30 +0000 (20:45 +1200)]
chains: refactoring

pre-process the expression tree to get a list of chain items.

5 years agochains: simplify visual formatting a bit
Nick Cameron [Mon, 9 Jul 2018 02:18:58 +0000 (14:18 +1200)]
chains: simplify visual formatting a bit

5 years agofactor out treatment of 1-length chains
Nick Cameron [Mon, 9 Jul 2018 01:10:57 +0000 (13:10 +1200)]
factor out treatment of 1-length chains

And create `Chain` and `ChainItem` structs

5 years agochains: split handling of chains in block and visual cases
Nick Cameron [Mon, 9 Jul 2018 01:02:14 +0000 (13:02 +1200)]
chains: split handling of chains in block and visual cases

Just refactoring, lots of code dup here, but it should get better...

5 years agoChanges to chains with block indent
Nick Cameron [Sun, 8 Jul 2018 21:13:33 +0000 (09:13 +1200)]
Changes to chains with block indent

* More often combine a chain item to the previous line (if it is a block)
* Don't indent if the parent is a block

This is not perfect and doesn't pass tests, but I need to refactor to make more
progress

5 years agoRefactoring: factor `format_lines` and `format_project` into smaller chunks
Nick Cameron [Tue, 24 Jul 2018 02:25:17 +0000 (14:25 +1200)]
Refactoring: factor `format_lines` and `format_project` into smaller chunks

5 years agoReorganise formatting.rs
Nick Cameron [Tue, 24 Jul 2018 02:10:09 +0000 (14:10 +1200)]
Reorganise formatting.rs

5 years agoRefactoring: factor out `format_file` and `FormatHandler`
Nick Cameron [Mon, 23 Jul 2018 22:33:24 +0000 (10:33 +1200)]
Refactoring: factor out `format_file` and `FormatHandler`

This effectively separates out formatting from other handling.

5 years agoRefactoring: move `format_project` and `Timer` out of Session
Nick Cameron [Mon, 23 Jul 2018 22:08:41 +0000 (10:08 +1200)]
Refactoring: move `format_project` and `Timer` out of Session

5 years agoRefactoring: return a summary from `format_project`
Nick Cameron [Mon, 23 Jul 2018 21:03:31 +0000 (09:03 +1200)]
Refactoring: return a summary from `format_project`

Rather than modifying `self.summary`.

Also move some Timer methods.

5 years agoRefactoring: summary
Nick Cameron [Mon, 23 Jul 2018 20:42:33 +0000 (08:42 +1200)]
Refactoring: summary

Move the timer from Summary to Session.

Move Summary from config to formatting.

5 years agoRefactoring: move code around in formatting
Nick Cameron [Mon, 23 Jul 2018 08:01:45 +0000 (20:01 +1200)]
Refactoring: move code around in formatting

To try and make cleaner abstractions and to start to separate formatting from
other tasks.

5 years agofactor out a `Session` object
Nick Cameron [Mon, 23 Jul 2018 02:52:02 +0000 (14:52 +1200)]
factor out a `Session` object

5 years agoMove non-public API from lib.rs to its own module
Nick Cameron [Mon, 23 Jul 2018 00:45:41 +0000 (12:45 +1200)]
Move non-public API from lib.rs to its own module

5 years agoupdate integration tests
Nick Cameron [Sun, 22 Jul 2018 22:04:07 +0000 (10:04 +1200)]
update integration tests

5 years agoMerge pull request #2856 from snsmac/patch-1
Nick Cameron [Sun, 22 Jul 2018 20:29:08 +0000 (08:29 +1200)]
Merge pull request #2856 from snsmac/patch-1

Update Readme.md

5 years agoUpdate Readme.md
jr [Sun, 22 Jul 2018 11:00:33 +0000 (13:00 +0200)]
Update Readme.md

Use "rustfmt --print-config default rustfmt.toml" instead of "rustfmt --dump-default-config rustfmt.toml" to create default config

5 years agoMerge pull request #2853 from nrc/match-comment
Nick Cameron [Fri, 20 Jul 2018 10:20:35 +0000 (22:20 +1200)]
Merge pull request #2853 from nrc/match-comment

Handle missing comments in match arm and more generally

5 years agoAllow futures integration test to fail
Nick Cameron [Fri, 20 Jul 2018 10:19:08 +0000 (22:19 +1200)]
Allow futures integration test to fail

5 years agoMerge pull request #2854 from topecongiro/rustc-ap-syntax
Nick Cameron [Fri, 20 Jul 2018 10:18:03 +0000 (22:18 +1200)]
Merge pull request #2854 from topecongiro/rustc-ap-syntax

Update rustc-ap-*

5 years agoFix breaking changes
Seiichi Uchida [Fri, 20 Jul 2018 07:18:45 +0000 (16:18 +0900)]
Fix breaking changes

cc https://github.com/rust-lang/rust/pull/51829.

5 years agoCargo update
Seiichi Uchida [Fri, 20 Jul 2018 07:05:18 +0000 (16:05 +0900)]
Cargo update

5 years agoTrigger an internal error if we skip formatting due to a lost comment
Nick Cameron [Fri, 20 Jul 2018 02:42:48 +0000 (14:42 +1200)]
Trigger an internal error if we skip formatting due to a lost comment

5 years agoCheck for comments after the `=>` in a match arm
Nick Cameron [Fri, 20 Jul 2018 02:27:56 +0000 (14:27 +1200)]
Check for comments after the `=>` in a match arm

Closes #2188

5 years agoUpdate integration tests
Nick Cameron [Wed, 18 Jul 2018 01:02:23 +0000 (13:02 +1200)]
Update integration tests

5 years agoSet rustfmt-format_macro_matchers to false by default
Nick Cameron [Wed, 18 Jul 2018 00:09:50 +0000 (12:09 +1200)]
Set rustfmt-format_macro_matchers to false by default

cc #2543

5 years agoAdd config options for formatting macro matchers and bodies
Nick Cameron [Wed, 18 Jul 2018 00:03:59 +0000 (12:03 +1200)]
Add config options for formatting macro matchers and bodies

Closes #2753

5 years ago`replace_with_system_newlines` doesn't need to be public
Nick Cameron [Tue, 17 Jul 2018 21:16:51 +0000 (09:16 +1200)]
`replace_with_system_newlines` doesn't need to be public

5 years agoMerge pull request #2847 from mbebenita/max-width
Nick Cameron [Tue, 17 Jul 2018 21:06:26 +0000 (09:06 +1200)]
Merge pull request #2847 from mbebenita/max-width

Add max_width option for all heuristics.

5 years agoAdd max_width option for all heuristics.
Michael Bebenita [Tue, 17 Jul 2018 17:17:04 +0000 (13:17 -0400)]
Add max_width option for all heuristics.

This is useful when working with very small max_widths like 79 chars.

5 years agoFix an anomaly with comments and array literals
Nick Cameron [Tue, 17 Jul 2018 03:38:50 +0000 (15:38 +1200)]
Fix an anomaly with comments and array literals

Closes #2842

5 years agoMerge pull request #2790 from DevOrc/master
Nick Cameron [Mon, 16 Jul 2018 23:21:00 +0000 (11:21 +1200)]
Merge pull request #2790 from DevOrc/master

add emit flag documentation