Allowing `use foo::SomeTrait as _`?


Would it be possible to allow this syntax: use foo::SomeTrait as _ for traits that you don’t want to use by name, but still want to bring into scope? It’s not a big pain point or anything, but I find myself doing things like use std::error::Error as StdError even when I don’t necessarily end up using the StdError name at all. Seems like it might be convenient for bringing methods into scope without polluting the namespace unnecessarily.

Is there any reason to import traits into a module namespace for statically dispatches instead of just apply the traits?

There’s an issue about this in the RFCs repo that’s been getting some attention in the last couple of days:


gah, that’ll teach me to post here before searching. Thanks!