From 4f94af3c4aaa57ebb4cb01f7e4edfb3a0821b09b Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 11 Jun 2019 16:49:56 +0300 Subject: use Source for Function --- crates/ra_hir/src/expr/validation.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/ra_hir/src/expr/validation.rs') diff --git a/crates/ra_hir/src/expr/validation.rs b/crates/ra_hir/src/expr/validation.rs index a1b2641da..ff5e5f68e 100644 --- a/crates/ra_hir/src/expr/validation.rs +++ b/crates/ra_hir/src/expr/validation.rs @@ -71,7 +71,7 @@ impl<'a, 'b> ExprValidator<'a, 'b> { return; } let source_map = self.func.body_source_map(db); - let file_id = self.func.source(db).0; + let file_id = self.func.source(db).file_id; let source_file = db.parse(file_id.original_file(db)).tree; if let Some(field_list_node) = source_map .expr_syntax(id) -- cgit v1.2.3 From c4512fadb1b332b13bb41b0aa8a28aa964664842 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 11 Jun 2019 17:54:51 +0300 Subject: remove inherent source impls --- crates/ra_hir/src/expr/validation.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/ra_hir/src/expr/validation.rs') diff --git a/crates/ra_hir/src/expr/validation.rs b/crates/ra_hir/src/expr/validation.rs index ff5e5f68e..534fd482b 100644 --- a/crates/ra_hir/src/expr/validation.rs +++ b/crates/ra_hir/src/expr/validation.rs @@ -5,7 +5,7 @@ use ra_syntax::ast::{AstNode, StructLit}; use crate::{ expr::AstPtr, - HirDatabase, Function, Name, + HirDatabase, Function, Name, HasSource, diagnostics::{DiagnosticSink, MissingFields}, adt::AdtDef, Path, -- cgit v1.2.3