rust/src/test
bors af73e64423 Auto merge of #56722 - Aaron1011:fix/blanket-eval-overflow, r=nikomatsakis
Fix stack overflow when finding blanket impls

Currently, SelectionContext tries to prevent stack overflow by keeping
track of the current recursion depth. However, this depth tracking is
only used when performing normal section (which includes confirmation).
No such tracking is performed for evaluate_obligation_recursively, which
can allow a stack overflow to occur.

To fix this, this commit tracks the current predicate evaluation depth.
This is done separately from the existing obligation depth tracking:
an obligation overflow can occur across multiple calls to 'select' (e.g.
when fulfilling a trait), while a predicate evaluation overflow can only
happen as a result of a deep recursive call stack.

Fixes #56701

I've re-used `tcx.sess.recursion_limit` when checking for predication evaluation overflows. This is such a weird corner case that I don't believe it's necessary to have a separate setting controlling the maximum depth.
2019-01-19 05:05:48 +00:00
..
auxiliary Remove licenses 2018-12-25 21:08:33 -07:00
codegen Remove licenses 2018-12-25 21:08:33 -07:00
codegen-units Remove licenses 2018-12-25 21:08:33 -07:00
compile-fail Stabilize let bindings and destructuring in constants and const fn 2019-01-09 10:20:12 +01:00
compile-fail-fulldeps/auxiliary Removed more copyright notices. 2019-01-13 19:47:02 +00:00
debuginfo Fix repeated word typos 2019-01-03 21:33:37 +01:00
incremental Fix unresolved inference variable ICE. 2018-12-30 14:30:59 +01:00
mir-opt Refactor UserTypeAnnotation. 2018-12-30 14:25:20 +01:00
pretty Remove licenses 2018-12-25 21:08:33 -07:00
run-fail Remove licenses 2018-12-25 21:08:33 -07:00
run-fail-fulldeps Remove licenses 2018-12-25 21:08:33 -07:00
run-make Remove licenses 2018-12-25 21:08:33 -07:00
run-make-fulldeps remove extern_in_paths. 2019-01-13 14:18:00 +01:00
run-pass Auto merge of #56722 - Aaron1011:fix/blanket-eval-overflow, r=nikomatsakis 2019-01-19 05:05:48 +00:00
run-pass-fulldeps Get rid of Block::recovered 2018-12-27 15:51:36 +03:00
run-pass-valgrind Remove licenses 2018-12-25 21:08:33 -07:00
rustdoc Auto merge of #56722 - Aaron1011:fix/blanket-eval-overflow, r=nikomatsakis 2019-01-19 05:05:48 +00:00
rustdoc-js Remove licenses 2018-12-25 21:08:33 -07:00
rustdoc-ui Bless test. 2019-01-17 17:49:29 -05:00
rustfix tests: Do not use -Z parse-only, continue compilation to test recovery 2019-01-06 22:20:46 +03:00
ui Auto merge of #56722 - Aaron1011:fix/blanket-eval-overflow, r=nikomatsakis 2019-01-19 05:05:48 +00:00
ui-fulldeps Store Ident rather than just Name in HIR types Item and ForeignItem. 2018-12-26 21:26:37 +00:00
COMPILER_TESTS.md rustc-guide has moved 2018-11-26 15:03:13 -06:00