mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
Fix warnings
This commit is contained in:
parent
91dab4d720
commit
545382db25
2 changed files with 2 additions and 2 deletions
|
@ -359,7 +359,7 @@ impl<'p> TypeCx for MatchCheckCtx<'p> {
|
||||||
&'a self,
|
&'a self,
|
||||||
ctor: &'a rustc_pattern_analysis::constructor::Constructor<Self>,
|
ctor: &'a rustc_pattern_analysis::constructor::Constructor<Self>,
|
||||||
ty: &'a Self::Ty,
|
ty: &'a Self::Ty,
|
||||||
) -> impl Iterator<Item = Self::Ty> + ExactSizeIterator + Captures<'a> {
|
) -> impl ExactSizeIterator<Item = Self::Ty> + Captures<'a> {
|
||||||
let single = |ty| smallvec![ty];
|
let single = |ty| smallvec![ty];
|
||||||
let tys: SmallVec<[_; 2]> = match ctor {
|
let tys: SmallVec<[_; 2]> = match ctor {
|
||||||
Struct | Variant(_) | UnionField => match ty.kind(Interner) {
|
Struct | Variant(_) | UnionField => match ty.kind(Interner) {
|
||||||
|
|
|
@ -13,7 +13,7 @@ use syntax::{
|
||||||
ast::{self, make},
|
ast::{self, make},
|
||||||
AstNode, SyntaxNode, SyntaxNodePtr,
|
AstNode, SyntaxNode, SyntaxNodePtr,
|
||||||
};
|
};
|
||||||
use text_edit::{TextEdit, TextRange};
|
use text_edit::TextEdit;
|
||||||
|
|
||||||
use crate::{fix, Diagnostic, DiagnosticCode, DiagnosticsContext};
|
use crate::{fix, Diagnostic, DiagnosticCode, DiagnosticsContext};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue