Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
286 commits
Select commit Hold shift + click to select a range
74dceee
Fix rustfmt according to review
Nadrieril Nov 24, 2024
232528a
Refactor `where` predicates, and reserve for attributes support
frank-king Nov 25, 2024
1872642
Use 'delta' for Shape args
camsteffen Nov 18, 2024
2a64f21
Return Result from Shape methods
camsteffen Nov 18, 2024
8cb2820
docs: Fix grammar in Configurations.md
imericxu Nov 27, 2024
0a32a02
Use preinterned `path` symbol
clubby789 Nov 27, 2024
78aa72f
fix versionsort chunk split on non-ASCII numerics (#6407)
jessicarod7 Dec 1, 2024
9f8fcc2
Use RewriteResult in visit_item (#6410)
camsteffen Dec 2, 2024
46c9cfc
Merge remote-tracking branch 'upstream/master' into subtree-push-nigh…
ytmimi Dec 2, 2024
af9e9c0
bump toolchain to nightly-2024-12-02
ytmimi Dec 2, 2024
334ee77
annotate `unsafe_fields` test with `#![feature(unsafe_fields)]`
ytmimi Dec 4, 2024
7be9019
Store a single copy of the error registry in DiagCtxt
bjorn3 Nov 9, 2024
8073aab
Rollup merge of #133424 - Nadrieril:guard-patterns-parsing, r=fee1-dead
matthiaskrgr Dec 8, 2024
4e46d2f
Auto merge of #134052 - matthiaskrgr:rollup-puxwqrk, r=matthiaskrgr
bors Dec 9, 2024
6b12b6b
Keep track of parse errors in `mod`s and don't emit resolve errors fo…
estebank Dec 5, 2024
8a2c073
Merge pull request #6412 from ytmimi/subtree-push-nightly-2024-12-02
ytmimi Dec 11, 2024
05c9d68
Fix tools
compiler-errors Dec 10, 2024
68a558c
Rollup merge of #134140 - compiler-errors:unsafe-binders-ast, r=oli-obk
matthiaskrgr Dec 13, 2024
de1c33c
Change the lookahead in `MacroParser::new`.
nnethercote Dec 11, 2024
46a1d70
Simplify `RefTokenTreeCursor::look_ahead`.
nnethercote Dec 11, 2024
cbec1df
Rename `RefTokenTreeCursor`.
nnethercote Dec 11, 2024
3aadb31
Only have one source of truth for keywords.
nnethercote Dec 13, 2024
aeca2c2
Rollup merge of #134253 - nnethercote:overhaul-keywords, r=petrochenkov
jieyouxu Dec 18, 2024
994b55e
Speed up `Parser::expected_token_types`.
nnethercote Dec 4, 2024
a43eef1
Fix incorrect strip r# prefix from `break` and `continue` labels (#6425)
sobatha Dec 22, 2024
c6a272b
Make sure we don't lose default struct value when formatting struct
compiler-errors Dec 22, 2024
ba8ee71
Stabilize style_edition 2024 in-tree
compiler-errors Dec 30, 2024
105cbf8
Merge remote-tracking branch 'upstream/master' into subtree-push-nigh…
ytmimi Jan 2, 2025
f874199
chore: bump rustfmt toolchain to nightly-2025-01-02
Jan 2, 2025
ab98945
chore: fixes needed for subtree-push
ytmimi Jan 2, 2025
f649c4c
make `style-edition` a stable option on the CLI
ytmimi Jan 2, 2025
7397eee
add `#![feature(unsafe_binders)]` annotation to tests
ytmimi Jan 2, 2025
840eb96
rustfmt: drop nightly-gating of the `--style-edition` flag registration
jieyouxu Jan 7, 2025
06ff325
Rename PatKind::Lit to Expr
oli-obk Jan 7, 2025
ad8b776
Only treat plain literal patterns as short
oli-obk Jan 8, 2025
31a9a27
Only treat plain literal patterns as short
oli-obk Jan 8, 2025
d97c4fb
Merge pull request #6431 from ytmimi/subtree-push-nightly-2025-01-02
ytmimi Jan 14, 2025
e6bc629
Update annotate-snippets
clubby789 Nov 10, 2024
0c91d0c
Rollup merge of #135251 - oli-obk:push-lmpyvvyrtplk, r=ytmimi
matthiaskrgr Jan 16, 2025
6f7aeed
fix: wrap_comments creating invalid code blocks
grant0417 Dec 12, 2024
f19e826
Refactor FnKind variant to hold &Fn
celinval Jan 28, 2025
7de0ca8
Disable overflow_delimited_expr in edition 2024
compiler-errors Jan 30, 2025
5e05493
Slightly simplify DiagCtxt::make_silent
bjorn3 Feb 2, 2025
0eadd99
Use fallback fluent bundle from inner emitter in SilentEmitter
bjorn3 Feb 2, 2025
58ba360
tree-wide: parallel: Fully removed all `Lrc`, replaced with `Arc`
safinaskar Feb 3, 2025
054efdd
add check_diff function implementation to check_diff crate
benluiwj Nov 9, 2024
35f9799
Add a TyPat in the AST to reuse the generic arg lowering logic
oli-obk Feb 6, 2025
5619b64
Don't remove block label from closure body (#6468)
anatawa12 Feb 12, 2025
2ad782c
Add option to control trailing zero in floating-point literals (#5834)
amatveiakin Feb 17, 2025
328f453
feat: use `semver` to match required version (#6066)
wesleymatosdev Feb 26, 2025
96264d2
docs: pull latest version from tags instead of releases in docs page …
karolzwolak Feb 26, 2025
c6c8159
docs: clarify the editions behavior and it's consequences on formatti…
karolzwolak Feb 27, 2025
6dcc68f
Do not yeet unsafe<> from type
compiler-errors Feb 28, 2025
326e321
Implment `#[cfg]` and `#[cfg_attr]` in `where` clauses
frank-king Feb 5, 2025
7be7efa
Replace `ast::TokenKind::BinOp{,Eq}` and remove `BinOpToken`.
nnethercote Dec 19, 2024
88e23c9
Rename `ast::TokenKind::Not` as `ast::TokenKind::Bang`.
nnethercote Dec 20, 2024
71310c1
Rollup merge of #132388 - frank-king:feature/where-cfg, r=petrochenkov
matthiaskrgr Mar 3, 2025
a28a422
Auto merge of #137959 - matthiaskrgr:rollup-62vjvwr, r=matthiaskrgr
bors Mar 4, 2025
0ae8340
Implement `&pin const self` and `&pin mut self` sugars
frank-king Jan 19, 2025
facc42a
Simplify `rewrite_explicit_self`
frank-king Mar 5, 2025
ebd6372
Fix rustfmt
spastorino Dec 27, 2024
f9f0ac2
Rollup merge of #134797 - spastorino:ergonomic-ref-counting-1, r=niko…
matthiaskrgr Mar 7, 2025
ee329d3
Allow bool literals as first item of a single-line let chain (#6492)
est31 Mar 12, 2025
d038fb8
Preserve yield position during pretty printing
eholk Mar 12, 2025
e377632
Teach rustfmt to handle postfix yield
eholk Mar 13, 2025
96f68d1
Teach rustfmt to handle postfix yield
eholk Mar 18, 2025
ad0b41c
Refactor YieldKind so postfix yield must have an expression
eholk Mar 18, 2025
c4eaced
update rustfmt test
lcnr Mar 21, 2025
b661e49
Remove `is_any_keyword` methods.
nnethercote Mar 12, 2025
de6e2d7
Remove fields that are dead since the removal of type ascription syntax
fmease Mar 23, 2025
b3b26f4
Track whether an assoc item is in a trait impl or an inherent impl
oli-obk Mar 25, 2025
7590f5c
Rollup merge of #138929 - oli-obk:assoc-ctxt-of-trait, r=compiler-errors
matthiaskrgr Mar 25, 2025
c8609d9
Rollup merge of #138898 - fmease:decrustify-parser-post-ty-ascr, r=co…
Zalathar Mar 26, 2025
2b3bceb
Add `{ast,hir,thir}::PatKind::Missing` variants.
nnethercote Mar 26, 2025
fd7b9a4
Simplify `ItemVisitorKind`.
nnethercote Mar 20, 2025
6bcd711
Remove useless `Option<Ident>` arg.
nnethercote Mar 20, 2025
a535a31
Move `ast::Item::ident` into `ast::ItemKind`.
nnethercote Mar 20, 2025
ec55da1
Address review comments.
nnethercote Apr 1, 2025
1963641
Auto merge of #138492 - lcnr:rm-inline_const_pat, r=oli-obk
bors Apr 1, 2025
f371e16
revert `overflow_delimited_expr` default for style edition 2024
ytmimi Apr 2, 2025
3955c2e
Merge remote-tracking branch 'upstream/master' into subtree-push-nigh…
ytmimi Apr 2, 2025
ab78ef6
chore: bump rustfmt toolchain to nightly-2025-04-02
ytmimi Apr 2, 2025
e3f0a53
Merge pull request #6531 from ytmimi/subtree-push-nightly-2025-04-02
ytmimi Apr 2, 2025
ce70a79
Impl `Copy` for `Token` and `TokenKind`.
nnethercote May 15, 2024
cdccf23
Add `#![feature(ergonomic_clones)]` formatting (#6532)
ytmimi Apr 2, 2025
409c7b8
Tighten up assignment operator representations.
nnethercote Dec 19, 2024
5688caa
feat: add `match_arm_indent` option
kaathewisegit Mar 29, 2025
bedef9b
Try to discover `mod` items in cfg_match! arms (#6522)
CAD97 Apr 5, 2025
2ab6be8
Rollup merge of #139035 - nnethercote:PatKind-Missing, r=oli-obk
Zalathar Apr 7, 2025
fd0ea74
readme: improve Editions section
tshepang Apr 12, 2025
e80a221
Auto merge of #124141 - nnethercote:rm-Nonterminal-and-TokenKind-Inte…
bors Apr 14, 2025
1abbb92
Remove `token::{Open,Close}Delim`.
nnethercote Apr 16, 2025
31d40e5
Add or-patterns to pattern types
oli-obk Feb 27, 2025
ce64001
Also allow bool literals as first item of let chain
calebcartwright Apr 29, 2025
266da42
Do not remove super keyword from super-let
compiler-errors May 12, 2025
6210ac1
attempt to have rustfmt use the new logic
folkertdev Apr 29, 2025
2f3a0a5
rename to get rid of the 'raw' concept
folkertdev May 17, 2025
79a9897
Reduce `P<T>` to a typedef of `Box<T>`.
nnethercote May 26, 2025
4718757
move asm parsing code into `rustc_parse`
folkertdev May 5, 2025
2d7453d
Reorder `ast::ItemKind::{Struct,Enum,Union}` fields.
nnethercote May 27, 2025
99adefc
Rollup merge of #141675 - nnethercote:ItemKind-field-order, r=fee1-dead
jhpratt May 29, 2025
18f4fa3
fix: split a line exceeding the maximum width
ynishimi May 30, 2025
bf5f0ea
Show what `use_field_init_shorthand = true` does
bernardosulzbach May 11, 2025
1443bba
Fix path resolution of `rustfmt` in `cargo-fmt` (#6566)
onur-ozkan Jun 5, 2025
5098c6c
Rollup merge of #141603 - nnethercote:reduce-P, r=fee1-dead
GuillaumeGomez Jun 6, 2025
334670e
fix: skip removing `self` in imports if they are stacked like `use se…
MarcusGrass Jun 11, 2025
d37c63f
Implement pinned borrows, part of `pin_ergonomics`
frank-king Jan 19, 2025
ef94a72
Remove extraneous comma in `Configurations.md`
tylerlaprade Jun 15, 2025
928d1dc
Extract Translator struct
camsteffen Jun 19, 2025
e9d0738
Rename SilentEmitter -> FatalOnlyEmitter
camsteffen Jun 17, 2025
ced2bb0
Extract SilentEmitter
camsteffen Jun 19, 2025
f81941c
Remove an unnecessary check in rustfmt.
nnethercote May 27, 2025
8cf8b25
Auto merge of #142794 - tgross35:rollup-iae7okj, r=tgross35
bors Jun 20, 2025
59690c5
update changelog for v1.9.0 release
ytmimi Jan 2, 2025
109b565
fix Stabilize typo
ytmimi Jun 21, 2025
a9f0386
move version sort entry to `Changed` section
ytmimi Jun 21, 2025
a734657
remove note on internal change
ytmimi Jun 21, 2025
fb1397b
Add Caleb's entries to the `Fixed` Section
ytmimi Jun 21, 2025
f7161a5
Add Caleb's entries to the `Changed` section
ytmimi Jun 21, 2025
46d46d1
Add Caleb's entries to the `Added` section.
ytmimi Jun 21, 2025
0332da0
remove `misc` section
ytmimi Jun 21, 2025
fd6ceeb
Rollup merge of #135731 - frank-king:feature/pin-borrow, r=eholk,trav…
workingjubilee Jun 25, 2025
9debb8f
Change const trait bound syntax from ~const to [const]
oli-obk Mar 11, 2025
a69cccb
Rollup merge of #139858 - oli-obk:new-const-traits-syntax, r=fee1-dead
matthiaskrgr Jun 27, 2025
a22fa5b
Remove let_chains feature
camsteffen Jun 29, 2025
a5c21f9
Remove support for dyn*
compiler-errors Jun 26, 2025
55252ea
Merge from rustc
Jul 2, 2025
48e17a2
Auto merge of #143214 - camsteffen:remove-let-chains-feature, r=est31
bors Jul 2, 2025
97b6e88
Replace kw_span by full span.
cjgillot Jul 2, 2024
9e99aae
Merge from rustc
RalfJung Jul 3, 2025
c5916cf
rustfmt: migrate BareFn -> FnPtr
workingjubilee Jul 6, 2025
a1cfe86
parse `const trait Trait`
fee1-dead Jul 13, 2025
340e590
Print thread ID in panic message if thread name is unknown
tgross35 Sep 11, 2023
4501819
remove `P`
fee1-dead Aug 9, 2025
c9ee26f
Extract ast TraitImplHeader
camsteffen Jul 22, 2025
b63507d
Prevent impossible combinations in `ast::ModKind`.
nnethercote Aug 19, 2025
366a08f
test(rustfmt): Verify frontmatter is preserved
epage Aug 8, 2025
671c0c9
Remove `dirs-sys-0.4.1` dependency.
nnethercote Aug 21, 2025
91124ee
Rollup merge of #145729 - nnethercote:dup-packages, r=calebcartwright
samueltardieu Aug 23, 2025
2890913
add span to struct pattern rest (..)
Erk- Aug 23, 2025
2281382
Rollup merge of #145766 - epage:rustfmt, r=calebcartwright
Zalathar Aug 26, 2025
086aa84
fix a constness ordering bug in rustfmt
npmccallum Sep 1, 2025
7ef4409
Rollup merge of #145783 - Erk-:et-cetera-span, r=compiler-errors
GuillaumeGomez Sep 2, 2025
0911650
Rollup merge of #146089 - npmccallum:rustfmt, r=fmease
GuillaumeGomez Sep 2, 2025
288b931
Strip frontmatter in fewer places
fmease Sep 8, 2025
f300380
resolve: Do not finalize shadowed bindings
petrochenkov Aug 1, 2025
de03b6f
Remove boxes from ast Pat lists
camsteffen Sep 4, 2025
494e594
Fix duplicate import removal for imports_granularity="Module"
tqwewe Oct 6, 2025
5e937e0
test: fix `tests/source/issue-1278.rs` test header
jieyouxu Oct 8, 2025
fc99efc
upgrade toml to 0.9.5 (#6652)
martinvonz Oct 9, 2025
e60cf6d
Update term to 1.1
dpaoliello Aug 8, 2025
292865f
Merge pull request #6628 from dpaoliello/term1.1
Manishearth Oct 9, 2025
51ac4b1
Remove unused syntux.rs
shulaoda Oct 9, 2025
6ac1fcd
Merge pull request #6689 from shulaoda/10-10-remove-unused-file
Manishearth Oct 9, 2025
2b0f7b0
Support formatting for lazy_static::lazy_static!
shulaoda Oct 10, 2025
359b9bf
docs: update communication avenue contributing docs
jieyouxu Oct 10, 2025
6a293fc
Remove unused esm.rs
shulaoda Oct 11, 2025
0cf8543
Merge pull request #6698 from shulaoda/10-11-remove-unused-esm.rs
Manishearth Oct 11, 2025
fd5e84f
Merge branch 'master' into issue_5739
Manishearth Oct 11, 2025
f8c8294
Merge pull request #5741 from ytmimi/issue_5739
Manishearth Oct 11, 2025
721375d
Merge branch 'master' into issue_4635
Manishearth Oct 11, 2025
85d72bc
Merge pull request #5469 from ytmimi/issue_4635
Manishearth Oct 11, 2025
e56a61f
u
shulaoda Oct 13, 2025
81da0cd
Add test case for lazy_static::lazy_static! before style edition 2027
shulaoda Oct 13, 2025
7cb4a36
Merge branch 'master' into 10-10-support-lazy_static!-with-crate-name…
Manishearth Oct 13, 2025
9e90cfb
Merge pull request #6690 from shulaoda/10-10-support-lazy_static!-wit…
Manishearth Oct 13, 2025
acf51c8
docs: Disable form submit
camsteffen Oct 14, 2025
ce8721c
Add not-null pointer patterns to pattern types
oli-obk Jan 24, 2025
893f81d
Retire ast::TyAliasWhereClauses.
cjgillot Oct 15, 2025
5c0bd7e
triagebot: add some backlinks to triagebot docs
jieyouxu Oct 23, 2025
cfdd64a
Trait aliases are rare large ast nodes, box them
oli-obk Jul 21, 2025
49e6202
Implement pattern matching for `&pin mut|const T`
frank-king Apr 13, 2025
60fa6f3
Add more tests
oli-obk Jul 22, 2025
069aef5
Fix formatting of const trait aliases
oli-obk Jul 23, 2025
dd88af6
triagebot: label new non-tracking issues with `needs-triage` label
jieyouxu Oct 23, 2025
ae9e327
Merge pull request #6716 from jieyouxu/needs-triage
Manishearth Oct 30, 2025
ef8627c
Rollup merge of #139751 - frank-king:feature/pin-project, r=Nadrieril…
matthiaskrgr Nov 1, 2025
ef349de
Merge branch 'master' into fix-import-granularity-dedup
tqwewe Nov 1, 2025
ced5993
Merge pull request #6677 from tqwewe/fix-import-granularity-dedup
Manishearth Nov 1, 2025
eaaa7da
Generalize branch references to HEAD
Kobzol Nov 2, 2025
3ceedd7
Rename default branch from `master` to `main`
Kobzol Nov 4, 2025
33f306e
Change `master` to `main` in docs
Kobzol Nov 4, 2025
70f6164
Fix rustfmt
camelid Nov 3, 2025
5bc58c7
Auto merge of #139558 - camelid:mgca-const-items, r=oli-obk,BoxyUwU
bors Nov 8, 2025
8f1be83
Implement `&pin` patterns and `ref pin` bindings
frank-king Nov 2, 2025
d6db5fe
Keep master for backwards compatibility in docs version string
Kobzol Nov 17, 2025
6fe782d
Give all impls a constness
oli-obk Oct 31, 2025
0e5caea
Merge pull request #6720 from Kobzol/rename-master-main
marcoieni Nov 20, 2025
22621d4
Consistently quote TOML strings
Maroloccio Nov 24, 2025
232b448
Merge pull request #6728 from Maroloccio/main
Manishearth Nov 24, 2025
e4f4af2
fix tooling
lcnr Nov 25, 2025
3b3758c
test: Don't make assumptions about the build-dir layout
epage Dec 2, 2025
51c5a47
Replace 'positive integer' with 'nonnegative integer' in configuratio…
blkerby Dec 3, 2025
381dcdb
Add a rustfmt-specific copy of subtree sync procedure
jieyouxu Dec 6, 2025
d5012d8
Merge pull request #6740 from jieyouxu/subtree-sync-procedure
jieyouxu Dec 7, 2025
ebf0fa8
Fix broken test annotations for `tests/source/issue-6202/long_pat.rs`
jieyouxu Dec 7, 2025
d7a8486
Merge pull request #6744 from jieyouxu/fix-broken-test
Manishearth Dec 7, 2025
a207358
Log workflow inputs in `check_diff.sh`
jieyouxu Dec 7, 2025
86261bf
Merge pull request #6741 from jieyouxu/diff-check-log-inputs
Manishearth Dec 9, 2025
41325cb
Also get rustfmt to at least compile
scottmcm Nov 30, 2025
8d405cc
Adapt rustfmt to the overhaul filename handling
Urgau Dec 6, 2025
f5ce3bc
Make attr path symbols rather than idents
JonathanBrouwer Dec 9, 2025
1c262da
cpuid is safe since the stdarch sync, so remove unsafe from usages
ZuseZ4 Dec 26, 2025
751f30f
Auto merge of #150357 - ZuseZ4:zusez4-stdarch-push, r=sayantan
bors Dec 26, 2025
107c3f4
fix rustfmt on `const impl Ty {}`
fee1-dead Dec 24, 2025
bd7dc77
Rollup merge of #150358 - fee1-dead-contrib:push-utvysrrzsvvm, r=oli-obk
matthiaskrgr Dec 27, 2025
c1fe3a4
Allow NotADirectory errors in config lookup
tmfink Aug 4, 2025
3f7e9cc
Add test that "not a dir" errors are allowed
tmfink Oct 18, 2025
bce71ca
Rollup merge of #149790 - JonathanBrouwer:attr-path-perf, r=jdonszelmann
Kobzol Jan 5, 2026
75d056a
Get the Check Diff rust binary working (#6751)
ytmimi Jan 19, 2026
fc8580a
Remove all allows for `diagnostic_outside_of_impl` and `untranslatabl…
JonathanBrouwer Jan 9, 2026
7b2cf02
Use Rust Diff Check Binary in CI (#6770)
ytmimi Jan 20, 2026
88ec076
Mirror `rust-lang/rust` review labels, enable triagebot `shortcuts` a…
jieyouxu Jan 20, 2026
028fdc8
triagebot: add some auto-labels for meta/CI files (#6774)
jieyouxu Jan 20, 2026
7321133
ci: create rustfmt configs when compiling each rustfmt binary (#6775)
ytmimi Jan 20, 2026
f831d0c
triagebot: configure trigger files for `A-{CI,meta}` (take 2) (#6776)
jieyouxu Jan 20, 2026
c20f199
triagebot: actually enable `range-diff` (#6777)
jieyouxu Jan 20, 2026
566ae58
Remove old error emitter
bjorn3 Jan 9, 2026
a0dc8e3
Audit `AllowConstBlockItems`
GrigorenkoPV Nov 21, 2025
d7923b1
rustfmt: support const block items
GrigorenkoPV Nov 26, 2025
794c7fb
Rollup merge of #149174 - GrigorenkoPV:const_block_item, r=me,ytmimi
matthiaskrgr Jan 24, 2026
d9f524d
Add semicolons on the last statement of loop bodies
shepmaster Nov 3, 2025
2d2bb53
Enforce that the last statement in a loop body has a semicolon
shepmaster Oct 23, 2025
a57ce88
Fix `use` <2024 identifier sorting transitivity
Noratrieb Jan 31, 2026
c781b49
Check files in parallel with crossbeam (#6783)
ytmimi Feb 2, 2026
8eb143f
Do not merge top-level modules with imports_granularity Module
mwlon Feb 2, 2026
7bf6355
Hard code the error code registry for custom drivers
bjorn3 Feb 4, 2026
2f9a893
Replace Registry type with a lazily initialized static
bjorn3 Feb 4, 2026
d19650a
triagebot: autolabel merged PRs with `release-notes`
jieyouxu Feb 4, 2026
c5196f3
feat: filter out files from each repo's `rustfmt.toml` `ignore` list
ytmimi Jan 31, 2026
53e39cc
Add clippy and rustfmt to the diff check
ytmimi Feb 6, 2026
893e972
keep const blocks around
BoxyUwU Feb 6, 2026
b883eeb
Format heterogeneous try blocks
ia0 Feb 7, 2026
ed53077
improve tests
ia0 Feb 7, 2026
ce2bda4
Allow provisional mgca syntax of type const <IDENT> = <EXPR> to be re…
Keith-Cancel Feb 6, 2026
9e1e35d
Rollup merge of #152293 - ia0:try_blocks_heterogeneous, r=ytmimi
JonathanBrouwer Feb 10, 2026
461e7b1
fix: properly wrap long `impl trait` function parameters
ytmimi Feb 11, 2026
ab08cc9
Fix rustfmt
mu001999 Jan 28, 2026
a3e7a64
defer version sorted modules until style-edition 2027
ytmimi Jul 2, 2025
d21c8f3
Revert "defer changes for zero argument functions until style_edition…
ytmimi Jul 2, 2025
5c09aaf
Merge remote-tracking branch 'origin/main' into subtree-push-nightly-…
ytmimi Feb 19, 2026
93d778b
chore: bump toolchain to nightly-2026-02-19 and apply minor updates
ytmimi Feb 19, 2026
f6eebbd
chore: update Cargo.lock
ytmimi Feb 19, 2026
523ab42
chore: bump bytecount to 0.6.9
ytmimi Feb 19, 2026
89c18c5
fix: disable `bytecount/generic-simd` dependency
ytmimi Feb 19, 2026
4b620cd
Merge pull request #6807 from ytmimi/subtree-push-nightly-2026-02-19
ytmimi Feb 19, 2026
65a91e6
Update CHANGELOG for v1.9.0 release (#6811)
ytmimi Feb 26, 2026
cebab3e
chore: prep v1.9.0 release
ytmimi Feb 26, 2026
e9cf384
Merge commit 'cebab3e99259be82ff069e5ae89e91855d79e534' into rustfmt-…
ytmimi Feb 26, 2026
02a4978
update Cargo.lock
ytmimi Feb 26, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/patterns.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ fn is_short_pattern_inner(pat: &ast::Pat) -> bool {
| ast::PatKind::MacCall(..)
| ast::PatKind::Slice(..)
| ast::PatKind::Path(..)
| ast::PatKind::Range(..) => false,
| ast::PatKind::Range(..)
| ast::PatKind::Guard(..) => false,
ast::PatKind::Tuple(ref subpats) => subpats.len() <= 1,
ast::PatKind::TupleStruct(_, ref path, ref subpats) => {
path.segments.len() <= 1 && subpats.len() <= 1
Expand Down Expand Up @@ -338,8 +339,9 @@ impl Rewrite for Pat {
.max_width_error(shape.width, self.span)?,
)
.map(|inner_pat| format!("({})", inner_pat)),
PatKind::Err(_) => Err(RewriteError::Unknown),
PatKind::Guard(..) => Ok(context.snippet(self.span).to_string()),
PatKind::Deref(_) => Err(RewriteError::Unknown),
PatKind::Err(_) => Err(RewriteError::Unknown),
}
}
}
Expand Down
12 changes: 12 additions & 0 deletions tests/target/guard_patterns.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#![feature(guard_patterns)]

fn main() {
match user.subscription_plan() {
(Plan::Regular if user.credit() >= 100) | (Plan::Premium if user.credit() >= 80) => {
// Complete the transaction.
}
_ => {
// The user doesn't have enough credit, return an error message.
}
}
}