From 545382db2532801bd6fb05532d71114f8fb509fd Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Thu, 8 Feb 2024 14:54:52 +0100 Subject: [PATCH] Fix warnings --- crates/hir-ty/src/diagnostics/match_check/pat_analysis.rs | 2 +- crates/ide-diagnostics/src/handlers/missing_fields.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/hir-ty/src/diagnostics/match_check/pat_analysis.rs b/crates/hir-ty/src/diagnostics/match_check/pat_analysis.rs index 51be8960b8..712842372b 100644 --- a/crates/hir-ty/src/diagnostics/match_check/pat_analysis.rs +++ b/crates/hir-ty/src/diagnostics/match_check/pat_analysis.rs @@ -359,7 +359,7 @@ impl<'p> TypeCx for MatchCheckCtx<'p> { &'a self, ctor: &'a rustc_pattern_analysis::constructor::Constructor, ty: &'a Self::Ty, - ) -> impl Iterator + ExactSizeIterator + Captures<'a> { + ) -> impl ExactSizeIterator + Captures<'a> { let single = |ty| smallvec![ty]; let tys: SmallVec<[_; 2]> = match ctor { Struct | Variant(_) | UnionField => match ty.kind(Interner) { diff --git a/crates/ide-diagnostics/src/handlers/missing_fields.rs b/crates/ide-diagnostics/src/handlers/missing_fields.rs index feaf1aa727..3bc043c8fc 100644 --- a/crates/ide-diagnostics/src/handlers/missing_fields.rs +++ b/crates/ide-diagnostics/src/handlers/missing_fields.rs @@ -13,7 +13,7 @@ use syntax::{ ast::{self, make}, AstNode, SyntaxNode, SyntaxNodePtr, }; -use text_edit::{TextEdit, TextRange}; +use text_edit::TextEdit; use crate::{fix, Diagnostic, DiagnosticCode, DiagnosticsContext};