Maybe Waffle
f026688c2a
Add rustfmt test for formatting for<>
before closures
2022-07-12 21:00:13 +04:00
Caleb Cartwright
ac595dd57a
Merge commit 'c4416f20dcaec5d93077f72470e83e150fb923b1' into sync-rustfmt
2022-06-22 22:14:32 -05:00
Caleb Cartwright
d03a547cad
Merge commit '7b73b60faca71d01d900e49831fcb84553e93019' into sync-rustfmt
2022-06-12 22:03:05 -05:00
Jacob Pratt
241a6f6930
Remove crate
visibility modifier in libs, tests
2022-05-21 00:32:47 -04:00
ydah
86940d2652
Fix typo
...
This PR is fixes typo "avaiable" to "available".
2022-05-20 10:39:10 +09:00
Caleb Cartwright
8211d64c71
Merge commit '5ff7b632a95bac6955611d85040859128902c580' into sync-rustfmt-subtree
2022-03-29 23:17:30 -05:00
Caleb Cartwright
6db6bafc61
Merge commit '4a053f206fd6799a25823c307f7d7f9d897be118' into sync-rustfmt-subtree
2021-12-29 20:49:39 -06:00
Caleb Cartwright
0167c5303f
Merge commit '8da837185714cefbb261e93e9846afb11c1dc60e' into sync-rustfmt-subtree
2021-12-02 21:35:30 -06:00
Caleb Cartwright
f99e3582bd
Merge commit 'ea199bacef07213dbe008841b89c450e3bf0c638' into rustfmt-sync
2021-11-07 20:37:34 -06:00
Caleb Cartwright
606c7d49db
ensure cargo-fmt tests are excluded from root workspace
2021-10-20 10:12:22 -05:00
Caleb Cartwright
2b41b6d022
Merge commit 'efa8f5521d3813cc897ba29ea0ef98c7aef66bb6' into rustfmt-subtree
2021-10-20 00:11:59 -05:00
Cameron Steffen
a603756cc5
Temporary fix rustfmt for let-else
2021-08-30 20:18:41 -05:00
Deadbeef
20ddab3def
Fix rustfmt test
2021-08-27 11:53:03 +00:00
Deadbeef
076916fe94
Introduce ~const
...
- [x] Removed `?const` and change uses of `?const`
- [x] Added `~const` to the AST. It is gated behind const_trait_impl.
- [x] Validate `~const` in ast_validation.
- [ ] Add enum `BoundConstness` to the HIR. (With variants `NotConst` and
`ConstIfConst` allowing future extensions)
- [ ] Adjust trait selection and pre-existing code to use `BoundConstness`.
- [ ] Optional steps (*for this PR, obviously*)
- [ ] Fix #88155
- [ ] Do something with constness bounds in chalk
2021-08-27 05:07:37 +00:00
Frank Steffahn
9bc0dbeb64
Fix typos “an”→“a” and a few different ones that appeared in the same search
2021-08-22 18:15:49 +02:00
Caleb Cartwright
e4b8714c09
Merge commit '4236289b75ee55c78538c749512cdbeea5e1c332' into update-rustfmt
2021-07-25 22:57:19 -05:00
Caleb Cartwright
2608f2c63b
fix(rustfmt): load nested out-of-line mods correctly
2021-06-17 22:35:19 -05:00
Caleb Cartwright
2a3635d5d1
tests: remove snippets with inner attrs on non-block expressions
2021-05-04 18:38:22 -05:00
ChinYing-Li
84ff0013c2
Add the case in duplicate issue ( #4806 ) to the idempotent tests
2021-04-21 21:30:42 -05:00
ChinYing-Li
dac2423f3f
Recognize when a block comment has been ended inside a string literal ( #4312 )
2021-04-21 21:30:42 -05:00
Joseph Birr-Pixton
58157bb4b7
Add some basic tests for chain_width use
2021-04-21 21:27:50 -05:00
Caleb Cartwright
a168d92f9a
tests: augment heuristics tests
2021-04-21 21:27:50 -05:00
Caleb Cartwright
1bcc1f8df5
refactor: apply heuristic config changes in lib
2021-04-21 21:27:50 -05:00
David Bar-On
432e09e89f
Add the use of rewrite_assign_rhs_with_comments to 1.x
2021-02-17 20:47:20 -06:00
David Bar-On
4b0ed96f2e
Fix for issue 4603 about extra macro body indentation (third version)
2021-02-17 20:19:27 -06:00
Caleb Cartwright
d80a42fdd8
tests: add case for issue 4675
2021-01-28 22:01:50 -06:00
Caleb Cartwright
c13d2452c0
chore: backport some empty block check fixes
2021-01-27 20:58:42 -06:00
vallentin
1e2b0b7c72
Added 4646 test case
2021-01-27 20:58:42 -06:00
Michael Morgan
384ba68d64
Add imports_granularity="Item".
...
This option splits all imports into their own `use` statement.
2021-01-27 20:58:42 -06:00
Sean Klein
5e14f760c5
fix: Avoid incorrect global 'cfg_if' Symbol interning
...
Fixes #4656
2021-01-27 19:26:58 -06:00
Ayaz Hafiz
f8deed3a3a
Include const generic type bounds in their spans
...
Closes #4310
2021-01-27 18:50:03 -06:00
topecongiro
152ccb5059
Do not duplicate const keyword on parameters
2021-01-27 18:50:03 -06:00
Seiichi Uchida
c0fede355c
Use the span after generics and where clause ( #4208 )
2021-01-27 18:50:03 -06:00
hafiz
269584634a
Include constness in impl blocks ( #4215 )
...
Closes #4084
2021-01-27 18:50:03 -06:00
Geoffry Song
71863753bd
Rename merge_imports
to imports_granularity
and add a Module
option.
...
This renames the existing `true`/`false` options to `Crate`/`Never`, then adds a
new `Module` option which causes imports to be grouped together by their
originating module.
2021-01-17 11:48:47 -06:00
Caleb Cartwright
b30cb24286
fix: indentation issue on generic bounds
2021-01-16 11:17:23 -06:00
Caleb Cartwright
3571c5d6f7
fix: maintain redundant semis on items in statement pos
2021-01-09 12:11:52 -06:00
Mara Bos
f0eaaeda9e
Add 2021 test.
2021-01-09 12:11:52 -06:00
Mara Bos
b623eb324c
Fix expected macro formatting test output.
2021-01-09 12:11:52 -06:00
Seiichi Uchida
0d022d08d8
Format error and typeof types ( #4416 )
...
* Add a test for #4357
* Format error and typeof types
2020-12-20 12:05:05 -06:00
Stéphane Campinas
c536d80dc1
Fix rewrite of closures with a return type
...
If the closure's body fits in a line, the block is removed but it is
necessary if the closure has a return type.
2020-12-20 12:05:05 -06:00
Caleb Cartwright
4cfb9ef8f4
fix: don't strip nonexistent comma in derive
2020-12-20 12:05:05 -06:00
David Tolnay
c40a8c1ecc
Add negative impl test
2020-11-30 23:24:36 -06:00
WhizSid
7d9ee7558e
Comment between typebounds ( #4474 )
...
* Test cases and get spans
* Fixed type bounds
* Fixed issue of test cases
* Fixed first test case issue
* Removed unwanted whitespaces
* Removed tmp files
2020-11-29 13:26:58 -06:00
WhizSid
b7c38c9d50
Fixed comment dropped between & and type issue ( #4482 )
...
* Fixed comment dropped between & and type issue
* Reduced nesting levels and avoided duplications
* Removed extra allocations
2020-11-29 13:26:58 -06:00
WhizSid
6455e9de0e
Fixed 'Comment removed between type name and =' issue ( #4448 )
...
* Fixed Comment removed between type name and = issue
* Fixed where clause issue and pass the full span
* has_where condition inline
* Fixed indentation error on where clause
* Removed tmp file
2020-11-29 13:26:58 -06:00
hafiz
5e7fb45533
Pick up comments between visibility modifier and item name ( #4239 )
...
* Pick up comments between visibility modifier and item name
I don't think this hurts to fix. #2781 , which surfaced this issue, has
a number of comments relating to similar but slightly different issues
(i.e. dropped comments in other places). I can mark #2781 as closed and
then will open new issues for the comments that are not already resolved
or tracked.
Closes #2781
* fixup! Pick up comments between visibility modifier and item name
* fixup! Pick up comments between visibility modifier and item name
2020-11-29 13:26:58 -06:00
Caleb Cartwright
fb7e604538
tests: backport an additional test case
2020-11-29 13:26:58 -06:00
Adam H. Leventhal
c7359945a4
tests
2020-11-29 13:26:58 -06:00
hafiz
c77c6a405d
Compare code block line indentation with config whitespace ( #4166 )
...
Previously the indetation of a line was compared with the configured
number of spaces per tab, which could cause lines that were formatted
with hard tabs not to be recognized as indented ("\t".len() < " ".len()).
Closes #4152
2020-11-29 13:26:58 -06:00