diff options
author | Aleksey Kladov <[email protected]> | 2019-01-13 15:21:23 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-01-13 15:21:23 +0000 |
commit | 884ce4a4207ca68a5299b3a2e4e33b8f1f158001 (patch) | |
tree | ed8a3c14e19a67426c9b08cebb8e34ae91c8f8ab /crates/ra_ide_api_light/src/typing.rs | |
parent | c46e0300e6cebf78c78c28ca91e45b57e4e40954 (diff) |
fix indent caclulation
Diffstat (limited to 'crates/ra_ide_api_light/src/typing.rs')
-rw-r--r-- | crates/ra_ide_api_light/src/typing.rs | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/crates/ra_ide_api_light/src/typing.rs b/crates/ra_ide_api_light/src/typing.rs index c8f3dfe44..5ff2b7c1f 100644 --- a/crates/ra_ide_api_light/src/typing.rs +++ b/crates/ra_ide_api_light/src/typing.rs | |||
@@ -228,6 +228,38 @@ fn foo() { | |||
228 | } | 228 | } |
229 | 229 | ||
230 | #[test] | 230 | #[test] |
231 | fn indents_new_chain_call_with_semi() { | ||
232 | type_dot( | ||
233 | r" | ||
234 | pub fn child(&self, db: &impl HirDatabase, name: &Name) -> Cancelable<Option<Module>> { | ||
235 | self.child_impl(db, name) | ||
236 | <|>; | ||
237 | } | ||
238 | ", | ||
239 | r" | ||
240 | pub fn child(&self, db: &impl HirDatabase, name: &Name) -> Cancelable<Option<Module>> { | ||
241 | self.child_impl(db, name) | ||
242 | .; | ||
243 | } | ||
244 | ", | ||
245 | ); | ||
246 | type_dot( | ||
247 | r" | ||
248 | pub fn child(&self, db: &impl HirDatabase, name: &Name) -> Cancelable<Option<Module>> { | ||
249 | self.child_impl(db, name) | ||
250 | <|>; | ||
251 | } | ||
252 | ", | ||
253 | r" | ||
254 | pub fn child(&self, db: &impl HirDatabase, name: &Name) -> Cancelable<Option<Module>> { | ||
255 | self.child_impl(db, name) | ||
256 | .; | ||
257 | } | ||
258 | ", | ||
259 | ) | ||
260 | } | ||
261 | |||
262 | #[test] | ||
231 | fn indents_continued_chain_call() { | 263 | fn indents_continued_chain_call() { |
232 | type_dot( | 264 | type_dot( |
233 | r" | 265 | r" |