Avoid exponential behaviour when relating types
This commit is contained in:
parent
13db6501c7
commit
a606ffdb17
3 changed files with 42 additions and 2 deletions
23
src/test/ui/closures/deeply-nested_closures.rs
Normal file
23
src/test/ui/closures/deeply-nested_closures.rs
Normal 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];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue