Commit Graph

2957 Commits

Author SHA1 Message Date
Caleb Cartwright 760bb29feb chore: fix compile warnings 2020-02-08 22:54:37 -06:00
Caleb Cartwright e72f307f15 fix: backport parse bug fix
Backport the fix for the parser bug where the messages from
fatal/non-recoverable parser errors were being silently eaten by
rustfmt.
2020-02-08 22:47:48 -06:00
Caleb Cartwright c60416ed21 deps: update rustc-ap to v642.0.0 2020-02-08 22:21:37 -06:00
Seiichi Uchida 731f15551b Do not add block around async closure (#3946) 2019-12-03 08:47:25 +09:00
Chris Emerson 99f9f576d4 Return an error if --check or --emit json are used with stdin. (#3875) 2019-10-25 15:05:24 +09:00
Seiichi Uchida 69cf48344b fix handling of nested comments in patterns and ControlFlows (#3869) 2019-10-25 15:04:33 +09:00
rChaser53 233497aceb fix Unparsable code when formmating (#3883) 2019-10-24 22:16:56 +09:00
Rui 69c7dbcd50 Try to solve issue3456. (#3556) 2019-10-19 18:19:47 +09:00
Caleb Cartwright 3a073f177c fix: handling of newline_style conflicts (#3850) 2019-10-19 17:15:13 +09:00
Stéphane Campinas 5327c3633f handle field attributes when aligning a struct's fields (#3513) 2019-10-19 16:56:32 +09:00
Caleb Cartwright a5d16df9a4 feat: use offline by default with cargo fmt (#3830) 2019-10-19 16:35:33 +09:00
Caleb Cartwright fd6e960648 fix: comments between lhs and rhs 2019-10-17 20:13:11 -05:00
Caleb Cartwright 28be77915f fix: nested comments in control flow condition pat 2019-10-17 19:58:08 -05:00
Stéphane Campinas a15e97f1e9 do not indent impl generics (#3856) 2019-10-11 18:19:44 +09:00
Caleb Cartwright 8210cc1c13 fix: handle lhs unary in range expression (#3855) 2019-10-11 18:15:04 +09:00
rChaser53 396a2af181 fix to swallow attribute on brace expression (#3848) 2019-10-10 10:35:34 +09:00
Caleb Cartwright 207a58f365 fix panic on closure with empty block expr (#3846) 2019-10-08 11:00:31 +09:00
Caleb Cartwright 6dcbc5d78e fix: handle block comments with trailing line comments (#3842) 2019-10-08 10:12:21 +09:00
Stéphane Campinas 8073244420 improve detection of URL inside a string that is being rewritten. (#3809) 2019-10-07 16:43:50 +09:00
Stéphane Campinas 160c3aafc5 handle hard tabs when formatting trailing comments (#3836) 2019-10-07 16:40:27 +09:00
Caleb Cartwright ba4bf03d84 don't fail on recoverable parser errors in ignored files (#3782) 2019-10-07 10:24:08 +09:00
Caleb Cartwright ed697c9347 fix: support raw prefix identifiers in statics 2019-10-05 12:34:48 -05:00
Seiichi Uchida 383306e5fe Update rustc-ap-* crates to 606.0.0 (#3835) 2019-10-05 23:40:24 +09:00
Stéphane Campinas fb01dc857c do not force comments to be indented with a comment trailing a line of code (#3833) 2019-10-05 00:22:01 +09:00
rChaser53 7926851bb0 stop to strip 'impl' from impl trait type alias (#3816) 2019-10-04 11:25:16 +09:00
Matthew Pomes e28ae8b4a3 Init Logger for unit tests (#3829)
Add `init_log()` function which attempts to init logger, and
ignores failure. The function is called at the beginning of
every test, and will fail if the logger is already initialized.
The logger must be initialized in every test, becuase cargo runs
the tests in parallel, with no garentees about the order and time
each starts.
2019-10-04 11:24:33 +09:00
Stéphane Campinas dbd8936391 fix rust code in comment with a line containing only a hash sign (#3818) 2019-10-02 23:58:25 +09:00
Caleb Cartwright f4bc494153 add --offline mode fallback to cargo fmt (#3813) 2019-10-02 23:56:20 +09:00
Caleb Cartwright 7c9c0d1a39 fix: merge_imports handling of ::{self} 2019-09-26 20:02:41 -05:00
Caleb Cartwright 9c2b375ba9 refactor to use param naming where appropriate (#3803) 2019-09-24 09:25:19 +09:00
Caleb Cartwright 3bb266180e fix: handling of empty str for license template path (#3804) 2019-09-24 09:24:05 +09:00
Caleb Cartwright 6b0a447150 feat: support parameter attributes (#3793) 2019-09-20 16:11:52 +09:00
rChaser53 4449250539 fix the error with long string in raw string (#3800) 2019-09-18 22:39:27 +09:00
Shotaro Yamada ca78653d61 Use Cell instead of RefCell (#3798) 2019-09-18 22:37:08 +09:00
rChaser53 789a097a71 fix internal error when using rustfmt::skip with newline on stmt (#3785) 2019-09-15 23:45:46 +09:00
Caleb Cartwright dfe87fe946 fix: async expression indentation (#3789) 2019-09-11 09:55:18 +09:00
Seiichi Uchida ceca01465a Update deps (#3788) 2019-09-08 23:33:21 +09:00
Seiichi Uchida 5baba86fe5 Update rustc-ap-* crates to 581.0.0 (#3783) 2019-09-06 22:41:03 +09:00
rChaser53 1ded995ee7 fix 'left behind trailing whitespace' (#3761) 2019-09-05 19:38:00 +09:00
Seiichi Uchida 783948fcbb Fix handling of match arm's rewrite (#3775) 2019-09-05 11:15:46 +09:00
CreepySkeleton e81ec20af0 Add --config command line option (#3767) 2019-09-05 11:15:19 +09:00
Valentine Valyaeff 15a28f79b8 Another fix for merge_imports (#3769) 2019-09-04 23:02:10 +09:00
Andrey 950b288d6f do not remove discriminant value if exists (#3771) (#3772) 2019-09-04 23:01:04 +09:00
rChaser53 2bf67b6e5c fix TrailingWhitespace when using line breaks in macros arguments (#3768) 2019-09-04 23:00:26 +09:00
Caleb Cartwright ad5d9fba9b fix formatting mods inside cfg_if macro (#3763) 2019-09-02 18:36:51 +09:00
Seiichi Uchida deb329a6bb Forbid adding or removing a block from match arms inside macro calls (#3756) 2019-08-28 20:50:41 +09:00
rChaser53 a09ca681de fix the bug removing attrs (#3760) 2019-08-28 20:50:02 +09:00
Valentine Valyaeff ef00f74ce3 Merge imports fix (#3753) 2019-08-27 11:23:55 +09:00
Caleb Cartwright c26c0e5abf feat: add support for --message-format option (#3752) 2019-08-27 09:27:32 +09:00
Caleb Cartwright 9792ff0529 Fix line numbers in checkstyle output (#3694) 2019-08-19 11:11:35 +09:00