give a more informative failure in this case
This commit is contained in:
parent
632f9c4d6e
commit
7b2aeca10a
1 changed files with 8 additions and 1 deletions
|
|
@ -51,7 +51,14 @@ impl<'cx, 'gcx, 'tcx> InferCtxt<'cx, 'gcx, 'tcx> {
|
|||
let mut selcx =
|
||||
SelectionContext::with_query_mode(&self, TraitQueryMode::Standard);
|
||||
selcx.evaluate_obligation_recursively(obligation)
|
||||
.expect("Overflow should be caught earlier in standard query mode")
|
||||
.unwrap_or_else(|r| {
|
||||
span_bug!(
|
||||
obligation.cause.span,
|
||||
"Overflow should be caught earlier in standard query mode: {:?}, {:?}",
|
||||
obligation,
|
||||
r,
|
||||
)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue