about summary refs log tree commit diff
path: root/src/tools/rustfmt/tests/target
AgeCommit message (Collapse)AuthorLines
2025-08-20test(rustfmt): Verify frontmatter is preservedEd Page-0/+37
This is to prove that the frontmatter is preserved. The choices in tests is intended for showing the different parts of the proposed Style Guide for frontmatters.
2025-08-11Extract ast TraitImplHeaderCameron Steffen-8/+0
2025-07-02Auto merge of #143214 - camsteffen:remove-let-chains-feature, r=est31bors-0/+2
Remove let_chains unstable feature Per https://github.com/rust-lang/rust/issues/53667#issuecomment-3016742982 (but then I also noticed rust-lang/rust#140722) This replaces the feature gate with a parser error that says let chains require 2024. A lot of tests were using the unstable feature. I either added edition:2024 to the test or split out the parts that require 2024.
2025-07-01Remove support for dyn*Michael Goulet-10/+0
2025-06-30Remove let_chains featureCameron Steffen-0/+2
2025-06-27Rollup merge of #139858 - oli-obk:new-const-traits-syntax, r=fee1-deadMatthias Krüger-6/+6
New const traits syntax This PR only affects the AST and doesn't actually change anything semantically. All occurrences of `~const` outside of libcore have been replaced by `[const]`. Within libcore we have to wait for rustfmt to be bumped in the bootstrap compiler. This will happen "automatically" (when rustfmt is run) during the bootstrap bump, as rustfmt converts `~const` into `[const]`. After this we can remove the `~const` support from the parser Caveat discovered during impl: there is no legacy bare trait object recovery for `[const] Trait` as that snippet in type position goes down the slice /array parsing code and will error r? ``@fee1-dead`` cc ``@nikomatsakis`` ``@traviscross`` ``@compiler-errors``
2025-06-26Change const trait bound syntax from ~const to [const]Oli Scherer-6/+6
2025-06-15Implement pinned borrows, part of `pin_ergonomics`Frank King-0/+7
2025-04-29Also allow bool literals as first item of let chainCaleb Cartwright-5/+3
Co-authored-by: est31 <est31@users.noreply.github.com>
2025-03-21update rustfmt testlcnr-1/+1
2025-03-17Teach rustfmt to handle postfix yieldEric Holk-2/+7
This involved fixing the span when parsing .yield
2025-03-14Teach rustfmt to handle postfix yieldEric Holk-0/+12
2025-03-05Implement `&pin const self` and `&pin mut self` sugarsFrank King-0/+9
2025-03-03Rollup merge of #132388 - frank-king:feature/where-cfg, r=petrochenkovMatthias Krüger-0/+116
Implement `#[cfg]` in `where` clauses This PR implements #115590, which supports `#[cfg]` attributes in `where` clauses. The biggest change is, that it adds `AttrsVec` and `NodeId` to the `ast::WherePredicate` and `HirId` to the `hir::WherePredicate`.
2025-03-01Implment `#[cfg]` and `#[cfg_attr]` in `where` clausesFrank King-0/+116
2025-02-28Do not yeet unsafe<> from typeMichael Goulet-0/+2
2025-01-30Disable overflow_delimited_expr in edition 2024Michael Goulet-29/+44
2025-01-09Only treat plain literal patterns as shortOli Scherer-0/+8
2024-12-22Make sure we don't lose default struct value when formatting structMichael Goulet-0/+18
2024-12-12Fix toolsMichael Goulet-0/+9
2024-11-24Fix rustfmt according to reviewNadrieril-0/+12
2024-11-21Implement the unsafe-fields RFC.Luca Versari-0/+11
Co-Authored-By: Jacob Pratt <jacob@jhpratt.dev>
2024-11-02Do not format generic constsMichael Goulet-0/+25
2024-10-15Rewrite for<..> async correctlyMichael Goulet-0/+2
2024-10-15Rollup merge of #130635 - eholk:pin-reborrow-sugar, r=compiler-errorsMatthias Krüger-0/+9
Add `&pin (mut|const) T` type position sugar This adds parser support for `&pin mut T` and `&pin const T` references. These are desugared to `Pin<&mut T>` and `Pin<&T>` in the AST lowering phases. This PR currently includes #130526 since that one is in the commit queue. Only the most recent commits (bd450027eb4a94b814a7dd9c0fa29102e6361149 and following) are new. Tracking: - #130494 r? `@compiler-errors`
2024-10-07Add basic pin sugar support to rustfmtEric Holk-0/+9
2024-10-01Remove anon struct and union typesMichael Goulet-31/+0
2024-09-19Merge commit 'b23b69900eab1260be510b2bd8922f4b6de6cf1e' into sync-from-rustfmtYacin Tmimi-53/+427
2024-09-06Fix toolsMichael Goulet-0/+15
2024-08-07Stabilize `unsafe_attributes`carbotaniuman-1/+0
2024-08-02rustfmt: Remove `has_cpuid` from testJubilee Young-9/+0
2024-07-11Remove rustdoc tests which no longer parseMichael Goulet-8/+0
2024-06-28Implement RTN support in rustfmtMichael Goulet-0/+10
2024-06-23Implement use<> formatting in rustfmtMichael Goulet-0/+55
2024-06-22Merge commit 'e4944185ae09c99f59b460e358909f329010ea9c' into ↵Caleb Cartwright-4/+389
sync-from-rustfmt-24-06
2024-06-06Revert "Rollup merge of #124099 - voidc:disallow-ambiguous-expr-attrs, ↵Rémy Rakic-2/+2
r=davidtwco" This reverts commit 57dad1d75e562ff73051c1c43b07eaf65c7dbd74, reversing changes made to 36316df9fe6c3e246153fe6e78967643cf08c148.
2024-04-24Error on using `yield` without also using `#[coroutine]` on the closureOli Scherer-1/+2
And suggest adding the `#[coroutine]` to the closure
2024-04-18Disallow ambiguous attributes on expressionsDominik Stolz-2/+2
2024-03-27Add rustfmt test for mut ref mutJules Bertholet-0/+10
2024-03-06Add basic rustfmt implementation & testRoss Smyth-0/+20
2024-03-05errors: share `SilentEmitter` between rustc and rustfmtDavid Wood-0/+5
Signed-off-by: David Wood <david@davidtw.co>
2024-02-14Rollup merge of #121035 - compiler-errors:rustfmt-asyncness, r=calebcartwrightGuillaume Gomez-0/+3
Format `async` trait bounds in rustfmt r? `@ytmimi` or `@calebcartwright` This PR opts to do formatting in the rust-lang/rust tree because otherwise we'd have to wait until a full sync, and rustfmt is currently totally removing the `async` keyword. cc https://github.com/rust-lang/rustfmt/issues/6070
2024-02-13Format async bounds in rustfmtMichael Goulet-0/+3
2024-02-12Add rustfmt test from #117942Frank King-0/+12
2024-01-22Check that a token can begin a nonterminal kind before parsing it as a macro ↵Michael Goulet-0/+3
arg in rustfmt
2023-12-10Remove edition umbrella features.Eric Huss-2/+2
2023-10-22Merge commit '81fe905ca83cffe84322f27ca43950b617861ff7' into rustfmt-syncCaleb Cartwright-0/+915
2023-10-20Rename lots of files that had `generator` in their nameOli Scherer-0/+0
2023-10-20s/generator/coroutine/Oli Scherer-2/+2
2023-08-24Parse unnamed fields and anonymous structs or unionsFrank King-0/+19
Anonymous structs or unions are only allowed in struct field definitions. Co-authored-by: carbotaniuman <41451839+carbotaniuman@users.noreply.github.com>