From fcce07d2d1b07cf4578af65b00a243e743a67f05 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 30 Jul 2020 20:16:04 +0200 Subject: Finalize attribute grammar --- crates/ra_assists/src/handlers/add_custom_impl.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ra_assists') diff --git a/crates/ra_assists/src/handlers/add_custom_impl.rs b/crates/ra_assists/src/handlers/add_custom_impl.rs index acb07e36a..b67438b6b 100644 --- a/crates/ra_assists/src/handlers/add_custom_impl.rs +++ b/crates/ra_assists/src/handlers/add_custom_impl.rs @@ -29,8 +29,8 @@ use crate::{ // } // ``` pub(crate) fn add_custom_impl(acc: &mut Assists, ctx: &AssistContext) -> Option<()> { - let input = ctx.find_node_at_offset::()?; - let attr = input.syntax().parent().and_then(ast::Attr::cast)?; + let attr = ctx.find_node_at_offset::()?; + let input = attr.token_tree()?; let attr_name = attr .syntax() -- cgit v1.2.3