Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
dadcea6
Tighten up assignment operator representations.
nnethercote Dec 19, 2024
99c6778
Add `{ast,hir,thir}::PatKind::Missing` variants.
nnethercote Mar 26, 2025
66759bd
Impl `Copy` for `Token` and `TokenKind`.
nnethercote May 15, 2024
0731f4c
Remove `token::{Open,Close}Delim`.
nnethercote Apr 16, 2025
669a2b8
Add or-patterns to pattern types
oli-obk Feb 27, 2025
ea1a2bf
Do not remove super keyword from super-let
compiler-errors May 12, 2025
ab068aa
Reorder `ast::ItemKind::{Struct,Enum,Union}` fields.
nnethercote May 27, 2025
b036b18
Reduce `P<T>` to a typedef of `Box<T>`.
nnethercote May 26, 2025
9f2e0af
Remove an unnecessary check in rustfmt.
nnethercote May 27, 2025
bf37b63
Extract Translator struct
camsteffen Jun 19, 2025
06df7fd
Rename SilentEmitter -> FatalOnlyEmitter
camsteffen Jun 17, 2025
28cd027
Extract SilentEmitter
camsteffen Jun 19, 2025
7bfc4c2
Implement pinned borrows, part of `pin_ergonomics`
frank-king Jan 19, 2025
2ca92fc
Change const trait bound syntax from ~const to [const]
oli-obk Mar 11, 2025
48b4349
Remove let_chains feature
camsteffen Jun 29, 2025
c768166
Remove support for dyn*
compiler-errors Jun 26, 2025
ebda305
Replace kw_span by full span.
cjgillot Jul 2, 2024
8f04571
rustfmt: migrate BareFn -> FnPtr
workingjubilee Jul 6, 2025
5c3b253
parse `const trait Trait`
fee1-dead Jul 13, 2025
0f355d9
Print thread ID in panic message if thread name is unknown
tgross35 Sep 11, 2023
2035fd9
remove `P`
fee1-dead Aug 9, 2025
69526d9
Extract ast TraitImplHeader
camsteffen Jul 22, 2025
121e490
Prevent impossible combinations in `ast::ModKind`.
nnethercote Aug 19, 2025
fa6d4f2
Remove `dirs-sys-0.4.1` dependency.
nnethercote Aug 21, 2025
33140ca
test(rustfmt): Verify frontmatter is preserved
epage Aug 8, 2025
79f813c
add span to struct pattern rest (..)
Erk- Aug 23, 2025
01865bb
fix a constness ordering bug in rustfmt
npmccallum Sep 1, 2025
af49c25
Strip frontmatter in fewer places
fmease Sep 8, 2025
285fb69
resolve: Do not finalize shadowed bindings
petrochenkov Aug 1, 2025
8f6371c
chore: bump rustfmt toolchain to nightly-2025-10-07
jieyouxu Oct 8, 2025
6d4b0b0
fix: non-trivial merge conflicts and broken test headers
jieyouxu Oct 8, 2025
2537f5d
Revert "Remove an unnecessary check in rustfmt."
fee1-dead Oct 23, 2025
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
92 changes: 64 additions & 28 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ cargo_metadata = "0.18"
clap = { version = "4.4.2", features = ["derive"] }
clap-cargo = "0.12.0"
diff = "0.1"
dirs = "5.0"
dirs = "6.0"
getopts = "0.2"
ignore = "0.4"
itertools = "0.12"
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "nightly-2025-04-02"
channel = "nightly-2025-10-07"
components = ["llvm-tools", "rustc-dev"]
6 changes: 3 additions & 3 deletions src/chains.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
use std::borrow::Cow;
use std::cmp::min;

use rustc_ast::{ast, ptr};
use rustc_ast::ast;
use rustc_span::{BytePos, Span, symbol};
use tracing::debug;

Expand Down Expand Up @@ -190,7 +190,7 @@ enum ChainItemKind {
MethodCall(
ast::PathSegment,
Vec<ast::GenericArg>,
ThinVec<ptr::P<ast::Expr>>,
ThinVec<Box<ast::Expr>>,
),
StructField(symbol::Ident),
TupleField(symbol::Ident, bool),
Expand Down Expand Up @@ -351,7 +351,7 @@ impl ChainItem {
fn rewrite_method_call(
method_name: symbol::Ident,
types: &[ast::GenericArg],
args: &[ptr::P<ast::Expr>],
args: &[Box<ast::Expr>],
span: Span,
context: &RewriteContext<'_>,
shape: Shape,
Expand Down
4 changes: 2 additions & 2 deletions src/closures.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use rustc_ast::{Label, ast, ptr};
use rustc_ast::{Label, ast};
use rustc_span::Span;
use thin_vec::thin_vec;
use tracing::debug;
Expand Down Expand Up @@ -169,7 +169,7 @@ fn rewrite_closure_with_block(
let block = ast::Block {
stmts: thin_vec![ast::Stmt {
id: ast::NodeId::root(),
kind: ast::StmtKind::Expr(ptr::P(body.clone())),
kind: ast::StmtKind::Expr(Box::new(body.clone())),
span: body.span,
}],
id: ast::NodeId::root(),
Expand Down
1 change: 0 additions & 1 deletion src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,6 @@ mod test {
#[allow(dead_code)]
mod mock {
use super::super::*;
use crate::config_option_with_style_edition_default;
use rustfmt_config_proc_macro::config_type;

#[config_type]
Expand Down
10 changes: 6 additions & 4 deletions src/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::cmp::min;

use itertools::Itertools;
use rustc_ast::token::{Delimiter, Lit, LitKind};
use rustc_ast::{ForLoopKind, MatchKind, ast, ptr, token};
use rustc_ast::{ForLoopKind, MatchKind, ast, token};
use rustc_span::{BytePos, Span};
use tracing::debug;

Expand Down Expand Up @@ -1461,7 +1461,7 @@ fn choose_separator_tactic(context: &RewriteContext<'_>, span: Span) -> Option<S
pub(crate) fn rewrite_call(
context: &RewriteContext<'_>,
callee: &str,
args: &[ptr::P<ast::Expr>],
args: &[Box<ast::Expr>],
span: Span,
shape: Shape,
) -> RewriteResult {
Expand Down Expand Up @@ -1724,7 +1724,7 @@ fn struct_lit_can_be_aligned(fields: &[ast::ExprField], has_base: bool) -> bool
fn rewrite_struct_lit<'a>(
context: &RewriteContext<'_>,
path: &ast::Path,
qself: &Option<ptr::P<ast::QSelf>>,
qself: &Option<Box<ast::QSelf>>,
fields: &'a [ast::ExprField],
struct_rest: &ast::StructRest,
attrs: &[ast::Attribute],
Expand Down Expand Up @@ -2127,7 +2127,7 @@ fn rewrite_assignment(
context: &RewriteContext<'_>,
lhs: &ast::Expr,
rhs: &ast::Expr,
op: Option<&ast::BinOp>,
op: Option<&ast::AssignOp>,
shape: Shape,
) -> RewriteResult {
let operator_str = match op {
Expand Down Expand Up @@ -2357,8 +2357,10 @@ fn rewrite_expr_addrof(
) -> RewriteResult {
let operator_str = match (mutability, borrow_kind) {
(ast::Mutability::Not, ast::BorrowKind::Ref) => "&",
(ast::Mutability::Not, ast::BorrowKind::Pin) => "&pin const ",
(ast::Mutability::Not, ast::BorrowKind::Raw) => "&raw const ",
(ast::Mutability::Mut, ast::BorrowKind::Ref) => "&mut ",
(ast::Mutability::Mut, ast::BorrowKind::Pin) => "&pin mut ",
(ast::Mutability::Mut, ast::BorrowKind::Raw) => "&raw mut ",
};
rewrite_unary_prefix(context, operator_str, expr, shape)
Expand Down
Loading
Loading