1
Fork 0

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
This commit is contained in:
bors 2023-04-19 13:03:40 +00:00
commit 3a5c8e91f0
180 changed files with 1462 additions and 1955 deletions

View file

@ -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 })
}
}