Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
100 changes: 81 additions & 19 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 @@ -557,7 +557,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
2 changes: 1 addition & 1 deletion src/imports.rs
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ impl UseSegment {
modsep: bool,
) -> Option<UseSegment> {
let name = rewrite_ident(context, path_seg.ident);
if name.is_empty() || name == "{{root}}" {
if name.is_empty() {
return None;
}
let kind = match name {
Expand Down
Loading
Loading