From 42057896bc1435b67a2d1cce6100bcbe8e54f38e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauren=C8=9Biu=20Nicola?= Date: Fri, 5 Mar 2021 15:59:50 +0200 Subject: Fix some warnings --- crates/hir_def/src/attr.rs | 2 +- crates/ide/src/runnables.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'crates') diff --git a/crates/hir_def/src/attr.rs b/crates/hir_def/src/attr.rs index fe4c3fa28..24ffa6c3a 100644 --- a/crates/hir_def/src/attr.rs +++ b/crates/hir_def/src/attr.rs @@ -367,7 +367,7 @@ fn inner_attributes( // Excerpt from the reference: // Block expressions accept outer and inner attributes, but only when they are the outer // expression of an expression statement or the final expression of another block expression. - ast::BlockExpr(it) => return None, + ast::BlockExpr(_it) => return None, _ => return None, } }; diff --git a/crates/ide/src/runnables.rs b/crates/ide/src/runnables.rs index 1e7baed20..65f60891e 100644 --- a/crates/ide/src/runnables.rs +++ b/crates/ide/src/runnables.rs @@ -189,7 +189,7 @@ pub(crate) fn doc_owner_to_def( ) -> Option { let res: hir::ModuleDef = match_ast! { match item { - ast::SourceFile(it) => sema.scope(&item).module()?.into(), + ast::SourceFile(_it) => sema.scope(&item).module()?.into(), ast::Fn(it) => sema.to_def(&it)?.into(), ast::Struct(it) => sema.to_def(&it)?.into(), ast::Enum(it) => sema.to_def(&it)?.into(), -- cgit v1.2.3