mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 22:54:58 +00:00
Switch AstDatabase::exapnd_proc_macro to ExpandResult
This commit is contained in:
parent
269de9abe3
commit
82728eb757
3 changed files with 18 additions and 35 deletions
|
@ -1,5 +1,6 @@
|
|||
//! Builtin attributes.
|
||||
|
||||
use mbe::ExpandResult;
|
||||
use syntax::ast;
|
||||
|
||||
use crate::{db::AstDatabase, name, AstId, CrateId, MacroCallId, MacroDefId, MacroDefKind};
|
||||
|
@ -18,7 +19,7 @@ macro_rules! register_builtin {
|
|||
id: MacroCallId,
|
||||
tt: &tt::Subtree,
|
||||
item: &tt::Subtree,
|
||||
) -> Result<tt::Subtree, mbe::ExpandError> {
|
||||
) -> ExpandResult<tt::Subtree> {
|
||||
let expander = match *self {
|
||||
$( BuiltinAttrExpander::$variant => $expand, )*
|
||||
};
|
||||
|
@ -64,6 +65,6 @@ fn dummy_attr_expand(
|
|||
_id: MacroCallId,
|
||||
_tt: &tt::Subtree,
|
||||
item: &tt::Subtree,
|
||||
) -> Result<tt::Subtree, mbe::ExpandError> {
|
||||
Ok(item.clone())
|
||||
) -> ExpandResult<tt::Subtree> {
|
||||
ExpandResult::ok(item.clone())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue