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:
parent
25ec827385
commit
0950d5afe2
10 changed files with 82 additions and 18 deletions
|
@ -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,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue