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 d3e71fd

Browse files
committedDec 24, 2024
Auto merge of #134716 - Zalathar:rollup-1h4q8cc, r=Zalathar
Rollup of 5 pull requests Successful merges: - #134638 (Fix effect predicates from item bounds in old solver) - #134662 (Fix safety docs for `dyn Any + Send {+ Sync}`) - #134689 (core: fix const ptr::swap_nonoverlapping when there are pointers at odd offsets) - #134699 (Belay new reviews for workingjubilee) - #134701 (Correctly note item kind in `NonConstFunctionCall` error message) r? `@ghost` `@rustbot` modify labels: rollup
2 parents f334342 + 772b95e commit d3e71fd

File tree

104 files changed

+427
-232
lines changed

Some content is hidden

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

104 files changed

+427
-232
lines changed
 

‎compiler/rustc_const_eval/messages.ftl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ const_eval_non_const_fmt_macro_call =
253253
cannot call non-const formatting macro in {const_eval_const_context}s
254254
255255
const_eval_non_const_fn_call =
256-
cannot call non-const fn `{$def_path_str}` in {const_eval_const_context}s
256+
cannot call non-const {$def_descr} `{$def_path_str}` in {const_eval_const_context}s
257257
258258
const_eval_non_const_impl =
259259
impl defined here, but it is not `const`

‎compiler/rustc_const_eval/src/check_consts/ops.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,7 @@ impl<'tcx> NonConstOp<'tcx> for FnCallNonConst<'tcx> {
304304
}
305305
_ => ccx.dcx().create_err(errors::NonConstFnCall {
306306
span,
307+
def_descr: ccx.tcx.def_descr(callee),
307308
def_path_str: ccx.tcx.def_path_str_with_args(callee, args),
308309
kind: ccx.const_kind(),
309310
}),

0 commit comments

Comments
 (0)
Please sign in to comment.