revive raw pointer comp error

This commit is contained in:
Deadbeef 2023-04-16 09:25:48 +00:00
parent eac922e721
commit 147e850691

View File

@ -610,10 +610,11 @@ fn build_error(
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 })
}
}