Implement quickfix for 'UnknownModule'.

This commit is contained in:
KtorZ
2023-10-21 12:59:48 +02:00
parent e48ac6b592
commit c550b4766d
4 changed files with 89 additions and 44 deletions

View File

@@ -964,7 +964,6 @@ impl ExtraData for Error {
| Error::UnexpectedLabeledArg { .. }
| Error::UnexpectedLabeledArgInPattern { .. }
| Error::UnknownLabels { .. }
| Error::UnknownModule { .. }
| Error::UnknownModuleField { .. }
| Error::UnknownModuleType { .. }
| Error::UnknownModuleValue { .. }
@@ -975,7 +974,9 @@ impl ExtraData for Error {
| Error::UpdateMultiConstructorType { .. }
| Error::ValidatorImported { .. }
| Error::ValidatorMustReturnBool { .. } => None,
Error::UnknownVariable { name, .. } => Some(name.clone()),
Error::UnknownVariable { name, .. } | Error::UnknownModule { name, .. } => {
Some(name.clone())
}
}
}
}