mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 04:53:34 +00:00
tone down on eq typed
This commit is contained in:
parent
2fa90e736b
commit
363f466627
3 changed files with 12 additions and 10 deletions
|
@ -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();
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -155,7 +155,7 @@ impl<'t> Parser<'t> {
|
|||
self.error(message);
|
||||
self.bump();
|
||||
m.complete(self, ERROR);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue