mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 00:01:16 +00:00
Fix errors
This commit is contained in:
parent
da421068f1
commit
703ef6608e
8 changed files with 167 additions and 20 deletions
|
@ -90,6 +90,7 @@ pub(crate) mod diag {
|
|||
match self {
|
||||
Severity::RuntimeError => DiagnosticSeverity::ERROR,
|
||||
Severity::Warning => DiagnosticSeverity::WARNING,
|
||||
Severity::Fatal => DiagnosticSeverity::ERROR,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -130,7 +131,7 @@ pub(crate) mod diag {
|
|||
LoadingProblem::UnexpectedHeader(header) => {
|
||||
msg = format!("Unexpected header: {}", header);
|
||||
}
|
||||
LoadingProblem::MsgChannelDied => {
|
||||
LoadingProblem::ChannelProblem(_) => {
|
||||
msg = format!("Internal error: message channel died");
|
||||
}
|
||||
LoadingProblem::ErrJoiningWorkerThreads => {
|
||||
|
|
|
@ -57,7 +57,7 @@ impl Document {
|
|||
}
|
||||
|
||||
fn line_info(&self) -> &LineInfo {
|
||||
&self.line_info.as_ref().unwrap()
|
||||
self.line_info.as_ref().unwrap()
|
||||
}
|
||||
|
||||
fn module(&mut self) -> Result<&mut LoadedModule, LoadingProblem<'_>> {
|
||||
|
@ -74,8 +74,8 @@ impl Document {
|
|||
fi,
|
||||
&self.source,
|
||||
src_dir,
|
||||
Default::default(),
|
||||
roc_target::TargetInfo::default_x86_64(),
|
||||
roc_load::FunctionKind::LambdaSet,
|
||||
roc_reporting::report::RenderTarget::Generic,
|
||||
RocCacheDir::Persistent(cache::roc_cache_dir().as_path()),
|
||||
roc_reporting::report::DEFAULT_PALETTE,
|
||||
|
@ -115,7 +115,7 @@ impl Document {
|
|||
let module_path = self.url.to_file_path().unwrap();
|
||||
let fmt = ProblemFmt {
|
||||
alloc: &alloc,
|
||||
line_info: &line_info,
|
||||
line_info,
|
||||
path: &module_path,
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue