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.

2 Likes

There's an issue about this in the RFCs repo that's been getting some attention in the last couple of days: use some::Trait as _; · Issue #1311 · rust-lang/rfcs · GitHub

1 Like

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