]>
git.lizzy.rs Git - rust.git/log
Nick Cameron [Tue, 31 Jul 2018 22:39:45 +0000 (10:39 +1200)]
Update rustc-ap-syntax
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
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
Ingvar Stepanyan [Tue, 31 Jul 2018 10:53:22 +0000 (11:53 +0100)]
Use is_nightly helper instead of duplicate code
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.
Aaron Loucks [Tue, 31 Jul 2018 03:19:46 +0000 (23:19 -0400)]
Increase capacity for newline conversion buffer
Nick Cameron [Tue, 31 Jul 2018 01:41:49 +0000 (13:41 +1200)]
Emit 0 exit code for --version and similar operations
Fixes #2878
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
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
Benjamin Brittain [Mon, 30 Jul 2018 00:20:11 +0000 (17:20 -0700)]
fix nits
Aaron Loucks [Sun, 29 Jul 2018 21:02:32 +0000 (17:02 -0400)]
Updating newline_style documentation
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
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)
Ben Brittain [Sun, 29 Jul 2018 15:45:31 +0000 (08:45 -0700)]
Add tests for async & async move
Ben Brittain [Sun, 29 Jul 2018 14:37:24 +0000 (07:37 -0700)]
Format Async block and async fn
Aaron Loucks [Sat, 28 Jul 2018 20:18:58 +0000 (16:18 -0400)]
Auto-detect newline style by default
Andrew Audibert [Sun, 29 Jul 2018 02:38:14 +0000 (19:38 -0700)]
Support raw identifiers in struct expressions
Daniel Carosone [Sat, 28 Jul 2018 08:04:55 +0000 (18:04 +1000)]
call out edition config in Quick start (#2837)
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
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
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.
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.
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.
Seiichi Uchida [Thu, 26 Jul 2018 12:35:48 +0000 (21:35 +0900)]
Add a test for #2863
Seiichi Uchida [Wed, 25 Jul 2018 09:27:25 +0000 (18:27 +0900)]
Preserve parens in trait bounds
Seiichi Uchida [Wed, 25 Jul 2018 09:27:02 +0000 (18:27 +0900)]
Add and update tests for trait with paren
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
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
Seiichi Uchida [Wed, 25 Jul 2018 09:16:10 +0000 (18:16 +0900)]
Rename test files
Seiichi Uchida [Tue, 24 Jul 2018 22:16:43 +0000 (07:16 +0900)]
Veto converting delimiters inside nested macro
Seiichi Uchida [Tue, 24 Jul 2018 23:34:43 +0000 (08:34 +0900)]
Put lifetimes after trait when they gets orphaned
Seiichi Uchida [Tue, 24 Jul 2018 23:33:41 +0000 (08:33 +0900)]
Add a test for #2859
Seiichi Uchida [Tue, 24 Jul 2018 22:15:33 +0000 (07:15 +0900)]
Keep the inside macro context in nested macro call
Seiichi Uchida [Tue, 24 Jul 2018 22:13:51 +0000 (07:13 +0900)]
Add tests for #2830 and #2857
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
Seiichi Uchida [Tue, 24 Jul 2018 15:42:19 +0000 (00:42 +0900)]
Add a test for associated existential type
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.
Seiichi Uchida [Tue, 24 Jul 2018 15:30:01 +0000 (00:30 +0900)]
Format exitential type
Seiichi Uchida [Tue, 24 Jul 2018 15:29:45 +0000 (00:29 +0900)]
Add a simple test for exitential type
Seiichi Uchida [Tue, 24 Jul 2018 15:22:27 +0000 (00:22 +0900)]
Cargo update
Update `rustc-ap-*` to "206.0.0".
Nick Cameron [Tue, 24 Jul 2018 09:41:49 +0000 (21:41 +1200)]
Remove `Summary`
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
Nick Cameron [Tue, 24 Jul 2018 03:48:23 +0000 (15:48 +1200)]
Reformatting after rebase
Nick Cameron [Thu, 12 Jul 2018 02:08:16 +0000 (14:08 +1200)]
Add tests
Closes #2773
Closes #2786
Nick Cameron [Thu, 12 Jul 2018 02:05:50 +0000 (14:05 +1200)]
fixup tests
Nick Cameron [Wed, 11 Jul 2018 22:44:06 +0000 (10:44 +1200)]
chains: fix visual indent chain layout
Nick Cameron [Wed, 11 Jul 2018 10:06:30 +0000 (22:06 +1200)]
chains: treat some string lits as blocks
Nick Cameron [Wed, 11 Jul 2018 09:35:10 +0000 (21:35 +1200)]
formatting
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))
}
}
```
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
Nick Cameron [Wed, 11 Jul 2018 02:50:42 +0000 (14:50 +1200)]
chains: share code between block and visual formatters
Nick Cameron [Wed, 11 Jul 2018 01:39:35 +0000 (13:39 +1200)]
chains: refactor formatting of chain items
Nick Cameron [Wed, 11 Jul 2018 00:01:39 +0000 (12:01 +1200)]
chains: factor into objects
Nick Cameron [Tue, 10 Jul 2018 03:14:44 +0000 (15:14 +1200)]
chains: more refactoring of visual formatting
Nick Cameron [Tue, 10 Jul 2018 00:24:45 +0000 (12:24 +1200)]
chains: refactor block formatting
Nick Cameron [Mon, 9 Jul 2018 09:09:25 +0000 (21:09 +1200)]
chains: further simplification
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.
Nick Cameron [Mon, 9 Jul 2018 02:18:58 +0000 (14:18 +1200)]
chains: simplify visual formatting a bit
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
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...
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
Nick Cameron [Tue, 24 Jul 2018 02:25:17 +0000 (14:25 +1200)]
Refactoring: factor `format_lines` and `format_project` into smaller chunks
Nick Cameron [Tue, 24 Jul 2018 02:10:09 +0000 (14:10 +1200)]
Reorganise formatting.rs
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.
Nick Cameron [Mon, 23 Jul 2018 22:08:41 +0000 (10:08 +1200)]
Refactoring: move `format_project` and `Timer` out of Session
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.
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.
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.
Nick Cameron [Mon, 23 Jul 2018 02:52:02 +0000 (14:52 +1200)]
factor out a `Session` object
Nick Cameron [Mon, 23 Jul 2018 00:45:41 +0000 (12:45 +1200)]
Move non-public API from lib.rs to its own module
Nick Cameron [Sun, 22 Jul 2018 22:04:07 +0000 (10:04 +1200)]
update integration tests
Nick Cameron [Sun, 22 Jul 2018 20:29:08 +0000 (08:29 +1200)]
Merge pull request #2856 from snsmac/patch-1
Update 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
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
Nick Cameron [Fri, 20 Jul 2018 10:19:08 +0000 (22:19 +1200)]
Allow futures integration test to fail
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-*
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.
Seiichi Uchida [Fri, 20 Jul 2018 07:05:18 +0000 (16:05 +0900)]
Cargo update
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
Nick Cameron [Fri, 20 Jul 2018 02:27:56 +0000 (14:27 +1200)]
Check for comments after the `=>` in a match arm
Closes #2188
Nick Cameron [Wed, 18 Jul 2018 01:02:23 +0000 (13:02 +1200)]
Update integration tests
Nick Cameron [Wed, 18 Jul 2018 00:09:50 +0000 (12:09 +1200)]
Set rustfmt-format_macro_matchers to false by default
cc #2543
Nick Cameron [Wed, 18 Jul 2018 00:03:59 +0000 (12:03 +1200)]
Add config options for formatting macro matchers and bodies
Closes #2753
Nick Cameron [Tue, 17 Jul 2018 21:16:51 +0000 (09:16 +1200)]
`replace_with_system_newlines` doesn't need to be public
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.
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.
Nick Cameron [Tue, 17 Jul 2018 03:38:50 +0000 (15:38 +1200)]
Fix an anomaly with comments and array literals
Closes #2842
Nick Cameron [Mon, 16 Jul 2018 23:21:00 +0000 (11:21 +1200)]
Merge pull request #2790 from DevOrc/master
add emit flag documentation
Nick Cameron [Mon, 16 Jul 2018 23:18:10 +0000 (11:18 +1200)]
Merge pull request #2823 from fwalch/default-newline-style
Change default newline style to "Native"
Nick Cameron [Mon, 16 Jul 2018 22:45:30 +0000 (10:45 +1200)]
Fix Configurations.md
Correct default for `imports_indent`
Closes #2839
Seiichi Uchida [Mon, 16 Jul 2018 07:07:05 +0000 (16:07 +0900)]
Merge pull request #2829 from scampi/issue1210
fix rewrite_string when a line feed is present in a sequence of whitespaces, resulting in strange formatting
Stéphane Campinas [Sat, 14 Jul 2018 17:17:07 +0000 (19:17 +0200)]
removed unused max_width argument of rewrite_string function
Stéphane Campinas [Sat, 7 Jul 2018 10:24:09 +0000 (12:24 +0200)]
fix rewrite_string when a line feed is present in a sequence of whitespaces, resulting in strange formatting
Seiichi Uchida [Sat, 14 Jul 2018 13:18:12 +0000 (22:18 +0900)]
0.8.3
Seiichi Uchida [Sat, 14 Jul 2018 13:16:23 +0000 (22:16 +0900)]
Cargo update (#2845)
Seiichi Uchida [Sat, 14 Jul 2018 11:28:38 +0000 (20:28 +0900)]
Merge pull request #2826 from nrc/complex-struct
Improve formatting of lists of binops
Nick Cameron [Thu, 12 Jul 2018 10:28:55 +0000 (22:28 +1200)]
Add a link to ag_dubs' CI blog post to the README
Nick Cameron [Thu, 12 Jul 2018 10:21:07 +0000 (22:21 +1200)]
address reviewer comments
Nick Cameron [Fri, 6 Jul 2018 00:04:14 +0000 (12:04 +1200)]
Add test for #2802
Nick Cameron [Thu, 5 Jul 2018 23:58:22 +0000 (11:58 +1200)]
Fixup formatting of tests and source