aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_assists/src/handlers
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ide_assists/src/handlers')
-rw-r--r--crates/ide_assists/src/handlers/generate_impl.rs17
1 files changed, 14 insertions, 3 deletions
diff --git a/crates/ide_assists/src/handlers/generate_impl.rs b/crates/ide_assists/src/handlers/generate_impl.rs
index a8e3c4fc2..fd2e250bc 100644
--- a/crates/ide_assists/src/handlers/generate_impl.rs
+++ b/crates/ide_assists/src/handlers/generate_impl.rs
@@ -72,6 +72,17 @@ mod tests {
72 check_assist( 72 check_assist(
73 generate_impl, 73 generate_impl,
74 r#" 74 r#"
75 struct MyOwnArray<T, const S: usize> {}$0"#,
76 r#"
77 struct MyOwnArray<T, const S: usize> {}
78
79 impl<T, const S: usize> MyOwnArray<T, S> {
80 $0
81 }"#,
82 );
83 check_assist(
84 generate_impl,
85 r#"
75 #[cfg(feature = "foo")] 86 #[cfg(feature = "foo")]
76 struct Foo<'a, T: Foo<'a>> {$0}"#, 87 struct Foo<'a, T: Foo<'a>> {$0}"#,
77 r#" 88 r#"
@@ -114,11 +125,11 @@ mod tests {
114 check_assist( 125 check_assist(
115 generate_impl, 126 generate_impl,
116 r#" 127 r#"
117 struct Defaulted<'a, 'b: 'a, T: Debug + Clone + 'a + 'b = String> {}$0"#, 128 struct Defaulted<'a, 'b: 'a, T: Debug + Clone + 'a + 'b = String, const S: usize> {}$0"#,
118 r#" 129 r#"
119 struct Defaulted<'a, 'b: 'a, T: Debug + Clone + 'a + 'b = String> {} 130 struct Defaulted<'a, 'b: 'a, T: Debug + Clone + 'a + 'b = String, const S: usize> {}
120 131
121 impl<'a, 'b: 'a, T: Debug + Clone + 'a + 'b> Defaulted<'a, 'b, T> { 132 impl<'a, 'b: 'a, T: Debug + Clone + 'a + 'b, const S: usize> Defaulted<'a, 'b, T, S> {
122 $0 133 $0
123 }"#, 134 }"#,
124 ); 135 );