Caleb Cartwright
e4b8714c09
Merge commit '4236289b75ee55c78538c749512cdbeea5e1c332' into update-rustfmt
2021-07-25 22:57:19 -05:00
Caleb Cartwright
1bcc1f8df5
refactor: apply heuristic config changes in lib
2021-04-21 21:27:50 -05:00
Joshua Nelson
61ee1089f0
Use rustc_private
instead of crates.io dependencies
...
- Update rust-toolchain to also install `rustc-dev` component
2021-04-21 21:17:36 -05:00
Caleb Cartwright
a1dc57ace1
chore: apply AST HasAttrs->AstLike changes
2021-04-02 23:21:06 -05:00
Caleb Cartwright
4cfb9ef8f4
fix: don't strip nonexistent comma in derive
2020-12-20 12:05:05 -06:00
Caleb Cartwright
fb7e604538
tests: backport an additional test case
2020-11-29 13:26:58 -06:00
Adam H. Leventhal
3df383aa3c
fixes #4115 , #4029 , #3898
2020-11-29 13:26:58 -06:00
Caleb Cartwright
9ba373f822
deps: bump rustc-ap to v678
2020-09-23 00:45:18 -05:00
Caleb Cartwright
aa11c27490
chore: run rustfmt
2020-09-04 19:01:18 -05:00
Caleb Cartwright
637ddfb6da
deps: bump rustc-ap to v673
2020-09-04 19:01:18 -05:00
Caleb Cartwright
e4617e0e61
deps: bump rustc-ap to v672
2020-09-04 19:01:18 -05: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
9b0ed57af6
refactor: parse & mod resolver for rustc-ap v650
2020-03-27 21:33: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
Seiichi Uchida
5baba86fe5
Update rustc-ap-* crates to 581.0.0 ( #3783 )
2019-09-06 22:41:03 +09:00
Michele d'Amico
76e2ba25bd
#3665 : Implemented ( #3689 )
2019-07-17 09:40:33 +09:00
Seiichi Uchida
47a11cd516
Format modules defined in cfg_attr ( #3604 )
2019-06-09 09:20:39 +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
11a68d313a
Pass string instead of Symbol to DocCommentFormatter
2019-05-18 11:47:54 +02:00
Ruben Schmidmeister
9b98dd774e
Merge branch 'master' into normalize-multiline-doc-attributes
2019-05-18 11:27:35 +02:00
Ruben Schmidmeister
6a406a822d
Return iterator instead of collecting early
2019-05-14 20:38:28 +02:00
Ruben Schmidmeister
47a0f78b3b
Fix normalisation of multi-line doc attributes
2019-05-11 15:07:16 +02: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
Alexander Regueiro
7a3b7c9275
Various cosmetic improvements ( #3403 )
2019-02-19 11:56:42 +09:00
Hirokazu Hata
4bb90f5cc8
Fix rust_2018_idioms warnings
2019-02-09 16:14:30 +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
Rémy Rakic
83d1d9aa14
normalize_doc_attributes: remove leading whitespace from the doc comment opener
...
Remove possible whitespace from the `CommentStyle::opener()` so that the literal itself has control over the comment's leading spaces.
This is most useful for tools, such as bindgen, to allow for example: machine-readable comments with precise syntax rules, or idempotently round-tripping between the proc-macro API and rustfmt.
2018-11-05 18:24:36 +01:00
Nick Cameron
8b709c0019
Add attr_fn_like_width
to the width heuristics
...
It is a bit larger than than `fn_call_width` which we used previously, so fewer attributes get reformatted.
Closes #2929
2018-10-12 15:20:42 +13: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
e2b9c66cc9
Cargo fmt
2018-09-19 23:22:26 +09:00
Rémy Rakic
6c96ab7c9a
address review comment in Attribute rewrite fn
2018-09-13 01:13:07 +02:00
lqd
4b7130dfa1
normalize_doc_attributes option: convert doc attributes to comments
...
Convert `#![doc]` and `#[doc]` attributes to `//!` and `///` doc comments.
2018-09-07 21:58:35 +02:00
Maximilian Roos
968affc3e0
final clippy changes
2018-09-01 16:32:38 -04:00
Seiichi Uchida
0d60f6715d
Use span_ends_with_comma to find a trailing comma in an attribute
2018-08-27 16:37:58 +09:00
cad97
04d804c365
Rename CodeMap/FileMap to SourceMap/SourceFile
...
#2946
2018-08-23 17:10:46 -04:00
Nick Cameron
803d000ed3
Merge pull request #2900 from topecongiro/combine-attrs
...
Combine function-like attributes
2018-08-06 19:37:05 +12:00
Seiichi Uchida
b1c241ea72
Combine list-like attributes
2018-08-06 08:10:19 +09:00
Seiichi Uchida
e5c79bb26b
Fix imports
2018-08-03 22:14:45 +09:00
Seiichi Uchida
024c03e81b
Use builder pattern for ListFormatting
2018-08-03 22:13:20 +09:00
Nick Cameron
486f8fd8e7
Fixup formatting of tests and source
2018-07-12 21:37:28 +12:00
Nick Cameron
3abebf95ce
Apply short function call heuristic to attributes
...
Closes #2620
2018-06-26 15:18:17 +12:00
Nick Cameron
42f03458dd
Refactor and fixup attribute formatting
...
Preserves trailing commas (except in derives where we follow function args).
Correctly uses `#` vs `#!` for derives.
Uses block indent for derives, fixes #2805 .
2018-06-26 15:18:17 +12:00
Josh Chase
ee5ff2d9e8
Add flag to the ListFormatting struct for nested imports
2018-06-19 12:13:35 -04:00
Shotaro Yamada
d1e2b80fb9
Use saturating_sub
2018-05-15 20:41:43 +09:00
Nick Cameron
7eb8bdbbd2
Format attributes with paths
2018-05-14 16:04:15 +12:00