mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 22:31:43 +00:00
More accurate #[derive]
parsing
This now allows full paths to the derive macro
This commit is contained in:
parent
c7b7c37ea5
commit
ea5cc8d07a
4 changed files with 60 additions and 27 deletions
|
@ -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<ast::Use>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue