diff --git a/crates/completion/src/completions/attribute.rs b/crates/completion/src/completions/attribute.rs index 19ce2482fd4..8695eed3984 100644 --- a/crates/completion/src/completions/attribute.rs +++ b/crates/completion/src/completions/attribute.rs @@ -234,7 +234,7 @@ fn parse_comma_sep_input(derive_input: ast::TokenTree) -> Result Matcher<'db, 'sema> { } SyntaxElement::Node(n) => { if let Some(first_token) = n.first_token() { - if Some(first_token.to_string()) == next_pattern_token { + if Some(first_token.text().as_str()) + == next_pattern_token.as_deref() + { if let Some(SyntaxElement::Node(p)) = pattern.next() { // We have a subtree that starts with the next token in our pattern. self.attempt_match_token_tree(phase, &p, &n)?;