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
topecongiro
f51261e93e
Cargo fmt
2017-09-15 12:10:58 +09:00
Seiichi Uchida
4b79055a15
Apply refactoring from cargo clippy
2017-08-31 12:49:12 +09:00
Vadim Petrochenkov
6e5c6f5ba3
Use getters to access Span
fields
2017-08-31 14:14:13 +12:00
topecongiro
831db35a83
Move isatty() to utils.rs
2017-08-15 16:49:02 +09:00
topecongiro
0af19985fc
Generalize combine_attr_and_expr
2017-08-11 17:52:13 +09:00
topecongiro
60fb11e5dd
Do not take inner attributes into account for span
2017-08-05 15:21:46 +09:00
Seiichi Uchida
14f416273b
Add format_constness() and last_line_used_width()
2017-08-01 22:27:12 +09:00
Emilio Cobos Álvarez
6bf9124ace
visitor: Make sure to don't eat or realign items when they should be skipped due to file-lines.
...
Before this patch, stuff like the argument with the comment was realigned to
column 0, even when being outside of the file_lines range.
2017-07-31 09:14:58 +01:00