mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
fix indent caclulation
This commit is contained in:
parent
c46e0300e6
commit
884ce4a420
3 changed files with 51 additions and 11 deletions
|
@ -227,6 +227,38 @@ fn foo() {
|
|||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn indents_new_chain_call_with_semi() {
|
||||
type_dot(
|
||||
r"
|
||||
pub fn child(&self, db: &impl HirDatabase, name: &Name) -> Cancelable<Option<Module>> {
|
||||
self.child_impl(db, name)
|
||||
<|>;
|
||||
}
|
||||
",
|
||||
r"
|
||||
pub fn child(&self, db: &impl HirDatabase, name: &Name) -> Cancelable<Option<Module>> {
|
||||
self.child_impl(db, name)
|
||||
.;
|
||||
}
|
||||
",
|
||||
);
|
||||
type_dot(
|
||||
r"
|
||||
pub fn child(&self, db: &impl HirDatabase, name: &Name) -> Cancelable<Option<Module>> {
|
||||
self.child_impl(db, name)
|
||||
<|>;
|
||||
}
|
||||
",
|
||||
r"
|
||||
pub fn child(&self, db: &impl HirDatabase, name: &Name) -> Cancelable<Option<Module>> {
|
||||
self.child_impl(db, name)
|
||||
.;
|
||||
}
|
||||
",
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn indents_continued_chain_call() {
|
||||
type_dot(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue