aboutsummaryrefslogtreecommitdiff
path: root/crates/hir
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir')
-rw-r--r--crates/hir/src/code_model.rs7
-rw-r--r--crates/hir/src/diagnostics.rs2
2 files changed, 5 insertions, 4 deletions
diff --git a/crates/hir/src/code_model.rs b/crates/hir/src/code_model.rs
index 8ecf72bd9..63c1a8ebf 100644
--- a/crates/hir/src/code_model.rs
+++ b/crates/hir/src/code_model.rs
@@ -2,7 +2,7 @@
2use std::{iter, sync::Arc}; 2use std::{iter, sync::Arc};
3 3
4use arrayvec::ArrayVec; 4use arrayvec::ArrayVec;
5use base_db::{CrateId, CrateName, Edition, FileId}; 5use base_db::{CrateDisplayName, CrateId, Edition, FileId};
6use either::Either; 6use either::Either;
7use hir_def::find_path::PrefixKind; 7use hir_def::find_path::PrefixKind;
8use hir_def::{ 8use hir_def::{
@@ -102,8 +102,8 @@ impl Crate {
102 db.crate_graph()[self.id].edition 102 db.crate_graph()[self.id].edition
103 } 103 }
104 104
105 pub fn declaration_name(self, db: &dyn HirDatabase) -> Option<CrateName> { 105 pub fn display_name(self, db: &dyn HirDatabase) -> Option<CrateDisplayName> {
106 db.crate_graph()[self.id].declaration_name.clone() 106 db.crate_graph()[self.id].display_name.clone()
107 } 107 }
108 108
109 pub fn query_external_importables( 109 pub fn query_external_importables(
@@ -780,6 +780,7 @@ impl Function {
780 } 780 }
781 781
782 pub fn diagnostics(self, db: &dyn HirDatabase, sink: &mut DiagnosticSink) { 782 pub fn diagnostics(self, db: &dyn HirDatabase, sink: &mut DiagnosticSink) {
783 hir_def::diagnostics::validate_body(db.upcast(), self.id.into(), sink);
783 hir_ty::diagnostics::validate_module_item(db, self.id.into(), sink); 784 hir_ty::diagnostics::validate_module_item(db, self.id.into(), sink);
784 hir_ty::diagnostics::validate_body(db, self.id.into(), sink); 785 hir_ty::diagnostics::validate_body(db, self.id.into(), sink);
785 } 786 }
diff --git a/crates/hir/src/diagnostics.rs b/crates/hir/src/diagnostics.rs
index da2b40849..c18c1c587 100644
--- a/crates/hir/src/diagnostics.rs
+++ b/crates/hir/src/diagnostics.rs
@@ -1,5 +1,5 @@
1//! FIXME: write short doc here 1//! FIXME: write short doc here
2pub use hir_def::diagnostics::UnresolvedModule; 2pub use hir_def::diagnostics::{InactiveCode, UnresolvedModule};
3pub use hir_expand::diagnostics::{Diagnostic, DiagnosticSink, DiagnosticSinkBuilder}; 3pub use hir_expand::diagnostics::{Diagnostic, DiagnosticSink, DiagnosticSinkBuilder};
4pub use hir_ty::diagnostics::{ 4pub use hir_ty::diagnostics::{
5 IncorrectCase, MismatchedArgCount, MissingFields, MissingMatchArms, MissingOkInTailExpr, 5 IncorrectCase, MismatchedArgCount, MissingFields, MissingMatchArms, MissingOkInTailExpr,