File tree Expand file tree Collapse file tree 1 file changed +45
-0
lines changed
crates/ide-completion/src/completions Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Original file line number Diff line number Diff line change @@ -150,6 +150,51 @@ fn foo(a: A) { a.$0 }
150
150
) ;
151
151
}
152
152
153
+ #[ test]
154
+ fn for_in_impl ( ) {
155
+ check_edit (
156
+ "for" ,
157
+ r#"
158
+ struct X;
159
+ impl X $0 {}
160
+ "# ,
161
+ r#"
162
+ struct X;
163
+ impl X for $0 {}
164
+ "# ,
165
+ ) ;
166
+ check_edit (
167
+ "for" ,
168
+ r#"
169
+ fn foo() {
170
+ struct X;
171
+ impl X $0 {}
172
+ }
173
+ "# ,
174
+ r#"
175
+ fn foo() {
176
+ struct X;
177
+ impl X for $0 {}
178
+ }
179
+ "# ,
180
+ ) ;
181
+ check_edit (
182
+ "for" ,
183
+ r#"
184
+ fn foo() {
185
+ struct X;
186
+ impl X { fn bar() { $0 } }
187
+ }
188
+ "# ,
189
+ r#"
190
+ fn foo() {
191
+ struct X;
192
+ impl X { fn bar() { for $1 in $2 { $0 } } }
193
+ }
194
+ "# ,
195
+ ) ;
196
+ }
197
+
153
198
#[ test]
154
199
fn let_semi ( ) {
155
200
cov_mark:: check!( let_semi) ;
You can’t perform that action at this time.
0 commit comments