ICE on RawPtrComparison check
This commit is contained in:
parent
71e162e6ca
commit
4b7a348508
1 changed files with 4 additions and 4 deletions
|
@ -23,8 +23,8 @@ use rustc_trait_selection::traits::SelectionContext;
|
||||||
|
|
||||||
use super::ConstCx;
|
use super::ConstCx;
|
||||||
use crate::errors::{
|
use crate::errors::{
|
||||||
MutDerefErr, NonConstOpErr, PanicNonStrErr, RawPtrComparisonErr, RawPtrToIntErr,
|
MutDerefErr, NonConstOpErr, PanicNonStrErr, RawPtrToIntErr, StaticAccessErr,
|
||||||
StaticAccessErr, TransientMutBorrowErr, TransientMutBorrowErrRaw,
|
TransientMutBorrowErr, TransientMutBorrowErrRaw,
|
||||||
};
|
};
|
||||||
use crate::util::{call_kind, CallDesugaringKind, CallKind};
|
use crate::util::{call_kind, CallDesugaringKind, CallKind};
|
||||||
|
|
||||||
|
@ -654,10 +654,10 @@ pub struct RawPtrComparison;
|
||||||
impl<'tcx> NonConstOp<'tcx> for RawPtrComparison {
|
impl<'tcx> NonConstOp<'tcx> for RawPtrComparison {
|
||||||
fn build_error(
|
fn build_error(
|
||||||
&self,
|
&self,
|
||||||
ccx: &ConstCx<'_, 'tcx>,
|
_: &ConstCx<'_, 'tcx>,
|
||||||
span: Span,
|
span: Span,
|
||||||
) -> DiagnosticBuilder<'tcx, ErrorGuaranteed> {
|
) -> DiagnosticBuilder<'tcx, ErrorGuaranteed> {
|
||||||
ccx.tcx.sess.create_err(RawPtrComparisonErr { span })
|
span_bug!(span, "raw ptr comparison should already be caught in the trait system");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue