This commit is contained in:
Max Brunsfeld 2021-12-13 17:44:20 -08:00
parent 0b1c27956b
commit 4efdc53d9f
6 changed files with 68 additions and 9 deletions

View file

@ -1674,6 +1674,15 @@ impl BufferSnapshot {
})
}
pub fn all_diagnostics<'a, O>(&'a self) -> impl 'a + Iterator<Item = DiagnosticEntry<O>>
where
O: 'a + FromAnchor,
{
self.diagnostics
.iter()
.map(|diagnostic| diagnostic.resolve(self))
}
pub fn diagnostics_in_range<'a, T, O>(
&'a self,
search_range: Range<T>,