Merge #9653
9653: minor: cov-mark r=Veykril a=Veykril bors r+ Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
This commit is contained in:
commit
92877d37c3
@ -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))
|
||||
|
@ -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;
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user