-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Open
Labels
Description
Description of the bug:
- impl lookup does deduction on its generic parameters
- deduction does impl lookup which can find another impl decl
- which will do deduction on its generic parameters...
This is all done synchronously so it should be possible to construct programs that exhaust stack space and crash the compiler.
Consider making impl lookup return a Future instead of a result, and you have to Poll the Future repeatedly until it gives a result. The Future would hold a worklist, and it could stop and return NotReady if it ever re-enters impl lookup (or maybe if it gets to the eval step twice?), preventing the stack growth.
See discord discussion: https://discord.com/channels/655572317891461132/655578254970716160/1414743730258182155