Change return type of expand_macro

This commit is contained in:
Edwin Cheng 2019-11-19 22:56:48 +08:00
parent 94c63d2802
commit 4012da07fd
5 changed files with 33 additions and 13 deletions

View file

@ -45,11 +45,18 @@ pub struct SyntaxTreeParams {
pub range: Option<Range>,
}
#[derive(Serialize, Debug)]
#[serde(rename_all = "camelCase")]
pub struct ExpandedMacro {
pub name: String,
pub expansion: String,
}
pub enum ExpandMacro {}
impl Request for ExpandMacro {
type Params = ExpandMacroParams;
type Result = Option<(String, String)>;
type Result = Option<ExpandedMacro>;
const METHOD: &'static str = "rust-analyzer/expandMacro";
}