Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 0756de1

Browse files
committedJan 29, 2025··
Merge remote-tracking branch 'origin' into windows-25-i686-mingw
2 parents 6394069 + 0cc4f4f commit 0756de1

File tree

917 files changed

+14495
-9973
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

917 files changed

+14495
-9973
lines changed
 

‎Cargo.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1859,7 +1859,6 @@ checksum = "62f822373a4fe84d4bb149bf54e584a7f4abec90e072ed49cda0edea5b95471f"
18591859
dependencies = [
18601860
"equivalent",
18611861
"hashbrown 0.15.2",
1862-
"rustc-rayon",
18631862
"serde",
18641863
]
18651864

@@ -3240,11 +3239,12 @@ dependencies = [
32403239

32413240
[[package]]
32423241
name = "rustc-rayon"
3243-
version = "0.5.0"
3242+
version = "0.5.1"
32443243
source = "registry+https://github.com/rust-lang/crates.io-index"
3245-
checksum = "eb81aadc8837ca6ecebe0fe1353f15df83b3b3cc2cf7a8afd571bc22aa121710"
3244+
checksum = "2cd9fb077db982d7ceb42a90471e5a69a990b58f71e06f0d8340bb2cf35eb751"
32463245
dependencies = [
32473246
"either",
3247+
"indexmap",
32483248
"rustc-rayon-core",
32493249
]
32503250

‎compiler/rustc_ast/src/mut_visit.rs

Lines changed: 14 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -954,8 +954,14 @@ fn walk_coroutine_kind<T: MutVisitor>(vis: &mut T, coroutine_kind: &mut Coroutin
954954

955955
fn walk_fn<T: MutVisitor>(vis: &mut T, kind: FnKind<'_>) {
956956
match kind {
957-
FnKind::Fn(_ctxt, _ident, FnSig { header, decl, span }, _visibility, generics, body) => {
957+
FnKind::Fn(
958+
_ctxt,
959+
_ident,
960+
_vis,
961+
Fn { defaultness, generics, body, sig: FnSig { header, decl, span } },
962+
) => {
958963
// Identifier and visibility are visited as a part of the item.
964+
visit_defaultness(vis, defaultness);
959965
vis.visit_fn_header(header);
960966
vis.visit_generics(generics);
961967
vis.visit_fn_decl(decl);
@@ -1205,13 +1211,8 @@ impl WalkItemKind for ItemKind {
12051211
ItemKind::Const(item) => {
12061212
visit_const_item(item, vis);
12071213
}
1208-
ItemKind::Fn(box Fn { defaultness, generics, sig, body }) => {
1209-
visit_defaultness(vis, defaultness);
1210-
vis.visit_fn(
1211-
FnKind::Fn(FnCtxt::Free, ident, sig, visibility, generics, body),
1212-
span,
1213-
id,
1214-
);
1214+
ItemKind::Fn(func) => {
1215+
vis.visit_fn(FnKind::Fn(FnCtxt::Free, ident, visibility, &mut *func), span, id);
12151216
}
12161217
ItemKind::Mod(safety, mod_kind) => {
12171218
visit_safety(vis, safety);
@@ -1329,10 +1330,9 @@ impl WalkItemKind for AssocItemKind {
13291330
AssocItemKind::Const(item) => {
13301331
visit_const_item(item, visitor);
13311332
}
1332-
AssocItemKind::Fn(box Fn { defaultness, generics, sig, body }) => {
1333-
visit_defaultness(visitor, defaultness);
1333+
AssocItemKind::Fn(func) => {
13341334
visitor.visit_fn(
1335-
FnKind::Fn(FnCtxt::Assoc(ctxt), ident, sig, visibility, generics, body),
1335+
FnKind::Fn(FnCtxt::Assoc(ctxt), ident, visibility, &mut *func),
13361336
span,
13371337
id,
13381338
);
@@ -1476,10 +1476,9 @@ impl WalkItemKind for ForeignItemKind {
14761476
visitor.visit_ty(ty);
14771477
visit_opt(expr, |expr| visitor.visit_expr(expr));
14781478
}
1479-
ForeignItemKind::Fn(box Fn { defaultness, generics, sig, body }) => {
1480-
visit_defaultness(visitor, defaultness);
1479+
ForeignItemKind::Fn(func) => {
14811480
visitor.visit_fn(
1482-
FnKind::Fn(FnCtxt::Foreign, ident, sig, visibility, generics, body),
1481+
FnKind::Fn(FnCtxt::Foreign, ident, visibility, &mut *func),
14831482
span,
14841483
id,
14851484
);
@@ -1965,14 +1964,7 @@ impl<N: DummyAstNode, T: DummyAstNode> DummyAstNode for crate::ast_traits::AstNo
19651964
#[derive(Debug)]
19661965
pub enum FnKind<'a> {
19671966
/// E.g., `fn foo()`, `fn foo(&self)`, or `extern "Abi" fn foo()`.
1968-
Fn(
1969-
FnCtxt,
1970-
&'a mut Ident,
1971-
&'a mut FnSig,
1972-
&'a mut Visibility,
1973-
&'a mut Generics,
1974-
&'a mut Option<P<Block>>,
1975-
),
1967+
Fn(FnCtxt, &'a mut Ident, &'a mut Visibility, &'a mut Fn),
19761968

19771969
/// E.g., `|x, y| body`.
19781970
Closure(

0 commit comments

Comments
 (0)
Please sign in to comment.