Cleanup ImmediateLocation determination

This commit is contained in:
Lukas Wirth 2021-05-27 18:15:18 +02:00
parent f41c983424
commit 3a16950fd9
5 changed files with 136 additions and 119 deletions

View file

@ -132,7 +132,7 @@ pub(crate) fn check_edit_with_config(
assert_eq_text!(&ra_fixture_after, &actual)
}
pub(crate) fn check_pattern_is_applicable(code: &str, check: fn(SyntaxElement) -> bool) {
pub(crate) fn check_pattern_is_applicable(code: &str, check: impl FnOnce(SyntaxElement) -> bool) {
let (db, pos) = position(code);
let sema = Semantics::new(&db);