From 52fd2c8e4858c548195edceb83c02437d2d28ee5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauren=C8=9Biu=20Nicola?= Date: Mon, 6 Apr 2020 17:21:33 +0300 Subject: Fix unnecessary braces warnings --- crates/ra_hir/src/semantics/source_to_def.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'crates/ra_hir') diff --git a/crates/ra_hir/src/semantics/source_to_def.rs b/crates/ra_hir/src/semantics/source_to_def.rs index 8843f2835..66724919b 100644 --- a/crates/ra_hir/src/semantics/source_to_def.rs +++ b/crates/ra_hir/src/semantics/source_to_def.rs @@ -208,12 +208,12 @@ impl SourceToDefCtx<'_, '_> { for container in src.cloned().ancestors_with_macros(self.db.upcast()).skip(1) { let res: GenericDefId = match_ast! { match (container.value) { - ast::FnDef(it) => { self.fn_to_def(container.with_value(it))?.into() }, - ast::StructDef(it) => { self.struct_to_def(container.with_value(it))?.into() }, - ast::EnumDef(it) => { self.enum_to_def(container.with_value(it))?.into() }, - ast::TraitDef(it) => { self.trait_to_def(container.with_value(it))?.into() }, - ast::TypeAliasDef(it) => { self.type_alias_to_def(container.with_value(it))?.into() }, - ast::ImplDef(it) => { self.impl_to_def(container.with_value(it))?.into() }, + ast::FnDef(it) => self.fn_to_def(container.with_value(it))?.into(), + ast::StructDef(it) => self.struct_to_def(container.with_value(it))?.into(), + ast::EnumDef(it) => self.enum_to_def(container.with_value(it))?.into(), + ast::TraitDef(it) => self.trait_to_def(container.with_value(it))?.into(), + ast::TypeAliasDef(it) => self.type_alias_to_def(container.with_value(it))?.into(), + ast::ImplDef(it) => self.impl_to_def(container.with_value(it))?.into(), _ => continue, } }; @@ -226,9 +226,9 @@ impl SourceToDefCtx<'_, '_> { for container in src.cloned().ancestors_with_macros(self.db.upcast()).skip(1) { let res: DefWithBodyId = match_ast! { match (container.value) { - ast::ConstDef(it) => { self.const_to_def(container.with_value(it))?.into() }, - ast::StaticDef(it) => { self.static_to_def(container.with_value(it))?.into() }, - ast::FnDef(it) => { self.fn_to_def(container.with_value(it))?.into() }, + ast::ConstDef(it) => self.const_to_def(container.with_value(it))?.into(), + ast::StaticDef(it) => self.static_to_def(container.with_value(it))?.into(), + ast::FnDef(it) => self.fn_to_def(container.with_value(it))?.into(), _ => continue, } }; -- cgit v1.2.3 From bf569f8b29d05782597d40ec98ee33bc2574763e Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 6 Apr 2020 16:58:16 +0200 Subject: Check for eprintln on CI --- crates/ra_hir/src/semantics.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/ra_hir') diff --git a/crates/ra_hir/src/semantics.rs b/crates/ra_hir/src/semantics.rs index 16a5fe968..2ad231d36 100644 --- a/crates/ra_hir/src/semantics.rs +++ b/crates/ra_hir/src/semantics.rs @@ -9,6 +9,7 @@ use hir_def::{ AsMacroCall, TraitId, }; use hir_expand::ExpansionInfo; +use itertools::Itertools; use ra_db::{FileId, FileRange}; use ra_prof::profile; use ra_syntax::{ @@ -135,7 +136,6 @@ impl<'db, DB: HirDatabase> Semantics<'db, DB> { node: &SyntaxNode, offset: TextUnit, ) -> impl Iterator + '_ { - use itertools::Itertools; node.token_at_offset(offset) .map(|token| self.ancestors_with_macros(token.parent())) .kmerge_by(|node1, node2| node1.text_range().len() < node2.text_range().len()) -- cgit v1.2.3 From 8c378af72117e92bc894fd4a79e978ef0d1c0cc7 Mon Sep 17 00:00:00 2001 From: Josh Mcguigan Date: Tue, 24 Mar 2020 04:40:58 -0700 Subject: missing match arms diagnostic --- crates/ra_hir/src/diagnostics.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/ra_hir') diff --git a/crates/ra_hir/src/diagnostics.rs b/crates/ra_hir/src/diagnostics.rs index a9040ea3d..c82883d0c 100644 --- a/crates/ra_hir/src/diagnostics.rs +++ b/crates/ra_hir/src/diagnostics.rs @@ -1,4 +1,4 @@ //! FIXME: write short doc here pub use hir_def::diagnostics::UnresolvedModule; pub use hir_expand::diagnostics::{AstDiagnostic, Diagnostic, DiagnosticSink}; -pub use hir_ty::diagnostics::{MissingFields, MissingOkInTailExpr, NoSuchField}; +pub use hir_ty::diagnostics::{MissingFields, MissingMatchArms, MissingOkInTailExpr, NoSuchField}; -- cgit v1.2.3