1
Fork 0

Issue 89275 fix and test

Issue 89275 fix and test

Fix librustdoc OverflowError usage

rust tidy run

Issue 89275 fix and test
This commit is contained in:
Tom Farmer 2021-10-05 18:53:24 +01:00
parent 25ec827385
commit 0950d5afe2
10 changed files with 82 additions and 18 deletions

View file

@ -261,12 +261,18 @@ impl EvaluationResult {
}
}
/// Indicates that trait evaluation caused overflow.
/// Indicates that trait evaluation caused overflow and in which pass.
#[derive(Copy, Clone, Debug, PartialEq, Eq, HashStable)]
pub struct OverflowError;
pub enum OverflowError {
Cannonical,
ErrorReporting,
}
impl<'tcx> From<OverflowError> for SelectionError<'tcx> {
fn from(OverflowError: OverflowError) -> SelectionError<'tcx> {
SelectionError::Overflow
fn from(overflow_error: OverflowError) -> SelectionError<'tcx> {
match overflow_error {
OverflowError::Cannonical => SelectionError::Overflow,
OverflowError::ErrorReporting => SelectionError::ErrorReporting,
}
}
}