Avoid exponential behaviour when relating types

This commit is contained in:
Matthew Jasper 2020-02-02 11:54:11 +00:00
parent 13db6501c7
commit a606ffdb17
3 changed files with 42 additions and 2 deletions

View file

@ -0,0 +1,23 @@
// Check that this can be compiled in a reasonable time.
// build-pass
fn main() {
// 96 nested closures
let x = ();
|| || || || || || || ||
|| || || || || || || ||
|| || || || || || || ||
|| || || || || || || ||
|| || || || || || || ||
|| || || || || || || ||
|| || || || || || || ||
|| || || || || || || ||
|| || || || || || || ||
|| || || || || || || ||
|| || || || || || || ||
|| || || || || || || ||
[&(), &x];
}