Commit Graph

3153 Commits

Author SHA1 Message Date
Caleb Cartwright
9faba4539b fix(parser): better unclosed delims handling 2020-11-02 18:31:51 -06:00
Caleb Cartwright
e131797b62 deps: bump rustc-ap to v686 2020-11-02 18:31:51 -06:00
Michael Müller
fa9d97499e
Fix overriding license header bug (#4488)
* Override header to None when path len = 0

* Add regression test

* Ensure nightly
2020-10-24 11:14:52 -05:00
hafiz
6a7824787e Preserve comments in empty statements (#4180)
* Preserve comments in empty statements

Closes #4018

* fixup! Preserve comments in empty statements
2020-10-24 11:13:00 -05:00
Ayaz Hafiz
e70343a5f5 Correctly indent skipped-over code
Closes #4398
2020-10-24 11:13:00 -05:00
Caleb Cartwright
31cef56779 feat: add initial support for ConstBlock expressions 2020-10-24 11:13:00 -05:00
Caleb Cartwright
c89638ae55 deps: update macro parsing 2020-10-24 11:13:00 -05:00
David Tolnay
14d53f75c9 Use rustfmt given by RUSTFMT env var (#4419) 2020-10-04 16:58:34 -05:00
Ayaz Hafiz
2a8ff209f6 fixup! Preserve and format type aliases in extern blocks 2020-10-01 19:12:22 -05:00
Ayaz Hafiz
92ab76cfa7 fixup! Preserve and format type aliases in extern blocks 2020-10-01 19:12:22 -05:00
Ayaz Hafiz
a9b0b057eb fixup! Preserve and format type aliases in extern blocks 2020-10-01 19:12:22 -05:00
Ayaz Hafiz
a15800a327 Preserve and format type aliases in extern blocks
Previously, non-trivial type aliases in extern blocks were dropped by
rustfmt because only the type alias name would be passed to a rewritter.
This commit fixes that by passing all type information (generics,
bounds, and assignments) to a type alias rewritter, and consolidates
`rewrite_type_alias` and `rewrite_associated_type` as one function.
2020-10-01 19:12:22 -05:00
Caleb Cartwright
d6a220b70a feat: support config. of leading match arm pipe 2020-09-24 09:43:31 -05:00
David Tolnay
8635a5ca44 deps: bump rustc-ap to v679 2020-09-23 00:45:18 -05:00
Caleb Cartwright
9ba373f822 deps: bump rustc-ap to v678 2020-09-23 00:45:18 -05:00
Caleb Cartwright
62dc7c5c6b fix: inner attribute formatting 2020-09-04 19:01:18 -05:00
mahkoh
89b7f5f382 Fix module resolution in inner modules with paths (#4194) 2020-09-04 19:01:18 -05:00
Caleb Cartwright
aa11c27490 chore: run rustfmt 2020-09-04 19:01:18 -05:00
Caleb Cartwright
637ddfb6da deps: bump rustc-ap to v673 2020-09-04 19:01:18 -05:00
Caleb Cartwright
e4617e0e61 deps: bump rustc-ap to v672 2020-09-04 19:01:18 -05:00
Caleb Cartwright
a17803127f fix: inverted span on attrs within closure 2020-08-09 14:32:34 -05:00
Caleb Cartwright
bf359c6ebc chore: backport 8157a3f0afe978d3e953420577f8344db7e905bf 2020-07-15 09:19:21 -05:00
Caleb Cartwright
391cd3e324 deps: bump rustc-ap to v669 2020-07-14 21:36:24 -05:00
Caleb Cartwright
b243075d75 deps: bump rustc-ap-* to v668 2020-07-09 23:15:08 -05:00
Caleb Cartwright
da18032ba4 deps: bump rustc-ap* to v666 2020-06-27 13:15:54 -05:00
Seiichi Uchida
a36e7c7981 Use correct span for match arms with the leading pipe and attributes (#3975) 2020-06-27 12:55:15 -05:00
Caleb Cartwright
796d6eafa4 fix: backport fix for #4079 2020-06-11 23:29:51 -05:00
Caleb Cartwright
5db7152962 fix: backport fix for #4020 2020-06-11 23:17:38 -05:00
Caleb Cartwright
ce1a3efff0 fix: backport fix for submod parser errors 2020-06-11 21:49:40 -05:00
Caleb Cartwright
dead3a807d fix: backport mod resolution error handling 2020-06-11 21:11:18 -05:00
David Tolnay
bc9a0b2974 Switch to std::error::Error for errors (#3948) 2020-06-11 20:23:24 -05:00
Caleb Cartwright
b28fd5f91c deps: apply upstream rustc-* changes 2020-06-11 13:22:37 -05:00
topecongiro
08776ef3b4
Support module-level rustfmt::skip in sub-modules 2020-06-08 10:42:43 +09:00
Seiichi Uchida
577ef8136f
Update rustc-ap-* crates to 659.0.0 for rustfmt-1.4.15 (#4184) 2020-05-19 17:31:28 +09:00
Caleb Cartwright
c1267303bc
fix: formatting arbitrary extern abi (#4089) 2020-03-31 15:30:26 +09:00
Caleb Cartwright
00e199c974
backport new syntax to rustfmt 1.x (#4105)
* feat: support raw reference operator

* feat: support const opt-out syntax

* feat: support half open range syntax
2020-03-31 15:28:01 +09:00
Caleb Cartwright
9714a140c9 refactor: use ast::attr:HasAttrs 2020-03-30 13:11:00 -05:00
Caleb Cartwright
ac2d5b85a5 deps: bump rustc-ap* to v651 2020-03-30 12:02:39 -05:00
Caleb Cartwright
b173b42354 refactor: rename libsyntax --> rustc_ast 2020-03-27 22:29:12 -05:00
Caleb Cartwright
c1a66e1e22 fix: unreachable err on Fn with None block 2020-03-27 22:13:46 -05:00
Caleb Cartwright
537d746e08 fix: use correct ForeignItem span 2020-03-27 22:00:00 -05:00
Caleb Cartwright
bea7209d0a chore: fix src formatting 2020-03-27 21:53:40 -05:00
Caleb Cartwright
9b0ed57af6 refactor: parse & mod resolver for rustc-ap v650 2020-03-27 21:33:34 -05:00
Caleb Cartwright
bd5dff4012 refactor: backport syntux mod 2020-03-26 21:25:34 -05:00
Caleb Cartwright
9699c96cf1 deps: bump to rustc v647 2020-03-26 17:20:24 -05:00
Caleb Cartwright
7a76ec062d deps: bump to rustc v644 2020-03-26 15:26:58 -05:00
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
Caleb Cartwright
62432fe31b add new flag to list names of misformatted files (#3747) 2019-08-19 11:04:40 +09:00
Seiichi Uchida
73847d3986
Take the inner macro_use attr into acocunt while reordering (#3749) 2019-08-19 10:56:32 +09:00
Seiichi Uchida
1643d726ef
Use correct indent when formatting complex fn type (#3731) 2019-08-16 11:15:28 +09:00
Caleb Cartwright
dfd27663dc add json emit mode (#3735) 2019-08-16 11:14:53 +09:00
Caleb Cartwright
541d9a8659 tests: fix failing default config unit test (#3743) 2019-08-14 08:02:30 +09:00
Seiichi Uchida
4871d6467a
Use the correct BytePos for the opening brace position (#3742) 2019-08-13 23:21:55 +09:00
Caleb Cartwright
ac150d016b fix: remove trailing space with empty dyn macro arg (#3737) 2019-08-11 12:49:14 +09:00
topecongiro
0462008de8
Release 1.4.4 2019-08-06 11:14:12 +09:00
Seiichi Uchida
c0cb5eb535
Fix broken tuple pattern (#3729) 2019-08-06 11:09:45 +09:00
Caleb Cartwright
afc8fbd701 fix: issue with --all when workspace member also exists in dep tree (#3726) 2019-08-06 00:33:59 +09:00
topecongiro
3adfb08afe
Release 1.4.3 2019-08-03 00:01:59 +09:00
Igor Matuszewski
62a32e7b83 Fix most recenty nightly breakage due to removed await! support (#3722) 2019-08-02 23:54:39 +09:00
rChaser53
3b7a518144 fix underscore in slice patterns are removed (#3719) 2019-07-31 23:55:58 +09:00
topecongiro
aeb3496f31
Release v1.4.2 2019-07-31 11:10:49 +09:00
topecongiro
9e960e7d6a Release v1.4.1 2019-07-30 14:39:07 +09:00
rChaser53
fe05e88831 fix to build with rustc 1.38.0-nightly (4560cb830 2019-07-28) (#3712) 2019-07-30 14:32:38 +09:00
topecongiro
365461349d
Release 1.4.0 2019-07-29 05:58:18 +09:00
Seiichi Uchida
983a92c872
Update rustc-ap-* crates to 541.0.0 (#3707) 2019-07-29 05:52:45 +09:00
Seiichi Uchida
b004329782
Simplify code around visit_fn (#3698) 2019-07-21 13:26:41 +09:00
Seiichi Uchida
c0e616bc1d
Implement closing-block procedure without relying on missed_span module (#3691) 2019-07-17 23:07:12 +09:00
Michele d'Amico
76e2ba25bd #3665: Implemented (#3689) 2019-07-17 09:40:33 +09:00
Seiichi Uchida
66c27c9161
Add #[ignore] to test that runs external process (#3690) 2019-07-16 19:36:23 +09:00
topecongiro
65931cd09d
Release 1.3.3 2019-07-15 22:47:10 +09:00
Seiichi Uchida
89940e541f
Fix bugs related to file-lines (#3684) 2019-07-15 22:41:56 +09:00
Stéphane Campinas
6487422b3e fix print-config minimal option (#3687) 2019-07-15 20:58:54 +09:00
calebcartwright
6f67f07752 refactor: simplify manifest_path option checks 2019-07-14 09:56:07 -05:00
calebcartwright
aef8e93514 Merge remote-tracking branch 'upstream/master' into accept-manifest-path 2019-07-14 09:30:11 -05:00
rChaser53
71289e1d23 fix 'extra comma inserted due to comment' (#3677) 2019-07-14 22:16:47 +09:00
Eric Huss
e55fc6be3b Fix using --help, --verbose, etc. (#3620) 2019-07-14 10:25:53 +09:00
Ruben Schmidmeister
37695b3c45 Extract configuration snippet tests into own module (#3667)
* Extract configuration snippet tests into own module

* Move helper function outside of test function
2019-07-14 10:22:18 +09:00
calebcartwright
17cbbd8cbc feat: add --manifest-path support to cargo fmt 2019-07-12 20:59:29 -05:00
topecongiro
679c8d5f10
Release 1.3.2 2019-07-06 14:22:30 +09:00
Seiichi Uchida
3200af9785
Do not consider macro-origin await as chain item (#3671) 2019-07-06 14:17:53 +09:00
Caleb Cartwright
ff49b80628 fix: handling of --all when dep name and dir name differ (#3664) 2019-07-06 14:17:35 +09:00
topecongiro
44149d6ba4
Release 1.3.1 2019-06-30 13:20:32 +09:00
Stéphane Campinas
1f06a8b361 fix extraction of missing comments when rewriting an empty where clause (#3663) 2019-06-30 12:19:24 +09:00
calebcartwright
731f7d5200 fix: handling of associated type bounds 2019-06-28 16:15:42 -05:00
Nikhil Benesch
e0e2f0db53 Don't panic on license check errors (#3655)
Without this case, an ErrorKind::LicenseCheck results in a panic:

    thread 'main' panicked at 'internal error: entered unreachable code', src/tools/rustfmt/src/formatting.rs:320:18

N.B.: errors of this type are only raised when the configuration file
contains `license_tempate_path = "TEMPLATE_FILE"`.
2019-06-26 10:51:11 +09:00
Caleb Cartwright
c955b5908e fix: run in sub dirs/workspace member dirs (#3652) 2019-06-25 23:15:33 +09:00
rChaser53
9986b9d011 fix internal error for long closure types (#3653) 2019-06-25 23:14:19 +09:00
Nootan Ghimire
561653326d Add newline after help text (#3650) 2019-06-25 11:44:14 +09:00
rChaser53
26d370e9e5 remove unreachable!() (#3646) 2019-06-23 16:24:40 +09:00
rChaser53
5b0ce0ed12 avoid not to truncate necessary chars (#3640) 2019-06-23 14:32:14 +09:00
Seiichi Uchida
1d19a08ed4
Format the last expression-statement as expression (#3631) 2019-06-17 08:53:39 +09:00
Stéphane Campinas
84c2356590 handle unicode chars in closures (#3632)
The `NotUnicode` branch was unecessarily put on a new line, although it
was within max width:

```diff
 fn baz() {
     let our_error_b = result_b_from_func.or_else(|e| match e {
         NotPresent => Err(e).chain_err(|| "env var wasn't provided"),
-        NotUnicode(_) => Err(e).chain_err(|| "env var was very very very bork文字化ã"),
+        NotUnicode(_) => {
+            Err(e).chain_err(|| "env var was very very very bork文字化ã")
+        }
     });
 }
```
2019-06-17 08:53:17 +09:00
Caleb Cartwright
944fc57e10 tests: ensure min number of system/idempotent tests ran (#3629) 2019-06-16 23:47:22 +09:00
Seiichi Uchida
a4eab17d7c
Fix is_subpath 2019-06-14 19:16:17 +09:00
Ruben Schmidmeister
dbac28b4b4 Use trait to abstract emit modes (#3616) 2019-06-13 06:59:20 +09:00
Stéphane Campinas
1cea171cef Improve handling of unicode characters (#3618) 2019-06-12 20:28:29 +09:00
Stéphane Campinas
04add0cd38 implement Display for enums with attribute config_type (#3621) 2019-06-12 20:20:42 +09:00
topecongiro
d33450247b
Rename config_proc_macro to rustfmt-config_proc_macro 2019-06-09 22:29:36 +09:00
Seiichi Uchida
0e3cf08ff1
Release 1.3.0 (#3611) 2019-06-09 21:28:57 +09:00
Seiichi Uchida
47a11cd516
Format modules defined in cfg_attr (#3604) 2019-06-09 09:20:39 +09:00
Seiichi Uchida
e71bffb008
Format modules defined inside cfg_if macro calls (#3600) 2019-06-08 18:47:18 +09:00
Stéphane Campinas
87565c42ce
Merge pull request #3607 from topecongiro/issue-3493
Ignore sub-modules when skip-children is used
2019-06-08 09:50:12 +02:00
topecongiro
dae63e98ce
Ignore sub-modules when skip-children is used 2019-06-07 14:55:41 +09:00
rChaser53
5607178d0a fix the bug add unwanted code to impl (#3601) (#3602) 2019-06-06 13:06:40 +09:00
Stéphane Campinas
e0459eb3fe inline the attribute with its item even with the macro_use attribute or when reorder_imports is disabled (#3598) 2019-06-05 00:14:12 +09:00
Seiichi Uchida
2244f326e6
Cargo update (#3559)
Update `rustc-ap-*` crates to 486.0.0.
2019-06-03 23:57:02 +09:00
Stéphane Campinas
e6b60a40d5 stabilise fn_args_density (#3581) 2019-06-03 22:26:48 +09:00
Stéphane Campinas
6d19a8c71d
Merge pull request #3586 from topecongiro/issue-3584
Format trait aliases with where clauses
2019-05-30 09:39:15 +02:00
rChaser53
fbd9f335f9 fix Erasing inner attributes in struct (#3593) 2019-05-30 07:31:48 +09:00
Stéphane Campinas
1c210eb3c6
Merge pull request #3589 from topecongiro/issue-3583
Catch panics from the parser while rewriting macro calls
2019-05-28 00:49:28 +02:00
topecongiro
36dd49ae5f Set macro_rewrite_failure to true on catching panic 2019-05-28 00:15:14 +09:00
topecongiro
f7cd789ebc Catch panics from the parser while rewriting macro calls 2019-05-28 00:03:50 +09:00
topecongiro
c1373b267b Format trait aliases with where clauses 2019-05-26 21:15:55 +09:00
topecongiro
95c2ad37e1 Refactor rewrite_where_clause 2019-05-26 21:15:38 +09:00
Ivan Veselov
8443262781 Use structopt for rustfmt-format-diff arguments parsing 2019-05-23 22:59:26 +01:00
Seiichi Uchida
a7d4ec92cb Implement Serialize on IgnoreList (#3565)
* Implement Serialize on IgnoreList

* Add a test for #3536
2019-05-22 09:41:57 +02:00
Seiichi Uchida
b5449ba785
Allow overflowing rhs of unit variant (#3566) 2019-05-22 10:51:19 +09:00
Seiichi Uchida
72ca0e5f2c
Merge pull request #3577 from topecongiro/issue-3575
Insert an empty line when normalizing `#[doc = ""]`
2019-05-22 10:49:12 +09:00
Seiichi Uchida
86dad6e3dd
Merge pull request #3576 from rchaser53/issue-3567
add the handling for vec! with paren inside macro
2019-05-22 07:00:07 +09:00
Ivan Veselov
a7afdeb9b8 Drop only the first occurrence of fmt while preparing CLI arguments 2019-05-21 16:36:53 +01:00
Ivan Veselov
32fbe75a4c Drop extra fmt command line argument provided by cargo 2019-05-21 16:36:53 +01:00
Ivan Veselov
ed073a9b7c Use structopt for command line arguments parsing in cargo-fmt 2019-05-21 16:36:53 +01:00
topecongiro
bdb72237a2 Insert an empty line when normalizing #[doc = ""] 2019-05-22 00:10:46 +09:00
rchaser53
bee1a32f26 add the handling for vec! with paren inside macro 2019-05-22 00:07:56 +09:00
rChaser53
0ef2144c82 not to avoid self (#3570) 2019-05-21 11:43:27 +09:00
Ruben Schmidmeister
1ba35fc9b5
Document DocCommentFormatter 2019-05-18 11:50:09 +02:00
Ruben Schmidmeister
11a68d313a
Pass string instead of Symbol to DocCommentFormatter 2019-05-18 11:47:54 +02:00
Ruben Schmidmeister
8d4cb6e783
Use peek() instead of checking indexes 2019-05-18 11:42:49 +02:00
Ruben Schmidmeister
9b98dd774e
Merge branch 'master' into normalize-multiline-doc-attributes 2019-05-18 11:27:35 +02:00
Ruben Schmidmeister
8b57668c33
Move macro to separate module 2019-05-17 16:13:46 +02:00
Ruben Schmidmeister
4745cec7f3
Re-use nightly channel macro 2019-05-17 16:07:49 +02:00
Ruben Schmidmeister
fd22c27c47
Allow tests to be run on nightly only 2019-05-17 15:58:01 +02:00
rchaser53
53142b486d use the span between the self_ty and left brace 2019-05-16 21:27:34 +09:00
rchaser53
bdf105245b fix Const generics are handled incorrectly 2019-05-16 13:22:25 +09:00
Seiichi Uchida
531b2d9136
Merge pull request #3535 from xiongmao86/issue3417
Try to solve issue 3417.
2019-05-16 11:12:56 +09:00
Ruben Schmidmeister
424193041f
Remove unnecessary comma 2019-05-15 18:29:04 +02:00
Ruben Schmidmeister
c84785d93c
Use raw strings 2019-05-15 18:17:48 +02:00
Ruben Schmidmeister
c724528bf9
Avoid unnecessary allocation 2019-05-15 17:39:43 +02:00
Ruben Schmidmeister
6a406a822d
Return iterator instead of collecting early 2019-05-14 20:38:28 +02:00
Ruben Schmidmeister
b875fe9485
Name field more verbosely
This makes the comment above it obsolete
2019-05-14 20:23:55 +02:00
Ruben Schmidmeister
3eb8e4d33c
Ignore unstable key when overriding config 2019-05-13 09:40:16 +02:00
Ruben Schmidmeister
4ac0d35ebb
Only run test on nightly 2019-05-12 23:03:48 +02:00
Ruben Schmidmeister
47a0f78b3b
Fix normalisation of multi-line doc attributes 2019-05-11 15:07:16 +02:00
xiongmao86
a956a20532 Revert "Revert "Change config option from format_doc_comments to format_code_in_doc_comments.""
This reverts commit 97d7216cd4.
2019-05-10 21:22:52 +08:00
Stéphane Campinas
cc97eaf9f9
Merge pull request #3546 from bash/unreachable-pub
Enable unreachable_pub lint
2019-05-10 09:59:07 +02:00
Stéphane Campinas
4bc5911348
Merge pull request #3526 from bash/refactor-apply-newline-style
Refactor apply newline style
2019-05-10 09:48:01 +02:00
Ruben Schmidmeister
d1c1f8e61e
Run rustfmt 2019-05-09 21:13:32 +02:00
Ruben Schmidmeister
618d092bf7
Enable unreachable_pub lint 2019-05-09 20:37:51 +02:00
Andy Russell
ee6f686cc9
use derive feature over serde_derive crate 2019-05-09 13:22:44 -04:00
Ruben Schmidmeister
821a370417
Add tests to cover more edge cases 2019-05-09 17:51:02 +02:00
Ruben Schmidmeister
1f09d94cbb
Make sure windows newlines don't gain an extra carriage return 2019-05-09 17:44:52 +02:00