9653: minor: cov-mark r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
This commit is contained in:
bors[bot] 2021-07-20 17:04:56 +00:00 committed by GitHub
commit 92877d37c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 1 deletions

View File

@ -780,7 +780,7 @@ pub struct $0Foo;
.parse(position.file_id)
.syntax()
.token_at_offset(position.offset)
.next()
.left_biased()
.unwrap()
.ancestors()
.find_map(|it| node_to_def(sema, &it))

View File

@ -41,6 +41,7 @@ pub(crate) fn complete_expr_keyword(acc: &mut Completions, ctx: &CompletionConte
if let Some(ImmediateLocation::Visibility(vis)) = &ctx.completion_location {
if vis.in_token().is_none() {
cov_mark::hit!(kw_completion_in);
add_keyword("in", "in");
}
return;

View File

@ -10,6 +10,7 @@ fn check(ra_fixture: &str, expect: Expect) {
#[test]
fn empty_pub() {
cov_mark::check!(kw_completion_in);
check(
r#"
pub($0)