Closed
Description
It'd be cool if in this situation rust-analyzer realized that that what we want here is not a function, but a new error variant.
Looking at how generate function works should help with implementing this assist:
Note that generate function grew quite complex over time, for learning purposes, you might want to check some of its earlier versions