Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Suggest renaming import if names clash #45660
The output for the example in the issue looks like this:
This is my first PR that touches the compiler in any way, so if there's something else I need to do here (e.g. add a test), please let me know :).
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @pnkfelix (or someone else) soon.
If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.
Please see the contribution instructions for more information.
Looks great! Could you add a test for it? Just create an
…tebank Suggest renaming import if names clash Closes rust-lang#32354. The output for the example in the issue looks like this: ``` ~/p/local-rust-dev-testing ❯❯❯ cargo +local-s1 build Compiling local-rust-dev-testing v0.1.0 (file:///home/cldfire/programming_projects/local-rust-dev-testing) error[E0252]: the name `ConstructorExtension` is defined multiple times --> src/main.rs:49:5 | 48 | use extension1::ConstructorExtension; | -------------------------------- previous import of the trait `ConstructorExtension` here 49 | use extension2::ConstructorExtension; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `ConstructorExtension` reimported here | = note: `ConstructorExtension` must be defined only once in the type namespace of this module help: You can use `as` to change the binding name of the import | 49 | use extension2::ConstructorExtension as OtherConstructorExtension; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ... ``` This is my first PR that touches the compiler in any way, so if there's something else I need to do here (e.g. add a test), please let me know :).