diff options
| author | bors <bors@rust-lang.org> | 2023-04-19 13:03:40 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-04-19 13:03:40 +0000 |
| commit | 3a5c8e91f094bb1cb1346651fe3512f0b603d826 (patch) | |
| tree | 9768f32e150f510ea6fa2dd3552ac91080657ca3 /compiler/rustc_const_eval/src | |
| parent | d7f9e81650dcee3e2d5ad1973a71da644a2eff93 (diff) | |
| parent | 14d1e87db9bf5e9c3dc8cfe7a0558d260b1e5ff2 (diff) | |
| download | rust-3a5c8e91f094bb1cb1346651fe3512f0b603d826.tar.gz rust-3a5c8e91f094bb1cb1346651fe3512f0b603d826.zip | |
Auto merge of #110393 - fee1-dead-contrib:rm-const-traits, r=oli-obk
Rm const traits in libcore See [zulip thread](https://rust-lang.zulipchat.com/#narrow/stream/146212-t-compiler.2Fconst-eval/topic/.60const.20Trait.60.20removal.20or.20rework) * [x] Bless ui tests * [ ] Re constify some unstable functions with workarounds if they are needed
Diffstat (limited to 'compiler/rustc_const_eval/src')
| -rw-r--r-- | compiler/rustc_const_eval/src/transform/check_consts/ops.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/rustc_const_eval/src/transform/check_consts/ops.rs b/compiler/rustc_const_eval/src/transform/check_consts/ops.rs index 4fe842856aa..6c11edb742c 100644 --- a/compiler/rustc_const_eval/src/transform/check_consts/ops.rs +++ b/compiler/rustc_const_eval/src/transform/check_consts/ops.rs @@ -610,10 +610,11 @@ pub struct RawPtrComparison; impl<'tcx> NonConstOp<'tcx> for RawPtrComparison { fn build_error( &self, - _: &ConstCx<'_, 'tcx>, + ccx: &ConstCx<'_, 'tcx>, span: Span, ) -> DiagnosticBuilder<'tcx, ErrorGuaranteed> { - span_bug!(span, "raw ptr comparison should already be caught in the trait system"); + // FIXME(const_trait_impl): revert to span_bug? + ccx.tcx.sess.create_err(errors::RawPtrComparisonErr { span }) } } |
