Hacker News new | past | comments | ask | show | jobs | submit login

Not sure rustc can do a lot about this case but maybe a static analysis tool can complement it.



To some extent, all compilers are static analysis tools.

I think clippy could be enhanced to spot this.


Yep, it likely could. Spotting something that usually is an error now being wrapped in `Pin<Box<...>>` would hopefully be not too hard.


If it can detect the recursion in the non-dyn return case, it seems like it ought to be able to do the same once dyn is added.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: