update overflow handling for norm, add test
This commit is contained in:
parent
28e5c9505c
commit
442e112d17
3 changed files with 24 additions and 2 deletions
|
@ -310,7 +310,7 @@ impl<'tcx> EvalCtxt<'_, 'tcx> {
|
|||
depth: usize,
|
||||
ty: Ty<'tcx>,
|
||||
) -> Option<Ty<'tcx>> {
|
||||
if depth >= self.local_overflow_limit() {
|
||||
if !self.tcx().recursion_limit().value_within_limit(depth) {
|
||||
return None;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue