Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 7a76ec0

Browse files
deps: bump to rustc v644
1 parent 9f53665 commit 7a76ec0

File tree

9 files changed

+148
-149
lines changed

9 files changed

+148
-149
lines changed

Cargo.lock

Lines changed: 100 additions & 101 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,35 +64,35 @@ rustc-workspace-hack = "1.0.0"
6464

6565
[dependencies.rustc_ast_pretty]
6666
package = "rustc-ap-rustc_ast_pretty"
67-
version = "642.0.0"
67+
version = "644.0.0"
6868

6969
[dependencies.rustc_data_structures]
7070
package = "rustc-ap-rustc_data_structures"
71-
version = "642.0.0"
71+
version = "644.0.0"
7272

7373
[dependencies.rustc_errors]
7474
package = "rustc-ap-rustc_errors"
75-
version = "642.0.0"
75+
version = "644.0.0"
7676

7777
[dependencies.rustc_parse]
7878
package = "rustc-ap-rustc_parse"
79-
version = "642.0.0"
79+
version = "644.0.0"
8080

8181
[dependencies.rustc_session]
8282
package = "rustc-ap-rustc_session"
83-
version = "642.0.0"
83+
version = "644.0.0"
8484

8585
[dependencies.rustc_span]
8686
package = "rustc-ap-rustc_span"
87-
version = "642.0.0"
87+
version = "644.0.0"
8888

8989
[dependencies.rustc_target]
9090
package = "rustc-ap-rustc_target"
91-
version = "642.0.0"
91+
version = "644.0.0"
9292

9393
[dependencies.syntax]
9494
package = "rustc-ap-syntax"
95-
version = "642.0.0"
95+
version = "644.0.0"
9696

9797
[dev-dependencies]
9898
lazy_static = "1.0.0"

src/closures.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ use crate::utils::{last_line_width, left_most_sub_expr, stmt_expr, NodeIdExt};
2525

2626
pub(crate) fn rewrite_closure(
2727
capture: ast::CaptureBy,
28-
is_async: &ast::IsAsync,
28+
is_async: &ast::Async,
2929
movability: ast::Movability,
3030
fn_decl: &ast::FnDecl,
3131
body: &ast::Expr,
@@ -50,7 +50,7 @@ pub(crate) fn rewrite_closure(
5050
}
5151

5252
let result = match fn_decl.output {
53-
ast::FunctionRetTy::Default(_) if !context.inside_macro() => {
53+
ast::FnRetTy::Default(_) if !context.inside_macro() => {
5454
try_rewrite_without_block(body, &prefix, context, shape, body_shape)
5555
}
5656
_ => None,
@@ -214,7 +214,7 @@ fn rewrite_closure_block(
214214
// Return type is (prefix, extra_offset)
215215
fn rewrite_closure_fn_decl(
216216
capture: ast::CaptureBy,
217-
asyncness: &ast::IsAsync,
217+
asyncness: &ast::Async,
218218
movability: ast::Movability,
219219
fn_decl: &ast::FnDecl,
220220
body: &ast::Expr,

src/items.rs

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,10 @@ pub(crate) struct FnSig<'a> {
165165
decl: &'a ast::FnDecl,
166166
generics: &'a ast::Generics,
167167
ext: ast::Extern,
168-
is_async: Cow<'a, ast::IsAsync>,
169-
constness: ast::Constness,
168+
is_async: Cow<'a, ast::Async>,
169+
constness: ast::Const,
170170
defaultness: ast::Defaultness,
171-
unsafety: ast::Unsafety,
171+
unsafety: ast::Unsafe,
172172
visibility: ast::Visibility,
173173
}
174174

@@ -182,10 +182,10 @@ impl<'a> FnSig<'a> {
182182
decl,
183183
generics,
184184
ext: ast::Extern::None,
185-
is_async: Cow::Owned(ast::IsAsync::NotAsync),
186-
constness: ast::Constness::NotConst,
185+
is_async: Cow::Owned(ast::Async::No),
186+
constness: ast::Const::No,
187187
defaultness: ast::Defaultness::Final,
188-
unsafety: ast::Unsafety::Normal,
188+
unsafety: ast::Unsafe::No,
189189
visibility: vis,
190190
}
191191
}
@@ -196,8 +196,8 @@ impl<'a> FnSig<'a> {
196196
) -> FnSig<'a> {
197197
FnSig {
198198
unsafety: method_sig.header.unsafety,
199-
is_async: Cow::Borrowed(&method_sig.header.asyncness.node),
200-
constness: method_sig.header.constness.node,
199+
is_async: Cow::Borrowed(&method_sig.header.asyncness),
200+
constness: method_sig.header.constness,
201201
defaultness: ast::Defaultness::Final,
202202
ext: method_sig.header.ext,
203203
decl: &*method_sig.decl,
@@ -224,8 +224,8 @@ impl<'a> FnSig<'a> {
224224
decl,
225225
generics,
226226
ext: fn_sig.header.ext,
227-
constness: fn_sig.header.constness.node,
228-
is_async: Cow::Borrowed(&fn_sig.header.asyncness.node),
227+
constness: fn_sig.header.constness,
228+
is_async: Cow::Borrowed(&fn_sig.header.asyncness),
229229
defaultness,
230230
unsafety: fn_sig.header.unsafety,
231231
visibility: vis.clone(),
@@ -1908,11 +1908,11 @@ pub(crate) fn rewrite_associated_impl_type(
19081908
}
19091909
}
19101910

1911-
impl Rewrite for ast::FunctionRetTy {
1911+
impl Rewrite for ast::FnRetTy {
19121912
fn rewrite(&self, context: &RewriteContext<'_>, shape: Shape) -> Option<String> {
19131913
match *self {
1914-
ast::FunctionRetTy::Default(_) => Some(String::new()),
1915-
ast::FunctionRetTy::Ty(ref ty) => {
1914+
ast::FnRetTy::Default(_) => Some(String::new()),
1915+
ast::FnRetTy::Ty(ref ty) => {
19161916
if context.config.version() == Version::One
19171917
|| context.config.indent_style() == IndentStyle::Visual
19181918
{
@@ -2290,7 +2290,7 @@ fn rewrite_fn_base(
22902290
}
22912291

22922292
// Return type.
2293-
if let ast::FunctionRetTy::Ty(..) = fd.output {
2293+
if let ast::FnRetTy::Ty(..) = fd.output {
22942294
let ret_should_indent = match context.config.indent_style() {
22952295
// If our params are block layout then we surely must have space.
22962296
IndentStyle::Block if put_params_in_block || fd.inputs.is_empty() => false,
@@ -2396,8 +2396,8 @@ fn rewrite_fn_base(
23962396
}
23972397

23982398
let pos_before_where = match fd.output {
2399-
ast::FunctionRetTy::Default(..) => params_span.hi(),
2400-
ast::FunctionRetTy::Ty(ref ty) => ty.span.hi(),
2399+
ast::FnRetTy::Default(..) => params_span.hi(),
2400+
ast::FnRetTy::Ty(ref ty) => ty.span.hi(),
24012401
};
24022402

24032403
let is_params_multi_lined = param_str.contains('\n');
@@ -2425,7 +2425,7 @@ fn rewrite_fn_base(
24252425
// If there are neither where-clause nor return type, we may be missing comments between
24262426
// params and `{`.
24272427
if where_clause_str.is_empty() {
2428-
if let ast::FunctionRetTy::Default(ret_span) = fd.output {
2428+
if let ast::FnRetTy::Default(ret_span) = fd.output {
24292429
match recover_missing_comment_in_span(
24302430
mk_sp(params_span.hi(), ret_span.hi()),
24312431
shape,

src/modules.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ struct Directory {
3535
}
3636

3737
impl<'a> Directory {
38-
fn to_syntax_directory(&'a self) -> rustc_parse::Directory<'a> {
38+
fn to_syntax_directory(&'a self) -> rustc_parse::Directory {
3939
rustc_parse::Directory {
40-
path: Cow::Borrowed(&self.path),
40+
path: self.path.clone(),
4141
ownership: self.ownership.clone(),
4242
}
4343
}

src/modules/visitor.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ pub(crate) struct ModItem {
1515
pub(crate) struct CfgIfVisitor<'a> {
1616
parse_sess: &'a ParseSess,
1717
mods: Vec<ModItem>,
18-
base_dir: Directory<'a>,
18+
base_dir: Directory,
1919
}
2020

2121
impl<'a> CfgIfVisitor<'a> {
22-
pub(crate) fn new(parse_sess: &'a ParseSess, base_dir: Directory<'a>) -> CfgIfVisitor<'a> {
22+
pub(crate) fn new(parse_sess: &'a ParseSess, base_dir: Directory) -> CfgIfVisitor<'a> {
2323
CfgIfVisitor {
2424
mods: vec![],
2525
parse_sess,

src/spanned.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,11 +151,11 @@ impl Spanned for ast::WherePredicate {
151151
}
152152
}
153153

154-
impl Spanned for ast::FunctionRetTy {
154+
impl Spanned for ast::FnRetTy {
155155
fn span(&self) -> Span {
156156
match *self {
157-
ast::FunctionRetTy::Default(span) => span,
158-
ast::FunctionRetTy::Ty(ref ty) => ty.span,
157+
ast::FnRetTy::Default(span) => span,
158+
ast::FnRetTy::Ty(ref ty) => ty.span,
159159
}
160160
}
161161
}

src/types.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use std::iter::ExactSizeIterator;
22
use std::ops::Deref;
33

44
use rustc_span::{symbol::kw, BytePos, Span};
5-
use syntax::ast::{self, FunctionRetTy, Mutability};
5+
use syntax::ast::{self, FnRetTy, Mutability};
66

77
use crate::config::lists::*;
88
use crate::config::{IndentStyle, TypeDensity, Version};
@@ -292,7 +292,7 @@ fn rewrite_segment(
292292

293293
fn format_function_type<'a, I>(
294294
inputs: I,
295-
output: &FunctionRetTy,
295+
output: &FnRetTy,
296296
variadic: bool,
297297
span: Span,
298298
context: &RewriteContext<'_>,
@@ -311,11 +311,11 @@ where
311311
IndentStyle::Visual => shape.block_left(4)?,
312312
};
313313
let output = match *output {
314-
FunctionRetTy::Ty(ref ty) => {
314+
FnRetTy::Ty(ref ty) => {
315315
let type_str = ty.rewrite(context, ty_shape)?;
316316
format!(" -> {}", type_str)
317317
}
318-
FunctionRetTy::Default(..) => String::new(),
318+
FnRetTy::Default(..) => String::new(),
319319
};
320320

321321
let list_shape = if context.use_block_indent() {

src/utils.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -86,18 +86,18 @@ pub(crate) fn format_visibility(
8686
}
8787

8888
#[inline]
89-
pub(crate) fn format_async(is_async: &ast::IsAsync) -> &'static str {
89+
pub(crate) fn format_async(is_async: &ast::Async) -> &'static str {
9090
match is_async {
91-
ast::IsAsync::Async { .. } => "async ",
92-
ast::IsAsync::NotAsync => "",
91+
ast::Async::Yes { .. } => "async ",
92+
ast::Async::No => "",
9393
}
9494
}
9595

9696
#[inline]
97-
pub(crate) fn format_constness(constness: ast::Constness) -> &'static str {
97+
pub(crate) fn format_constness(constness: ast::Const) -> &'static str {
9898
match constness {
99-
ast::Constness::Const => "const ",
100-
ast::Constness::NotConst => "",
99+
ast::Const::Yes(..) => "const ",
100+
ast::Const::No => "",
101101
}
102102
}
103103

@@ -110,10 +110,10 @@ pub(crate) fn format_defaultness(defaultness: ast::Defaultness) -> &'static str
110110
}
111111

112112
#[inline]
113-
pub(crate) fn format_unsafety(unsafety: ast::Unsafety) -> &'static str {
113+
pub(crate) fn format_unsafety(unsafety: ast::Unsafe) -> &'static str {
114114
match unsafety {
115-
ast::Unsafety::Unsafe => "unsafe ",
116-
ast::Unsafety::Normal => "",
115+
ast::Unsafe::Yes(..) => "unsafe ",
116+
ast::Unsafe::No => "",
117117
}
118118
}
119119

0 commit comments

Comments
 (0)