[red-knot] Make Diagnostic::file optional (#15640)

This commit is contained in:
Micha Reiser 2025-01-23 10:43:14 +01:00 committed by GitHub
parent 1ecd97855e
commit 23c222368e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 36 additions and 26 deletions

View file

@ -402,8 +402,8 @@ impl Diagnostic for IOErrorDiagnostic {
self.error.to_string().into()
}
fn file(&self) -> File {
self.file
fn file(&self) -> Option<File> {
Some(self.file)
}
fn range(&self) -> Option<TextRange> {