Caleb Cartwright
637ddfb6da
deps: bump rustc-ap to v673
2020-09-04 19:01:18 -05:00
Caleb Cartwright
da18032ba4
deps: bump rustc-ap* to v666
2020-06-27 13:15:54 -05: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
9714a140c9
refactor: use ast::attr:HasAttrs
2020-03-30 13:11:00 -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
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
c60416ed21
deps: update rustc-ap to v642.0.0
2020-02-08 22:21:37 -06: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
Shotaro Yamada
ca78653d61
Use Cell instead of RefCell ( #3798 )
2019-09-18 22:37:08 +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
rChaser53
2bf67b6e5c
fix TrailingWhitespace when using line breaks in macros arguments ( #3768 )
2019-09-04 23:00:26 +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
89940e541f
Fix bugs related to file-lines ( #3684 )
2019-07-15 22:41:56 +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
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
rchaser53
53142b486d
use the span between the self_ty and left brace
2019-05-16 21:27:34 +09:00
Ruben Schmidmeister
618d092bf7
Enable unreachable_pub lint
2019-05-09 20:37:51 +02:00
Matthias Krüger
4352681d62
fix clippy warnings
...
clippy::needless_return
clippy::redundant_closure
clippy::or_fun_call
clippy::len_zero
clippy::expect_fun_call
clippy::assertions_on_constants
clippy::identity_conversion
clippy::chars_last_cmp
2019-04-11 13:48:13 +02:00
Seiichi Uchida
929d8a9494
Merge pull request #3459 from scampi/issue-3442
...
fix line numbering in missed spans and handle file_lines in edge cases
2019-03-25 07:25:28 +09:00
rchaser53
1d9104bbae
reflect scampi review
...
- fix README.md
- fix BadAttr doc
- is_rustfmt_macro_error => is_unknown_rustfmt_attr
2019-03-21 21:45:57 +09:00
rchaser53
bbbc1e86eb
refrect topecongiro reviews
...
- &Vec<syntax::ast::PathSegment> => &[ast::PathSegment]
- remove unnecessary implements
- transfer skip logic to inside rewrite_macro
- fix test
- use util methods in libsyntax
- use meta_item_list directly
- avoid no_entry.rs for test using module system
- add logic to skip rustfmt::skip::macros only
- remove base_skip_macro_names
- remove Rc
- use clone to append skip_macro_names
2019-03-21 21:45:39 +09:00
rchaser53
f493a59783
use RefCell and Rc
2019-03-21 00:19:52 +09:00
rchaser53
1f8553d66f
add new attribute rustfmt::skip::macros
...
add test for function not having attribute
2019-03-21 00:18:51 +09:00
Stéphane Campinas
cdd08da27b
fix line numbering in missed spans and handle file_lines in edge cases
...
- a leading/trailing newline character in missed spans was throwing off the
start/end of ranges used to compare against file_lines
- fix handling of file_lines when closing a block
Close #3442
2019-03-19 10:19:45 +01:00
Seiichi Uchida
c9479de9a7
Avoid panic on macro inside deeply nested block
...
Closes #3457 .
2019-03-19 10:50:44 +09:00
Seiichi Uchida
ce5cccc32c
Update rustc-ap-* crates to 407.0.0 ( #3447 )
2019-03-14 22:50:53 +09:00
Seiichi Uchida
5f3dfe6c51
Format the if expression at the end of the block in a single line ( #3338 )
2019-03-11 23:18:43 +09:00
Alexander Regueiro
7a3b7c9275
Various cosmetic improvements ( #3403 )
2019-02-19 11:56:42 +09:00
topecongiro
96a3df3b5c
Format visibility on trait alias
2019-02-12 10:16:12 +09:00
Hirokazu Hata
4bb90f5cc8
Fix rust_2018_idioms warnings
2019-02-09 16:14:30 +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
Evgenii
2502939b60
fix review comments
2019-02-07 10:55:55 +03:00
topecongiro
f4f9502ea7
Cargo update
...
- Update `rustc-ap-*` crates to 366.0.0
- Update the other crates to the latest stable
2019-02-06 23:06:15 +09:00
Evgenii
da2d8a4c57
calculate statement first line properly
2019-02-06 10:05:51 +03:00
Evgenii
ece629b1cc
transition to Rust 2018
2019-02-04 13:30:43 +03:00
Stéphane Campinas
d121d7205f
fix logic for adding or not a newline after a missed span
2018-11-09 20:50:07 +01:00
Stéphane Campinas
2f5d864c08
keep track of lines which formatting was disabled in order to prevent indentation which would cause code right-shifting
2018-10-24 12:11:11 +02:00
Stéphane Campinas
9c75a15f4c
Fix handling of code that is annotated with rustfmt::skip.
...
A rustfmt::skip'ed block is indented although original lines are
returned. In order to resolve this, the leading whitespaces are trimmed
on each line while retaining the layout; this leaves the skipped code
to be indented as necessary by the caller.
2018-10-24 12:11:11 +02:00
Matthias Krüger
8c996331cc
fix a couple of clippy lint warnings
...
simplify a comparison with "true"
fn can_be_overflowed: remove unused lifetime
fn rewrite_pairs_one_line: pass "list" by reference (it is not consumed in the function)
fn span_for_token_stream: pass "token_stream" by reference since it is not consumed
use tool lints for clippy suppressions
2018-10-19 01:11:28 +02:00
Nick Cameron
4bb84f6002
Remove NLL feature
...
And do some refactoring in comments.rs
Closes #3107
2018-10-18 15:39:11 +13:00