Repository: intellij-rust/intellij-rust
Issue: Implement members generates invalid generics

<!--
Hello and thank you for the issue!
If you would like to report a bug, we have added some points below that you can fill out.
Feel free to remove all the irrelevant text to request a new feature.
-->

## Environment

* **IntelliJ Rust plugin version:** 0.4.171.4630-221-nightly
* **Rust toolchain version:** 1.61.0 (fe5b13d68 2022-05-18) x86_64-pc-windows-msvc
* **IDE name and version:** IntelliJ IDEA 2022.1.1 Community Edition (IC-221.5591.52)
* **Operating system:** Windows 10 10.0
* **Macro expansion engine:** new
* **Name resolution engine:** new
* **Additional experimental features:** org.rust.cargo.emulate.terminal, org.rust.cargo.evaluate.build.scripts, org.rust.macros.proc

## Problem description:
Invalid (generated):
`e<F: A<crate::B=G>>()`
Valid:
`e<F: A<B=G>>()`


## Steps to reproduce
```rust
trait A {
    type B;
}

trait C<D> {
    fn e<F: A<B = D>>();
}

struct G;

struct H;

impl C<G> for H {
}
```
`Implement members` on `impl C<G> for H`

<!--
Please include as much of your codebase as needed to reproduce the error.
If the relevant files are large, please provide a link to a public repository or a [Gist](https://gist.github.com/).
-->

Changed files:
src/test/kotlin/org/rust/ide/refactoring/implementMembers/ImplementMembersHandlerTest.kt
src/main/kotlin/org/rust/ide/presentation/RsPsiRenderer.kt

diff --git a/src/main/kotlin/org/rust/ide/presentation/RsPsiRenderer.kt b/src/main/kotlin/org/rust/ide/presentation/RsPsiRenderer.kt
index 34c30206c..17e285b45 100644
--- a/src/main/kotlin/org/rust/ide/presentation/RsPsiRenderer.kt
+++ b/src/main/kotlin/org/rust/ide/presentation/RsPsiRenderer.kt
@@ -737,6 +737,7 @@ class ImportingPsiRenderer(
     override fun appendPathWithoutArgs(sb: StringBuilder, path: RsPath) {
         val pathReferenceName = path.referenceName
         val tryImportPath1 = path.parent !is RsPath &&
+            path.parent !is RsAssocTypeBinding &&
             TyPrimitive.fromPath(path) == null &&
             path.basePath().referenceName != "Self" &&
             path.basePath().typeQual == null
diff --git a/src/test/kotlin/org/rust/ide/refactoring/implementMembers/ImplementMembersHandlerTest.kt b/src/test/kotlin/org/rust/ide/refactoring/implementMembers/ImplementMembersHandlerTest.kt
index 5a16d24cd..619a6cfb7 100644
--- a/src/test/kotlin/org/rust/ide/refactoring/implementMembers/ImplementMembersHandlerTest.kt
+++ b/src/test/kotlin/org/rust/ide/refactoring/implementMembers/ImplementMembersHandlerTest.kt
@@ -1157,6 +1157,40 @@ class ImplementMembersHandlerTest : RsTestBase() {
         }
     """)
 
+    fun `test implement assoc type binding`() = doTest("""
+        trait A {
+            type B;
+        }
+
+        trait C<D> {
+            fn e<F: A<B=D>>();
+        }
+
+        struct G;
+        struct H;
+
+        impl C<G> for H {/*caret*/}
+    """, listOf(
+        ImplementMemberSelection("e<F: A<B=D>>()", true)
+    ), """
+        trait A {
+            type B;
+        }
+
+        trait C<D> {
+            fn e<F: A<B=D>>();
+        }
+
+        struct G;
+        struct H;
+
+        impl C<G> for H {
+            fn e<F: A<B=G>>() {
+                todo!()
+            }
+        }
+    """)
+
     fun `test do not implement methods already present`() = doTest("""
         trait T {
             fn f1();