Rui
69c7dbcd50
Try to solve issue3456. ( #3556 )
2019-10-19 18:19:47 +09:00
Stéphane Campinas
160c3aafc5
handle hard tabs when formatting trailing comments ( #3836 )
2019-10-07 16:40:27 +09: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
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
Seiichi Uchida
983a92c872
Update rustc-ap-* crates to 541.0.0 ( #3707 )
2019-07-29 05:52:45 +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
Seiichi Uchida
89940e541f
Fix bugs related to file-lines ( #3684 )
2019-07-15 22:41:56 +09:00
Seiichi Uchida
2244f326e6
Cargo update ( #3559 )
...
Update `rustc-ap-*` crates to 486.0.0.
2019-06-03 23:57:02 +09: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
Stéphane Campinas
8e068510a4
keep comment appearing between parameter's name and its type ( #3491 )
2019-04-03 18:16:54 +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
Alexander Regueiro
7a3b7c9275
Various cosmetic improvements ( #3403 )
2019-02-19 11:56:42 +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
Hirokazu Hata
4bb90f5cc8
Fix rust_2018_idioms warnings
2019-02-09 16:14:30 +09:00
Stéphane Campinas
813aa79567
fix formatting of strings within a macro
2019-02-07 00:05:05 +01:00
Evgenii
ece629b1cc
transition to Rust 2018
2019-02-04 13:30:43 +03:00
Nick Cameron
d2e91b5b68
Merge pull request #3284 from scampi/issue-3270
...
recognize strings inside comments in order to avoid indenting them
2019-01-17 20:22:36 +13:00
Stéphane Campinas
083a20fb1a
version-gate the formatting of commented strings
2019-01-16 23:06:28 +01:00
wada314
a01990c4d0
Use Unicode-standard char width to wrap comments or strings. ( #3275 )
2019-01-15 08:41:09 +09:00
Stéphane Campinas
baa62c609e
recognize strings inside comments in order to avoid indenting them
...
Close #3270
2019-01-10 21:04:16 +01:00
Philipp Hansch
d0785954c8
Fix trim_right/trim_left deprecation warnings ( #3252 )
2018-12-18 11:21:31 +09:00
kngwyu
fd27eabbb7
Update rustc-ap-syntax to 306.0
2018-12-08 14:39:52 +09:00
Kevin Stenerson
cd8bb50aea
Trim the indentation on macros which heuristically appear to use block-style indentation ( #3178 )
2018-11-07 17:49:53 +09:00
Stéphane Campinas
2d718a3fc2
The method trim_left_preserve_layout didn't handle tabs properly.
...
This is fixed by taking the method macros::indent_macro_snippet which
essentially does the same: it indents a paragraph while preserving the
layout.
2018-10-30 20:24:03 +01: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
Nick Cameron
4bb84f6002
Remove NLL feature
...
And do some refactoring in comments.rs
Closes #3107
2018-10-18 15:39:11 +13:00
Nick Cameron
c09d7ef088
Merge pull request #3106 from sinkuu/clippy
...
Clippy and cleanups
2018-10-16 09:09:56 +13:00
Nick Cameron
5f02be6294
Merge pull request #3102 from nrc/arm-guard-newline
...
Only put `{` on a newline in a match arm where necessary
2018-10-16 09:06:15 +13:00
Nick Cameron
bc4414e53c
Merge pull request #3101 from nrc/pair-newline
...
Simplify multi-lining binop exprs
2018-10-16 09:01:40 +13:00
Shotaro Yamada
751bcf5fa0
Clippy
2018-10-15 23:59:08 +09:00
Nick Cameron
e29fd7bebe
Only put {
on a newline in a match arm where necessary
...
Fixes #3005
2018-10-15 14:06:52 +13:00
Nick Cameron
cbd568083d
Fixup formatting
2018-10-15 11:52:27 +13:00
Otavio Salvador
e203057db0
utils: rewrite count_newlines
using bytecount::count
...
This uses a optimized byte count and also makes use of SIMD
instructions to optimize the processing of the byte arrays.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2018-10-14 18:27:35 -03:00
cad97
fc1909d311
Reformat
2018-08-23 17:14:19 -04:00
cad97
04d804c365
Rename CodeMap/FileMap to SourceMap/SourceFile
...
#2946
2018-08-23 17:10:46 -04:00
Seiichi Uchida
2eeb366311
Ignore comment in wrap_str
2018-08-05 10:50:43 +09:00
Benjamin Brittain
46b241004d
fix nits
2018-07-29 17:20:21 -07:00
Ben Brittain
0b25f602fd
Format Async block and async fn
2018-07-29 08:05:38 -07:00
Nick Cameron
f0fe9c3c4a
chains: prefer to use the next line for an expression, if using the same line would introduce an open block or similar
...
This problem came to light due to the chains changes, but effects other code too. It only happens rarely, e.g.,
before this fix:
```
match foo {
MacroArgKind::Delimited(ref delim_tok, ref args) => rewrite_delimited_inner(
delim_tok,
args,
).map(|(lhs, inner, rhs)| format!("{}{}{}", lhs, inner, rhs)),
};
```
after:
```
match foo {
MacroArgKind::Delimited(ref delim_tok, ref args) => {
rewrite_delimited_inner(delim_tok, args)
.map(|(lhs, inner, rhs)| format!("{}{}{}", lhs, inner, rhs))
}
}
```
2018-07-24 15:43:29 +12:00
Seiichi Uchida
d40ed146a5
Fix breaking changes
...
cc https://github.com/rust-lang/rust/pull/51829 .
2018-07-20 16:18:45 +09:00
Stéphane Campinas
472a2ed0f6
fix rewrite_string when a line feed is present in a sequence of whitespaces, resulting in strange formatting
2018-07-14 19:22:31 +02:00
Nick Cameron
486f8fd8e7
Fixup formatting of tests and source
2018-07-12 21:37:28 +12:00
Seiichi Uchida
3027c21371
Handle raw identifiers
2018-06-25 23:36:45 +09:00
Nick Cameron
6541be3c6f
Replace use_colored_tty
with iatty crate
2018-05-21 15:32:27 +12:00
Nick Cameron
d726492e65
Remove spaces_within_parens_and_brackets
...
cc #1974
2018-05-18 16:35:09 +12:00