diff options
Diffstat (limited to 'crates/ra_hir_def/src/body.rs')
-rw-r--r-- | crates/ra_hir_def/src/body.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/crates/ra_hir_def/src/body.rs b/crates/ra_hir_def/src/body.rs index e09996c6f..ff0758da0 100644 --- a/crates/ra_hir_def/src/body.rs +++ b/crates/ra_hir_def/src/body.rs | |||
@@ -14,6 +14,7 @@ use ra_syntax::{ast, AstNode, AstPtr}; | |||
14 | use rustc_hash::FxHashMap; | 14 | use rustc_hash::FxHashMap; |
15 | 15 | ||
16 | use crate::{ | 16 | use crate::{ |
17 | attr::Attrs, | ||
17 | db::DefDatabase, | 18 | db::DefDatabase, |
18 | expr::{Expr, ExprId, Pat, PatId}, | 19 | expr::{Expr, ExprId, Pat, PatId}, |
19 | item_scope::BuiltinShadowMode, | 20 | item_scope::BuiltinShadowMode, |
@@ -102,6 +103,10 @@ impl Expander { | |||
102 | InFile { file_id: self.current_file_id, value } | 103 | InFile { file_id: self.current_file_id, value } |
103 | } | 104 | } |
104 | 105 | ||
106 | pub(crate) fn parse_attrs(&self, owner: &dyn ast::AttrsOwner) -> Attrs { | ||
107 | Attrs::new(owner, &self.hygiene) | ||
108 | } | ||
109 | |||
105 | fn parse_path(&mut self, path: ast::Path) -> Option<Path> { | 110 | fn parse_path(&mut self, path: ast::Path) -> Option<Path> { |
106 | Path::from_src(path, &self.hygiene) | 111 | Path::from_src(path, &self.hygiene) |
107 | } | 112 | } |