Skip to content

Commit

Permalink
revive raw pointer comp error
Browse files Browse the repository at this point in the history
  • Loading branch information
fee1-dead committed Apr 16, 2023
1 parent eac922e commit 147e850
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions compiler/rustc_const_eval/src/transform/check_consts/ops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 })
}
}

Expand Down

0 comments on commit 147e850

Please sign in to comment.