Rollup merge of #119898 - compiler-errors:error-reporting, r=oli-obk

Remove unused `ErrorReporting` variant from overflow handling

r? oli-obk
This commit is contained in:
Matthias Krüger 2024-01-13 15:10:30 +01:00 committed by GitHub
commit 1037e75d8d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 3 additions and 16 deletions

View file

@ -611,9 +611,6 @@ pub enum SelectionError<'tcx> {
NotConstEvaluatable(NotConstEvaluatable),
/// Exceeded the recursion depth during type projection.
Overflow(OverflowError),
/// Signaling that an error has already been emitted, to avoid
/// multiple errors being shown.
ErrorReporting,
/// Computing an opaque type's hidden type caused an error (e.g. a cycle error).
/// We can thus not know whether the hidden type implements an auto trait, so
/// we should not presume anything about it.

View file

@ -302,7 +302,6 @@ impl EvaluationResult {
pub enum OverflowError {
Error(ErrorGuaranteed),
Canonical,
ErrorReporting,
}
impl From<ErrorGuaranteed> for OverflowError {
@ -318,7 +317,6 @@ impl<'tcx> From<OverflowError> for SelectionError<'tcx> {
match overflow_error {
OverflowError::Error(e) => SelectionError::Overflow(OverflowError::Error(e)),
OverflowError::Canonical => SelectionError::Overflow(OverflowError::Canonical),
OverflowError::ErrorReporting => SelectionError::ErrorReporting,
}
}
}