mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-25 05:14:27 +00:00
cov-mark
This commit is contained in:
parent
33972da625
commit
c83e37c001
@ -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…
Reference in New Issue
Block a user