mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-13 21:54:42 +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() {
|
if contains_offset_nonstrict(expr_range, offset) && offset != expr_range.start() {
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
return None;
|
||||||
}
|
}
|
||||||
let offset = let_stmt.syntax().range().end();
|
let offset = let_stmt.syntax().range().end();
|
||||||
let mut edit = EditBuilder::new();
|
let mut edit = EditBuilder::new();
|
||||||
|
|
|
@ -266,15 +266,15 @@ fn test_on_eq_typed() {
|
||||||
assert_eq_text!(after, &actual);
|
assert_eq_text!(after, &actual);
|
||||||
}
|
}
|
||||||
|
|
||||||
do_check(r"
|
// do_check(r"
|
||||||
fn foo() {
|
// fn foo() {
|
||||||
let foo =<|>
|
// let foo =<|>
|
||||||
}
|
// }
|
||||||
", r"
|
// ", r"
|
||||||
fn foo() {
|
// fn foo() {
|
||||||
let foo =;
|
// let foo =;
|
||||||
}
|
// }
|
||||||
");
|
// ");
|
||||||
do_check(r"
|
do_check(r"
|
||||||
fn foo() {
|
fn foo() {
|
||||||
let foo =<|> 1 + 1
|
let foo =<|> 1 + 1
|
||||||
|
|
|
@ -155,7 +155,7 @@ impl<'t> Parser<'t> {
|
||||||
self.error(message);
|
self.error(message);
|
||||||
self.bump();
|
self.bump();
|
||||||
m.complete(self, ERROR);
|
m.complete(self, ERROR);
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue