3 ms·
Not sure rustc can do a lot about this case but maybe a static analysis tool can complement it.
by pdimitar 4y ago
Not sure rustc can do a lot about this case but maybe a static analysis tool can complement it.
- richardwhiuk 4y agoTo some extent, all compilers are static analysis tools. I think clippy could be enhanced to spot this.
- pdimitar 4y agoYep, it likely could. Spotting something that usually is an error now being wrapped in `Pin<Box<...>>` would hopefully be not too hard.
- loeg 4y agoIf 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.