Show pattern mismatch diagnostics

This commit is contained in:
Lukas Wirth 2023-02-28 15:13:45 +01:00
parent 9b441b9c67
commit fc2b395e00
8 changed files with 117 additions and 71 deletions

View file

@ -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,