mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 13:25:09 +00:00
Show pattern mismatch diagnostics
This commit is contained in:
parent
9b441b9c67
commit
fc2b395e00
8 changed files with 117 additions and 71 deletions
|
@ -771,6 +771,15 @@ impl<T> InFile<Option<T>> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<L, R> InFile<Either<L, R>> {
|
||||
pub fn transpose(self) -> Either<InFile<L>, InFile<R>> {
|
||||
match self.value {
|
||||
Either::Left(l) => Either::Left(InFile::new(self.file_id, l)),
|
||||
Either::Right(r) => Either::Right(InFile::new(self.file_id, r)),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> InFile<&'a SyntaxNode> {
|
||||
pub fn ancestors_with_macros(
|
||||
self,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue