mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-12 21:36:23 +00:00
Make tt generic over the span data
This commit is contained in:
parent
d805c74c51
commit
41a46a78f2
48 changed files with 806 additions and 569 deletions
|
@ -19,7 +19,8 @@ use std::{
|
|||
};
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
use tt::Subtree;
|
||||
|
||||
use ::tt::token_id as tt;
|
||||
|
||||
use crate::{
|
||||
msg::{ExpandMacro, FlatTree, PanicMessage},
|
||||
|
@ -151,10 +152,10 @@ impl ProcMacro {
|
|||
|
||||
pub fn expand(
|
||||
&self,
|
||||
subtree: &Subtree,
|
||||
attr: Option<&Subtree>,
|
||||
subtree: &tt::Subtree,
|
||||
attr: Option<&tt::Subtree>,
|
||||
env: Vec<(String, String)>,
|
||||
) -> Result<Result<Subtree, PanicMessage>, ServerError> {
|
||||
) -> Result<Result<tt::Subtree, PanicMessage>, ServerError> {
|
||||
let current_dir = env
|
||||
.iter()
|
||||
.find(|(name, _)| name == "CARGO_MANIFEST_DIR")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue