Support expect in attribute completion and hover

This commit is contained in:
Laurențiu Nicola 2024-09-23 14:55:50 +03:00
parent b3a3bf770a
commit a6572e9234
4 changed files with 52 additions and 5 deletions

View file

@ -329,7 +329,7 @@ pub(super) fn try_for_lint(attr: &ast::Attr, token: &SyntaxToken) -> Option<Hove
}
let (is_clippy, lints) = match &*path {
"feature" => (false, FEATURES),
"allow" | "deny" | "forbid" | "warn" => {
"allow" | "deny" | "expect" | "forbid" | "warn" => {
let is_clippy = algo::non_trivia_sibling(token.clone().into(), Direction::Prev)
.filter(|t| t.kind() == T![:])
.and_then(|t| algo::non_trivia_sibling(t, Direction::Prev))