tone down on eq typed

This commit is contained in:
Aleksey Kladov 2018-08-28 11:17:08 +03:00
parent 2fa90e736b
commit 363f466627
3 changed files with 12 additions and 10 deletions

View file

@ -66,6 +66,8 @@ pub fn on_eq_typed(file: &File, offset: TextUnit) -> Option<ActionResult> {
if contains_offset_nonstrict(expr_range, offset) && offset != expr_range.start() {
return None;
}
} else {
return None;
}
let offset = let_stmt.syntax().range().end();
let mut edit = EditBuilder::new();

View file

@ -266,15 +266,15 @@ fn test_on_eq_typed() {
assert_eq_text!(after, &actual);
}
do_check(r"
fn foo() {
let foo =<|>
}
", r"
fn foo() {
let foo =;
}
");
// do_check(r"
// fn foo() {
// let foo =<|>
// }
// ", r"
// fn foo() {
// let foo =;
// }
// ");
do_check(r"
fn foo() {
let foo =<|> 1 + 1

View file

@ -155,7 +155,7 @@ impl<'t> Parser<'t> {
self.error(message);
self.bump();
m.complete(self, ERROR);
}
};
}
}