Commit Graph

124 Commits

Author SHA1 Message Date
Alexander Regueiro 7a3b7c9275 Various cosmetic improvements (#3403) 2019-02-19 11:56:42 +09: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
Evgenii ece629b1cc transition to Rust 2018 2019-02-04 13:30:43 +03:00
Matthias Krüger 3aa153398a fix a few clippy warnings
types.rs:
fix single_char_pattern (use character patters instead of string for .ends_with() and .starts_with()

patterns.rs
expr.rs
file_lines.rs:
fix into_iter_on_ref_ptr (use iter() or iter_mut() instead of into_iter()

tests/mod.rs:
check_files(): take Option<PathBuf> by reference
2018-11-16 22:25:33 +01:00
Matthias Krüger b25f974c0d fix a few typos found via codespell. 2018-10-19 12:28:00 +02:00
Seiichi Uchida d7e1f0006a Put arguments of the fail attribute on the same line as println! 2018-09-30 08:05:45 +09:00
Seiichi Uchida 755d27a424 Take impl Iterator for overflow routines 2018-09-29 14:33:00 +09:00
Seiichi Uchida e2b9c66cc9 Cargo fmt 2018-09-19 23:22:26 +09:00
crw5996 5d642e8b23 Fixed #2955. Added value to determine whether or not rustfmt has condensed a tuple-struct
Refactored to not use a mutable variable
2018-08-27 15:25:40 -04:00
Nick Cameron 97d29ff2e1 Merge pull request #2942 from crw5996/fix-ellipsis-bug
Fix Issue with ellipsis matching in pattern.rs
2018-08-27 09:44:28 +12:00
chris 4e748a269e Fixed ellipsis bug where rustfmt was creating code that could not be parsed 2018-08-24 00:58:21 -04: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 934cf2807d Remove a wildcard parttern from slice patterns 2018-08-12 23:56:09 +09:00
Seiichi Uchida 024c03e81b Use builder pattern for ListFormatting 2018-08-03 22:13:20 +09:00
Nick Cameron b68fd9e6bf Move pair handling to its own module 2018-07-12 21:37:28 +12:00
Nick Cameron b6ea973d19 Factor out PairParts::infix 2018-07-12 21:37:28 +12:00
topecongiro bc16d8864a Fix compile error from breaking changes in libsyntax 2018-06-30 15:53:28 +09:00
Seiichi Uchida 3027c21371 Handle raw identifiers 2018-06-25 23:36:45 +09:00
Nick Cameron d726492e65 Remove spaces_within_parens_and_brackets
cc #1974
2018-05-18 16:35:09 +12:00
topecongiro bd25c7d0f7 Cargo fmt 2018-05-08 06:25:48 +09:00
csmoe f7415bcea2 update self format 2018-04-29 20:53:31 +08:00
csmoe 84d3659767 update rustc syntax 91.0.0 2018-04-08 22:22:11 +08:00
Shotaro Yamada 3467b4dafe Use ListItem::has_comment 2018-04-01 22:29:26 +09:00
Shotaro Yamada a2325375ed Do not collect into a Vec by hand 2018-04-01 22:29:26 +09:00
Shotaro Yamada 89200f40ff Remove unnecessary [..]s 2018-04-01 22:29:26 +09:00
Seiichi Uchida 903de92dae Avoid cloning RewriteContext 2018-03-25 20:20:50 +09:00
Seiichi Uchida 88589f2ad8 Add matches module
`matches` module contains `rewrite_match` and related stuffs.
2018-03-21 22:21:08 +09:00
Seiichi Uchida 6ba7c34433 Use Option<SeparatorTactic> over bool to control trailing comma 2018-03-09 14:07:43 +09:00
Seiichi Uchida ae629abc41 Add overflow module
This commit adds `overflow` module. This module provides two APIs.
`rewrite_with_parens` is basically the same as `rewrite_call_inner`.
`rewrite_with_angle_brackets` is used for rewriting generics and types.
2018-03-09 14:07:43 +09:00
Seiichi Uchida 3f0b630845 Support parentheses in patterns 2018-03-06 20:07:09 +09:00
Nick Cameron 39301ae5f2 Go back to a non-workspace structure
Kinda reverts https://github.com/rust-lang-nursery/rustfmt/pull/2419
2018-03-02 14:58:23 +13:00
topecongiro 4af2aa3a9e Create rustfmt_core crate 2018-02-07 22:48:05 +09:00
David Alber 69f27673df Extending spaces_around_ranges to ranges in match arm patterns 2018-01-21 16:50:17 -08:00
Seiichi Uchida 1ef6bccea3 Cargo fmt
Run 'cargo fmt' with the following setting:

```
reorder_imports = true
reorder_imports_in_group = true
```
2017-12-24 00:28:58 +09:00
Seiichi Uchida 5624175574 Format macro in pattern position 2017-12-10 00:22:00 +09:00
Seiichi Uchida 3ebe054362 Replace into() on &str with to_owned() 2017-12-08 13:07:42 +09:00
Seiichi Uchida 7c4a84751f Convert '&str' into 'String' whenever necessary 2017-12-07 13:57:52 +09:00
topecongiro 22c9025027 Format source codes 2017-11-30 18:00:49 +09:00
topecongiro 35466adbfe Generalize ListItems to allow a separator other than comma 2017-11-16 17:43:36 +09:00
topecongiro 34c2499029 Cargo fmt 2017-11-16 17:43:06 +09:00
topecongiro bc543cce0b Combine spaces_within_parens and spaces_within_brackets 2017-11-14 23:42:31 +09:00
topecongiro 3e8f4b7907 Fix PairParts related issues 2017-11-06 21:48:05 +09:00
topecongiro c73871c516 Introduce PairParts to reduce the number of args of rewrite_pair() 2017-11-06 13:52:25 +09:00
topecongiro 87afdf4467 Combine PatKind::TupleStruct 2017-11-02 20:29:10 +09:00
Martin Lindhe f930a16b8d fix some typos 2017-11-01 07:33:55 +01:00
topecongiro fe69dde96b Replace 'try_opt!' macro with a '?' operator 2017-10-05 20:50:19 +09:00
Nick Cameron 2aa2d4ebe3 Merge pull request #2011 from topecongiro/rewrite_call_inner
Change return type of rewrite_call_inner() to Option<String>
2017-10-04 20:14:10 +08:00
topecongiro 436a083fce Change return type of rewrite_call_inner() to Option<String> 2017-09-28 16:33:30 +09:00