diff options
| author | bors <bors@rust-lang.org> | 2024-12-24 03:33:09 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-12-24 03:33:09 +0000 |
| commit | d3e71fd2d3cf68addac558a807c9ba83f6217a64 (patch) | |
| tree | 371816eeebc7bd1535b418d550fa23180422cbc4 /compiler/rustc_const_eval/src | |
| parent | f3343420c813a3dad6746e274137ba51bf97f063 (diff) | |
| parent | 772b95e7554194dfbb04aaee65fcd983d0b84221 (diff) | |
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
Diffstat (limited to 'compiler/rustc_const_eval/src')
| -rw-r--r-- | compiler/rustc_const_eval/src/check_consts/ops.rs | 1 | ||||
| -rw-r--r-- | compiler/rustc_const_eval/src/errors.rs | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_const_eval/src/check_consts/ops.rs b/compiler/rustc_const_eval/src/check_consts/ops.rs index afb7900c4b0..ebd680ac28a 100644 --- a/compiler/rustc_const_eval/src/check_consts/ops.rs +++ b/compiler/rustc_const_eval/src/check_consts/ops.rs @@ -304,6 +304,7 @@ impl<'tcx> NonConstOp<'tcx> for FnCallNonConst<'tcx> { } _ => ccx.dcx().create_err(errors::NonConstFnCall { span, + def_descr: ccx.tcx.def_descr(callee), def_path_str: ccx.tcx.def_path_str_with_args(callee, args), kind: ccx.const_kind(), }), diff --git a/compiler/rustc_const_eval/src/errors.rs b/compiler/rustc_const_eval/src/errors.rs index 80236ee05b7..57534540019 100644 --- a/compiler/rustc_const_eval/src/errors.rs +++ b/compiler/rustc_const_eval/src/errors.rs @@ -192,6 +192,7 @@ pub(crate) struct NonConstFnCall { #[primary_span] pub span: Span, pub def_path_str: String, + pub def_descr: &'static str, pub kind: ConstContext, } |
