Nick Cameron
de950c2973
Skip on rustfmt::skip
as well as rustfmt_skip
2018-05-14 16:13:21 +12:00
topecongiro
bd25c7d0f7
Cargo fmt
2018-05-08 06:25:48 +09:00
Nick Cameron
0cc4a8d848
Update rustc_ap_syntax
2018-05-06 09:57:26 +12:00
Nick Cameron
e554d8617d
Merge branch 'master' into imports_indent
2018-04-30 11:50:53 +12:00
Nick Cameron
dae9fb64b6
Merge pull request #2656 from topecongiro/issue-2594
...
Use consistent formatting for empty enum and struct
2018-04-30 11:06:33 +12:00
csmoe
f7415bcea2
update self format
2018-04-29 20:53:31 +08:00
Ryan Leung
fb9a5add9b
add rustc_target to dependencies ( #2660 )
2018-04-28 16:08:58 +09:00
topecongiro
82d8dd2f4b
Factor out a formatting routine for empty struct and tuple
2018-04-28 13:59:03 +09:00
Roman Stoliar
5b5a72c840
keep auto trait
2018-04-20 17:31:31 +03:00
Nick Cameron
ca610d35b3
Refactor to make a sensible public API
...
0.5 - lots of breaking changes
cc #2639
2018-04-20 21:52:02 +12:00
Nick Cameron
01c1f99e39
Fallout from removing TupField
2018-04-14 10:15:39 +12:00
csmoe
84d3659767
update rustc syntax 91.0.0
2018-04-08 22:22:11 +08:00
Seiichi Uchida
edcc7b69eb
Cargo update ( #2602 )
...
Update `rustc-ap-syntax` to 89.0.0 and fix up breaking changes.
2018-04-06 23:09:45 +09:00
Nick Cameron
2fbdedbf2f
Merge pull request #2549 from topecongiro/macro-def-spaces-around-colon
...
Add config option to control spaces around colon in macro def
2018-03-23 10:51:47 +13:00
topecongiro
ccec777f92
Cargo fmt and update tests
2018-03-22 16:09:21 +09:00
Nick Cameron
ff9ab51617
Merge pull request #2550 from sinkuu/chars_count_index
...
Don't index a string with chars().count()/position()
2018-03-22 16:26:48 +13:00
Shotaro Yamada
83c8d23cc2
Omit unnecessary UTF-8 decoding
2018-03-22 08:34:53 +09:00
Nick Cameron
50c95a074a
cargo fmt
2018-03-20 09:27:31 +13:00
Seiichi Uchida
5416c4df76
Modify code around ast::Visibility
...
`ast::Visibility` is changed to `codemap::Spanned` whose node is
`ast::VisibilityKind`. This commit fixes it.
Closes #2398 .
2018-03-06 19:47:28 +09:00
Bastien Orivel
64f6372f32
Bump winapi to 0.3
2018-03-02 15:20:26 +01: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
topecongiro
5e0c6f9716
Avoid orphan in chain with punctuation
2018-02-06 09:36:29 +09:00
Ingvar Stepanyan
8691c64e99
cargo run cargo-fmt
...
Reformat codebase with current version to pass self_tests (formats macros without repetitions).
2018-02-04 12:09:03 +00:00
topecongiro
19d6a3c786
Put the opening brace of impl on the next line
...
We put the opening brace on the next line if the following conditions hold:
1. the result before '{' ends with comments or contains newline
2. the last line of the result before '{' is not extendable (i.e. consists of
'>' and whitespaces).
2018-01-04 12:46:55 +09:00
topecongiro
12ddaf93e2
Remove trim_newlines()
...
We call `trim_newlines()` after the `trim()`ed buffer, which is unnecessary.
2018-01-02 13:04:39 +09:00
Seiichi Uchida
939a6c5820
Get rid of GenericsArg wrapper type
...
`GenericsArg` is basically identical to `ast::GenericParam`.
Just use the latter.
2017-12-24 00:29:59 +09:00
Seiichi Uchida
228578b9c7
Add count_newlines() utility function
2017-12-05 15:17:40 +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
clippered
794a215b27
rename to use_colored_tty; used match as well
2017-11-13 20:18:05 +11:00
clippered
d2f2f25463
add cli option for color
2017-11-13 20:18:03 +11:00
topecongiro
e917eff7ba
Remove unused imports
2017-11-06 21:48:18 +09:00
topecongiro
b023cc831c
Remove static lifetime
2017-11-06 13:52:25 +09:00
Nick Cameron
5233f9cde0
Add support for crate
shorthand for pub(crate)
2017-10-28 18:41:58 +13:00
Seiichi Uchida
ed7ceebfe0
Faster last_line_extendable()
2017-10-07 22:45:33 +09:00
Seiichi Uchida
d38b3acee1
Simplify wrap_str()
2017-10-07 22:45:33 +09:00
Seiichi Uchida
c046a261a8
Change the signature of wrap_str()
2017-10-07 22:45:27 +09:00
Seiichi Uchida
dde0cdabe0
Remove String::rewrite()
2017-10-07 21:59:33 +09:00
Nick Cameron
802df67c2f
Merge pull request #2035 from topecongiro/deprecate-try_opt!
...
Replace `try_opt!` macro with a `?` operator
2017-10-05 20:45:52 +08:00
Nick Cameron
99f14a87ae
Merge pull request #2029 from wada314/fix-crlf
...
Fix broken tests under CRLF environment.
2017-10-05 20:07:29 +08:00
topecongiro
fe69dde96b
Replace 'try_opt!' macro with a '?' operator
2017-10-05 20:50:19 +09:00
Shohei Wada
25d2671c55
Fix broken tests under CRLF env.
2017-10-05 00:23:17 +09:00
topecongiro
62e38860b9
Handle 'extern "Rust"' in format_abi()
2017-09-29 15:08:48 +09:00
Seiichi Uchida
df7d2be562
Move Indent and Shape to shape.rs from lib.rs
2017-09-19 10:04:35 +09:00
Seiichi Uchida
b02e813db7
Remove rewrite_call_with_binary_search()
2017-09-18 13:09:41 +09:00
Nick Cameron
d906ea23c7
Merge pull request #1968 from topecongiro/issue-1967
...
Reorder use items inside blocks
2017-09-18 12:59:25 +12:00
Nick Cameron
cccb7f681e
Merge pull request #1966 from topecongiro/string-to-cow
...
Refactoring: use Cow and etc.
2017-09-18 12:45:25 +12:00
Seiichi Uchida
8e5c76094d
Implement ptr_vec_to_ref_vec()
2017-09-15 22:27:20 +09:00
topecongiro
f0580ae91a
Use Cow to avoid unnecessary allocation
2017-09-15 18:21:06 +09:00