Closed
Description
You can bring in multiple traits of the same name if you rename them.
Example use case (playground code)
use extension1::ConstructorExtension;
use extension2::ConstructorExtension;
current error:
<anon>:49:5: 49:37 error: a trait named `ConstructorExtension` has already been imported in this module [E0252]
<anon>:49 use extension2::ConstructorExtension;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<anon>:49:5: 49:37 help: see the detailed explanation for E0252
<anon>:48:5: 48:37 note: previous import of `ConstructorExtension` here
<anon>:48 use extension1::ConstructorExtension;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Suggested note: "You can rename an imported name with as
".
Metadata
Metadata
Assignees
Labels
Area: Messages for errors, warnings, and lintsCategory: An issue proposing an enhancement or a PR with one.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Working group: Diagnostics