Commit Graph

3342 Commits

Author SHA1 Message Date
Nick Cameron
6e30df0524
Merge pull request #2314 from hcpl/fix-readme-ci-instructions
Fix version replacement notes for CI in README.md
2017-12-28 10:14:22 +13:00
Nick Cameron
e95541c7d2 Make the import of Config pub 2017-12-28 10:08:27 +13:00
hcpl
202f23ce02 Fix version replacement notes for CI in README.md 2017-12-27 19:41:42 +02:00
Seiichi Uchida
5160b49e67
Merge pull request #2308 from davidalber/recursive-test-files
Adding ability to recursively find test files
2017-12-27 19:16:01 +09:00
Marcus Klaas
656edbf0f0 Use std time 2017-12-27 16:34:09 +13:00
Marcus Klaas
dc356ffef7 Add rudimentary timing of parsing and formatting phases 2017-12-27 16:33:21 +13:00
Nick Cameron
9feb4988f2
Merge pull request #2310 from topecongiro/issue-2309
Do not give up rewriting struct field when attribute is long
2017-12-27 14:12:45 +13:00
Nick Cameron
a6244c2f58
Merge pull request #2311 from topecongiro/format-code-block
Format code block in comment
2017-12-27 13:32:14 +13:00
David Alber
65a48da02d Updating error message 2017-12-24 13:31:46 -08:00
Seiichi Uchida
4604fea0a0 Refactoring
1. Cargo clippy
2. Run 'cargo fmt' with import reordering options set to `true`.
3. Factor out `rewrite_lifetime_param()`.
2017-12-25 00:13:59 +09:00
Seiichi Uchida
27167cbbaa Format code block in comment
Closes #554.
Closes #1695.
2017-12-24 23:56:51 +09:00
David Wood
212a8a3c29 Slightly simplify write_list for DefinitiveListTactic::SpecialMacro 2017-12-24 12:29:54 +00:00
David Wood
0291331203 Add documentation to expr::SPECIAL_MACRO_WHITELIST 2017-12-24 12:27:07 +00:00
David Wood
3320b400ae Merge branch 'master' of https://github.com/rust-lang-nursery/rustfmt 2017-12-24 12:01:59 +00:00
Seiichi Uchida
f523ec58ab Do not give up rewriting struct field when attribute is long 2017-12-24 13:57:29 +09:00
David Alber
9405e05d83 Adding ability to recursively find test files
Part of #1492.
2017-12-23 11:40:37 -08:00
Seiichi Uchida
939a6c5820 Get rid of GenericsArg wrapper type
`GenericsArg` is basically identical to `ast::GenericParam`.
Just use the latter.
2017-12-24 00:29:59 +09:00
Seiichi Uchida
1ef6bccea3 Cargo fmt
Run 'cargo fmt' with the following setting:

```
reorder_imports = true
reorder_imports_in_group = true
```
2017-12-24 00:28:58 +09:00
Seiichi Uchida
6714a447d0 0.3.4 2017-12-23 12:25:42 +09:00
Seiichi Uchida
0ef2b99b74 Remove workspace membership check 2017-12-23 12:24:58 +09:00
Seiichi Uchida
02bb1c8c97 Rustup to rustc 1.24.0-nightly (5165ee9e2 2017-12-22) 2017-12-23 11:58:19 +09:00
David Wood
ef8b2efd13 Fix off-by-one error in assert_eq! line wrapping
If two really long conditions are checked for equality, they wouldn't be split
into multiple lines if the last condition is the one to push the line past the
width limit.

Fix the off-by-one error that caused this, and add a test-case for it.
2017-12-23 01:32:55 +00:00
David Wood
e343521276 Add assert_eq! to special-cased macros
Allows for this form of assert_eq! macros:
```rust
assert_eq!(
    left.id, right.id,
    "IDs are not equal: {:?} {:?}",
    left, right
);
```

Also allows for assert! macros to have the format arguments split across
multiple lines even if the assert condition is not simple:
```rust
assert!(
    result >= 42,
    "The result must be at least 42: {:?}",
    result, result.code, context
);
```
2017-12-23 01:06:17 +00:00
Nick Cameron
5725f41974
Merge pull request #2298 from davidalber/fix-2269
Adding --version to cargo-fmt
2017-12-22 21:55:07 +13:00
topecongiro
fb0e449ab3 Update CHANGELOG 2017-12-22 17:20:15 +09:00
Nick Cameron
18c42f1ab4
Merge pull request #2303 from topecongiro/issue-2296
Fix indent width bug when recovering comments
2017-12-22 17:46:10 +13:00
Nick Cameron
c537f2de11 0.3.3 2017-12-22 16:14:05 +13:00
topecongiro
984ac100a4 Fix indent width bug when recovering comments
Using last_line_width() ignores the width of tab character ('\t').
2017-12-22 12:05:36 +09:00
Nick Cameron
baa0dad582
Merge pull request #2288 from davidalber/fix-2078
Reporting test parse errors as test failures
2017-12-22 15:44:19 +13:00
Nick Cameron
de5683cf11 fix tests 2017-12-22 15:30:45 +13:00
Nick Cameron
c813b98e96
Merge pull request #2302 from bkchr/rust_nightly_21_22_2017
Fixes compilation with rust version 2017-12-21
2017-12-22 15:24:57 +13:00
Bastian Köcher
fa67631b32 Fixes compilation with rust version 2017-12-21 2017-12-22 02:52:22 +01:00
Nick Cameron
723b938057
Merge pull request #2291 from topecongiro/issue-2289
Take the width of block's prefix into account only once
2017-12-22 12:58:02 +13:00
Nick Cameron
23dfa827a7
Merge pull request #2295 from topecongiro/issue-2280
Make 'cargo fmt' formats every workspace member
2017-12-22 12:56:53 +13:00
Nick Cameron
72413c55b0 fix libsyntax fallout 2017-12-22 11:30:54 +13:00
Nick Cameron
c3cd1f442f
Merge pull request #2297 from topecongiro/type-alias-wrong-indent
Fix wrong indentation on type alias
2017-12-22 11:05:02 +13:00
David Alber
09d0ca4892 Using common execute rustfmt function 2017-12-20 23:24:28 -08:00
David Alber
f17556966c Reusing status-handling function 2017-12-20 22:36:36 -08:00
David Alber
655022c42b Factoring out status code values 2017-12-20 21:53:33 -08:00
David Alber
6aaed5b08f Adding --version option to cargo-fmt 2017-12-20 21:48:59 -08:00
topecongiro
1d8619d49a Fix wrong indentation on type alias
Use rewrite_assign_rhs() when rewriting type alias.
2017-12-21 09:58:13 +09:00
Seiichi Uchida
85ef4638b6 Make 'cargo fmt' formats every workspace member 2017-12-20 22:47:51 +09:00
topecongiro
366ff40ae7 Take the width of block's prefix into account only once 2017-12-20 15:44:11 +09:00
David Alber
fa0a63989e Using if let to be more concise 2017-12-18 01:03:12 -08:00
David Alber
54067a7466 Reporting test parse errors as test failures
Fixes 2078.
2017-12-17 16:50:09 -08:00
Nick Cameron
8998c1d5b5
Merge pull request #2286 from topecongiro/issue-2123
Respect leading whitespace when wrapping comment
2017-12-17 19:42:19 +13:00
Seiichi Uchida
ccc487ade7 Do not put comment's line start and closer on the same line 2017-12-17 15:25:24 +09:00
Seiichi Uchida
81eb88c4c0 Respect leading whitespace in original comment when wrapping comment 2017-12-17 15:24:49 +09:00
Seiichi Uchida
366621eb46 Add a test for #2123 and update tests 2017-12-17 15:23:17 +09:00
Nick Cameron
331124a42a
Merge pull request #2228 from CAD97/patch-1
Add configuration stability information
2017-12-17 19:14:20 +13:00