From ea5cc8d07ac28a2110b894d154468c3fa46d7040 Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Sat, 19 Dec 2020 01:09:48 +0100 Subject: More accurate `#[derive]` parsing This now allows full paths to the derive macro --- crates/hir_def/src/path.rs | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'crates/hir_def/src/path.rs') diff --git a/crates/hir_def/src/path.rs b/crates/hir_def/src/path.rs index 00a69a8a6..e2bf85bbc 100644 --- a/crates/hir_def/src/path.rs +++ b/crates/hir_def/src/path.rs @@ -9,11 +9,8 @@ use std::{ use crate::{body::LowerCtx, type_ref::LifetimeRef}; use base_db::CrateId; -use hir_expand::{ - hygiene::Hygiene, - name::{AsName, Name}, -}; -use syntax::ast::{self}; +use hir_expand::{hygiene::Hygiene, name::Name}; +use syntax::ast; use crate::{ type_ref::{TypeBound, TypeRef}, @@ -56,11 +53,6 @@ impl ModPath { ModPath { kind, segments } } - /// Converts an `tt::Ident` into a single-identifier `Path`. - pub(crate) fn from_tt_ident(ident: &tt::Ident) -> ModPath { - ident.as_name().into() - } - /// Calls `cb` with all paths, represented by this use item. pub(crate) fn expand_use_item( item_src: InFile, -- cgit v1.2.3