Hello, I recently discussed on the subreddit[1], why is it not possible to have an use statement inside of the impl block, which would be extremely handy, mainly in enumeration implementations.
For clearance, effect of the use statement would be inside of the implementation block, same as is with the mod block, so imported names would be visible in all methods defined in the implementation block, without contaminating whole module, in which the enumeration is defined:
My apologies, just found out there was an RFC which tried to deal with this, but was ultimately rejected, because of deeper internal problems. There is nice explenation in the subreddit.
Yes, I am aware, but it would be cool, if you would not had to copy&paste that use statement into all methods defined inside the impl, but rather define single use at the top of impl. Other solution would be putting it into the module, where the impl block is defined, but that would contaminate the whole block with that.