diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-10-29 08:20:02 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2019-10-29 08:20:02 +0000 |
commit | 4f22d2f3b0852f32c0ba5e4545ec8cc2d986cfcc (patch) | |
tree | 09667ecbdcc8b84916c509d3a3d09ab56b5d4aed /crates/ra_hir/src/expr | |
parent | 120000609ab0a0e6a946404d0477f5a0a7107800 (diff) | |
parent | 77f90caf2deeb6a2d2c8196399fbba61bf0c461d (diff) |
Merge #2112
2112: start ra_hir_def crate r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_hir/src/expr')
-rw-r--r-- | crates/ra_hir/src/expr/lower.rs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/crates/ra_hir/src/expr/lower.rs b/crates/ra_hir/src/expr/lower.rs index 50ea429ea..24733b3de 100644 --- a/crates/ra_hir/src/expr/lower.rs +++ b/crates/ra_hir/src/expr/lower.rs | |||
@@ -16,7 +16,7 @@ use crate::{ | |||
16 | path::GenericArgs, | 16 | path::GenericArgs, |
17 | ty::primitive::{FloatTy, IntTy, UncertainFloatTy, UncertainIntTy}, | 17 | ty::primitive::{FloatTy, IntTy, UncertainFloatTy, UncertainIntTy}, |
18 | type_ref::TypeRef, | 18 | type_ref::TypeRef, |
19 | DefWithBody, Either, HirFileId, MacroCallLoc, MacroFileKind, Mutability, Path, Resolver, | 19 | AstId, DefWithBody, Either, HirFileId, MacroCallLoc, MacroFileKind, Mutability, Path, Resolver, |
20 | Source, | 20 | Source, |
21 | }; | 21 | }; |
22 | 22 | ||
@@ -458,11 +458,10 @@ where | |||
458 | ast::Expr::Label(_e) => self.alloc_expr(Expr::Missing, syntax_ptr), | 458 | ast::Expr::Label(_e) => self.alloc_expr(Expr::Missing, syntax_ptr), |
459 | ast::Expr::RangeExpr(_e) => self.alloc_expr(Expr::Missing, syntax_ptr), | 459 | ast::Expr::RangeExpr(_e) => self.alloc_expr(Expr::Missing, syntax_ptr), |
460 | ast::Expr::MacroCall(e) => { | 460 | ast::Expr::MacroCall(e) => { |
461 | let ast_id = self | 461 | let ast_id = AstId::new( |
462 | .db | 462 | self.current_file_id, |
463 | .ast_id_map(self.current_file_id) | 463 | self.db.ast_id_map(self.current_file_id).ast_id(&e), |
464 | .ast_id(&e) | 464 | ); |
465 | .with_file_id(self.current_file_id); | ||
466 | 465 | ||
467 | if let Some(path) = e.path().and_then(|path| self.parse_path(path)) { | 466 | if let Some(path) = e.path().and_then(|path| self.parse_path(path)) { |
468 | if let Some(def) = self.resolver.resolve_path_as_macro(self.db, &path) { | 467 | if let Some(def) = self.resolver.resolve_path_as_macro(self.db, &path) { |