Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
pdimitar
on May 5, 2023
|
parent
|
context
|
favorite
| on:
Ask not what the compiler can do for you
Not sure rustc can do a lot about this case but maybe a static analysis tool can complement it.
richardwhiuk
on May 5, 2023
|
next
[–]
To some extent, all compilers are static analysis tools.
I think clippy could be enhanced to spot this.
pdimitar
on May 5, 2023
|
parent
|
next
[–]
Yep, it likely could. Spotting something that usually is an error now being wrapped in `Pin<Box<...>>` would hopefully be not too hard.
loeg
on May 5, 2023
|
prev
[–]
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: