Skip to content

Commit eb165d0

Browse files
committedApr 21, 2025
Auto merge of #140112 - jieyouxu:rollup-srw76oc, r=jieyouxu
Rollup of 12 pull requests Successful merges: - #134213 (Stabilize `naked_functions`) - #139795 (Clarify why SGX code specifies linkage/symbol names for certain statics) - #139981 (Don't compute name of associated item if it's an RPITIT) - #140036 (Advent of `tests/ui` (misc cleanups and improvements) [4/N]) - #140047 (remove a couple clones) - #140052 (Fix error when an intra doc link is trying to resolve an empty associated item) - #140074 (rustdoc-json: Improve test for auto-trait impls) - #140076 (jsondocck: Require command is at start of line) - #140077 (Construct OutputType using macro and print [=FILENAME] help info) - #140081 (Update `libc` to 0.2.172) - #140091 (build_helper: try to rename dir before delete) - #140107 (rustc-dev-guide subtree update) r? `@ghost` `@rustbot` modify labels: rollup
2 parents c8f9423 + 043ee6f commit eb165d0

File tree

99 files changed

+656
-484
lines changed

Some content is hidden

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

99 files changed

+656
-484
lines changed
 

‎Cargo.lock

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,7 @@ dependencies = [
332332
name = "build_helper"
333333
version = "0.1.0"
334334
dependencies = [
335+
"fastrand",
335336
"serde",
336337
"serde_derive",
337338
]

‎compiler/rustc_builtin_macros/src/autodiff.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -596,15 +596,14 @@ mod llvm_enzyme {
596596
}
597597
};
598598
let arg = ty.kind.is_simple_path().unwrap();
599-
let sl: Vec<Symbol> = vec![arg, kw::Default];
600-
let tmp = ecx.def_site_path(&sl);
599+
let tmp = ecx.def_site_path(&[arg, kw::Default]);
601600
let default_call_expr = ecx.expr_path(ecx.path(span, tmp));
602601
let default_call_expr = ecx.expr_call(new_decl_span, default_call_expr, thin_vec![]);
603602
body.stmts.push(ecx.stmt_expr(default_call_expr));
604603
return body;
605604
}
606605

607-
let mut exprs: P<ast::Expr> = primal_call.clone();
606+
let mut exprs: P<ast::Expr> = primal_call;
608607
let d_ret_ty = match d_sig.decl.output {
609608
FnRetTy::Ty(ref ty) => ty.clone(),
610609
FnRetTy::Default(span) => {
@@ -622,7 +621,7 @@ mod llvm_enzyme {
622621
// type due to the Const return activity.
623622
exprs = ecx.expr_call(new_decl_span, bb_call_expr, thin_vec![exprs]);
624623
} else {
625-
let q = QSelf { ty: d_ret_ty.clone(), path_span: span, position: 0 };
624+
let q = QSelf { ty: d_ret_ty, path_span: span, position: 0 };
626625
let y =
627626
ExprKind::Path(Some(P(q)), ecx.path_ident(span, Ident::from_str("default")));
628627
let default_call_expr = ecx.expr(span, y);
@@ -640,8 +639,7 @@ mod llvm_enzyme {
640639
let mut exprs2 = thin_vec![exprs];
641640
for arg in args.iter().skip(1) {
642641
let arg = arg.kind.is_simple_path().unwrap();
643-
let sl: Vec<Symbol> = vec![arg, kw::Default];
644-
let tmp = ecx.def_site_path(&sl);
642+
let tmp = ecx.def_site_path(&[arg, kw::Default]);
645643
let default_call_expr = ecx.expr_path(ecx.path(span, tmp));
646644
let default_call_expr =
647645
ecx.expr_call(new_decl_span, default_call_expr, thin_vec![]);

0 commit comments

Comments
 (0)