Commit graph

4615 commits

Author SHA1 Message Date
Igor Matuszewski
6b993c8b8b Fix stdin_works... test on Windows 2019-03-04 18:28:25 +01:00
Igor Matuszewski
8aa0f44d15 Remove eprintln 2019-03-04 18:19:30 +01:00
Igor Matuszewski
b3c28dba83 Expose ModifiedLines and implement parsing data from the string output
This moves `Modified{Chunks,Lines}` from `src/formatting.rs` to
`src/rustfmt_diff.rs` and reexports it in `src/lib.rs`.

With this, a conversion from `Vec<Mismatch>` to `ModifiedLines` was implemented
and now this implements complementary `Display` and `FromStr`, which
simplified the previously used `output_modified` function and which allows to
parse the raw data emitted with `EmitMode::ModifiedLines`.
2019-03-04 18:19:30 +01:00
Igor Matuszewski
0437bf7a7d Allow for stdin input in EmitMode::ModifiedLines 2019-03-04 18:19:30 +01:00
rchaser53
8e3ef3e3a9 fix not to remove comment in the case of no arg 2019-03-05 00:18:33 +09:00
Seiichi Uchida
51af195473
Merge pull request #3415 from rchaser53/issue-3198
fix the comment for self are swallowed
2019-03-04 21:01:30 +09:00
Stéphane Campinas
51778090fc
Merge pull request #3425 from scampi/futures-rs
move futures-rs repo back into the required tests
2019-03-04 10:46:32 +01:00
rchaser53
dec3902076 leave post comment for self 2019-03-02 17:33:43 +09:00
Stéphane Campinas
c3fcebf3e4
move futures-rs integration back into required tests 2019-03-01 10:23:27 +01:00
Nick Cameron
693d2d9ca0
Update README.md
Update the Appveyor badge
2019-02-28 08:44:59 +13:00
rchaser53
ae7330eea4 leave pre comment for self 2019-02-24 22:05:08 +09:00
Stéphane Campinas
6a75feedac
Merge pull request #3409 from rchaser53/issue-3343
add config inline_attribute_width
2019-02-23 13:16:23 +01:00
rchaser53
be7b3ba2e2 apply inline_attribute_width for extern crate 2019-02-23 13:46:41 +09:00
rchaser53
e68044f8bc add a section to Configuration.md
- attributes => attribute
2019-02-23 13:46:32 +09:00
rchaser53
0e408bf83c add config inline_attribute_width
If the line width is width within config width, attribute is inline.
I don't want to change default rustfmt behavior, so config default value is 0.

- fix description
- fix test comment
- remove unnecessary clone
- remove unnecessary test file
- fix test for β version
- attributes => attribute
2019-02-23 13:40:11 +09:00
Seiichi Uchida
29a597c431
Merge pull request #3412 from mathstuf/doc-typos
Configurations: fix typos and mismatches
2019-02-23 12:34:34 +09:00
Ben Boeckel
2a353429b6 Configurations: fix typos and mismatches 2019-02-22 14:09:15 -05:00
Seiichi Uchida
322275aa26
Merge pull request #3411 from scampi/version-gate-clarification
indicate that version-gate are to be considered only with changes to the default formatting
2019-02-22 15:06:15 +09:00
Stéphane Campinas
ae331be1aa
indicate that version-gate are to be considered only with changes to the default formatting 2019-02-21 14:43:45 +01:00
Alexander Regueiro
7a3b7c9275 Various cosmetic improvements (#3403) 2019-02-19 11:56:42 +09:00
Seiichi Uchida
74755e86ab
Merge pull request #3407 from scampi/futures-rs
silence build failures of futures-rs until https://github.com/rust-la
2019-02-19 08:59:56 +09:00
Seiichi Uchida
2599b01101
Merge pull request #3408 from scampi/issue-3111
do not put tracking issue as part of the option's title
2019-02-19 08:59:12 +09:00
Stéphane Campinas
2b08b73f56
do not put tracking issue as part of the option's title 2019-02-18 20:35:22 +01:00
Stéphane Campinas
00c125973c
silence build failures of futures-rs until https://github.com/rust-lang-nursery/futures-rs/pull/1445 is merged 2019-02-18 20:14:03 +01:00
Seiichi Uchida
2c221b6912
Merge pull request #3402 from scampi/stdsimd
set the TARGET envar for the stdsimd integration test
2019-02-18 13:18:53 +09:00
Stéphane Campinas
36b787269c
set the TARGET envar for the stdsimd integration test 2019-02-15 13:14:45 +01:00
Stéphane Campinas
e5284b1377
Merge pull request #3334 from rchaser53/issue-3227
fix Inconsistency between  loop  and while
2019-02-15 13:12:42 +01:00
rchaser53
c4b6b52ada remove tests/source/issue-3227/one.rs 2019-02-15 18:11:49 +09:00
topecongiro
d6829d62dc 1.0.3 2019-02-14 11:27:55 +09:00
Seiichi Uchida
b58ba97780
Merge pull request #3401 from topecongiro/rustcap
Cargo update
2019-02-14 11:26:05 +09:00
topecongiro
9df1ed6ab4 Cargo update
Update `rustc-ap-*` crates to 373.0.0.
2019-02-14 11:08:05 +09:00
topecongiro
b700cde6b9 1.0.2 2019-02-14 10:54:22 +09:00
rchaser53
7d9a2ef96d version/2: Align loop and while formatting
The loop and while formatting was diverting as  `loop`
was not being moved to a new, indented block, as `while`
was.

This commit fixes this inconsistency but pins it to version 2
to avoid changing existing code.
2019-02-14 10:06:29 +09:00
Stéphane Campinas
412dcc70a2
point unstable options to tracking issues 2019-02-14 00:11:25 +01:00
Seiichi Uchida
6108cb6b03
Merge pull request #3342 from topecongiro/visibility-on-trait-alias
Format visibility on trait alias
2019-02-13 01:29:41 +09:00
topecongiro
96a3df3b5c Format visibility on trait alias 2019-02-12 10:16:12 +09:00
Seiichi Uchida
ce682bdabc
Merge pull request #3335 from h-michael/rust-2018
Rust 2018 idioms
2019-02-11 01:12:38 +09:00
Seiichi Uchida
fca91bc22f
Merge pull request #3333 from topecongiro/macro-arg-single-keyword
Handle a macro argument with a single keyword
2019-02-11 00:45:13 +09:00
topecongiro
9a7ea6aacb Handle a macro argument with a single keyword
Closes #3331.
2019-02-11 00:34:23 +09:00
Seiichi Uchida
c4611a0e6b
Merge pull request #3326 from scampi/issue-3302
fix formatting of strings within a macro
2019-02-11 00:32:06 +09:00
Stéphane Campinas
b86dd161df
remove unneeded Version import 2019-02-09 14:23:54 +01:00
Hirokazu Hata
8183b949c4 cargo fmt 2019-02-09 16:20:38 +09:00
Hirokazu Hata
4bb90f5cc8 Fix rust_2018_idioms warnings 2019-02-09 16:14:30 +09:00
Hirokazu Hata
e70e6eb273 deny rust_2018_idioms 2019-02-09 15:55:17 +09:00
Hirokazu Hata
c0f93a6ea3 cargo +nightly fix --edition-idioms 2019-02-09 15:53:12 +09:00
Stéphane Campinas
e28fae9974
Merge pull request #3328 from topecongiro/edition-2018
Use edition 2018
2019-02-08 09:35:27 +01:00
Seiichi Uchida
44d6f7c43e
Merge pull request #3332 from rchaser53/issue-3234
add issue-3234 test
2019-02-08 12:35:50 +09:00
Seiichi Uchida
672f352c89
Merge pull request #3325 from topecongiro/rustcap
Update rustc-ap-* crates to 366.0.0
2019-02-08 00:24:57 +09:00
topecongiro
d956980de4 Use edition 2018 2019-02-08 00:22:34 +09:00
rchaser53
5e530980b7 add issue-3234 test
this issue is already resolved
2019-02-08 00:05:54 +09:00