mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 22:31:43 +00:00
10956: minor: Bump deps r=Veykril a=lnicola bors r+ 10986: fix: Fix lint completions not working for unclosed attributes r=Veykril a=Veykril Fixes #10682 Uses keywords and nested `TokenTree`s as a heuristic to figure out when to stop parsing in case the attribute is unclosed which should work pretty well as attributes are usually followed by either of those. bors r+ Co-authored-by: Laurențiu Nicola <lnicola@dend.ro> Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
This commit is contained in:
commit
48cd733c9e
6 changed files with 49 additions and 36 deletions
|
@ -831,6 +831,20 @@ mod lint {
|
|||
r#"#[allow(rustdoc::bare_urls)] struct Test;"#,
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn lint_unclosed() {
|
||||
check_edit(
|
||||
"deprecated",
|
||||
r#"#[allow(dep$0 struct Test;"#,
|
||||
r#"#[allow(deprecated struct Test;"#,
|
||||
);
|
||||
check_edit(
|
||||
"bare_urls",
|
||||
r#"#[allow(rustdoc::$0 struct Test;"#,
|
||||
r#"#[allow(rustdoc::bare_urls struct Test;"#,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
mod repr {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue